Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor author configuration system #449

Merged
merged 30 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4272d03
Sketch out the Author helper
caendesilva May 23, 2022
76ef9c8
Add name identifiers to Author arguments
caendesilva May 23, 2022
884828a
Create Image.php
caendesilva May 23, 2022
16c6f1f
Merge branch 'master' of github.com:hydephp/framework
caendesilva May 23, 2022
de34b64
Change $displayName to $display_name
caendesilva May 23, 2022
dc43c83
Sketch out the test class
caendesilva May 23, 2022
04fde24
Import classes
caendesilva May 23, 2022
6c5261f
Fix whitespace typo in array key
caendesilva May 23, 2022
cd379f7
Test creation of Author model
caendesilva May 23, 2022
6b976ac
Sketch out the Author helper
caendesilva May 23, 2022
19213d6
Add Author collection methods
caendesilva May 23, 2022
c1990f6
Add get method to find Author in config
caendesilva May 23, 2022
f9b7494
Set method visibility to public
caendesilva May 23, 2022
11726a4
Remove Copilot comments
caendesilva May 23, 2022
99fbdab
Clean up test code
caendesilva May 23, 2022
fa6c3bf
Update PHPDoc comments
caendesilva May 23, 2022
ab6cafc
Add information to PHPDoc as to why an array is used
caendesilva May 23, 2022
5b56e9b
Deprecate AuthorService
caendesilva May 23, 2022
c4fdddb
Add inline documentation
caendesilva May 23, 2022
2204832
Use the new helper in the findAuthor method
caendesilva May 23, 2022
ba4344d
Add helper to remove dependency on AuthorService
caendesilva May 23, 2022
9f9d64d
Remove AuthorService
caendesilva May 23, 2022
990dcfc
Finalize removal of authors.yml
caendesilva May 23, 2022
1660ce3
Apply fixes from StyleCI
StyleCIBot May 23, 2022
5448c1d
Merge pull request #448 from hydephp/analysis-e7mE3P
May 23, 2022
b6dcd63
Add underscore to sample name
caendesilva May 23, 2022
359fd07
Add exxtra test case for multiple authors
caendesilva May 23, 2022
eb67873
Merge branch 'refactor-author-system' of github.com:hydephp/framework…
caendesilva May 23, 2022
ba7c2cc
Change display_name to name to match front matter
caendesilva May 23, 2022
a58408f
Update Author config documentation
caendesilva May 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Finalize removal of authors.yml
  • Loading branch information
caendesilva committed May 23, 2022
commit 990dcfc5cd6531177e197fc83386d679e5ec561c
2 changes: 1 addition & 1 deletion .github/dev-docs/RELEASE-NOTES-DRAFT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ The deprecated option named `hyde.docs_directory` has been removed.

Use `docs.output_directory` instead.

The authors.yml has been deprecated, and will be refactored in an upcoming release.
The authors.yml and related services have been removed. Define authors in the main Hyde config instead.
6 changes: 3 additions & 3 deletions .github/dev-docs/blog-posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ date: "2022-01-01"

```yaml
author: "Mr. Hyde" # Arbitrary name displayed "as is"
author: mr_hyde # Username defined in `authors.yml` config
author: mr_hyde # Username defined in `authors` config
author: # Array of author data
name: "Mr. Hyde"
username: mr_hyde
website: https://mrhyde.example.com
website: https://twitter.com/hyde_php
```

When specifying an array you don't need all the sub-properties.
The example just shows all the supported values. Array values here
will override the values in the `authors.yml` config.
will override all the values in the `authors` config entry.

### Image

Expand Down
3 changes: 1 addition & 2 deletions tests/Feature/AuthorPostsIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
use Tests\TestCase;

/**
* Test that the config/authors.yml feature works in
* Test that the Author feature works in
* conjunction with the static Post generator.
*
* @see AuthorServiceTest
* @see StaticSiteBuilderPostModuleTest
*/
class AuthorPostsIntegrationTest extends TestCase
Expand Down