First go at adding authors. #116
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the first step for for adding authors by allowing author bylines to be configured per page. Closes #103
You add an
authorsarray in your front matter like so:Then you add details of each author to
docusaurus.config.jseach being an object like this:If no image is present for an author, a default fallback silhouette image will be used.
linkcan be any link you want for now... long term the idea is we'd link to an author page and have a bio and socials about each author there.I then overrode the
DocItemcomponent from the theme, and added extra JSX to render these values in a really basic way to prove it works... we can style these more in a future PR and also create a page per author with their bio and articles they have written.Here's an example of what it looks like. The Hacktoberfest page has authors set on it as an example. If none are set, the component doesn't render anything and the page won't have the author information.
I've also updated the README to cover how to add an author.