-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Allow customizing of blog author image URL documentation #577
Conversation
Update documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except that we should document the authorImageURL
field instead as a separate field and make it clear that users should only specify one of them. If they specify both, authorImageURL
will override authorFBID
.
Out of the top Docusaurus users, it seems like only react-native-website's blog is using authorImage
. We will have break the blog if we merge this with the name change. Then again, since it's undocumented, it's probably acceptable to break it.
I think the best way moving forward is to:
- Add in
authorImageURL
and document it - Add support for both
authorImage
andauthorImageURL
in Docusaurus - Send a PR to react-native-website to migrate them from
authorImage
toauthorImageURL
- Remove support for
authorImage
in Docusaurus
cc @JoelMarcey @hramos for opinions
docs/guides-blog.md
Outdated
@@ -32,7 +32,7 @@ authorFBID: 503283835 | |||
title: Introducing Docusaurus | |||
--- | |||
|
|||
Lorem Ipusm.. | |||
Lorem Ipusm... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're touching this line, could you correct it to Ipsum? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/guides-blog.md
Outdated
@@ -42,7 +42,7 @@ The only required field is `title`; however, we provide options to add author in | |||
|
|||
- `author` - The text label of the author byline. | |||
- `authorURL` - The url associated with the author. This could be a Twitter, GitHub, Facebook account, etc. | |||
- `authorFBID` - The Facebook ID that is used to extract the profile picture. | |||
- `authorFBID` - The Facebook ID that is used to extract the profile picture. (Note: If you prefer to use a different image than the Facebook profile picture, put `authorImageURL` instead.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authorImageURL
should be documented as a separate field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the documentation. Let me know if you want any edits, was tricky to know the best way to write this one clearly.
lib/core/BlogPost.js
Outdated
@@ -56,11 +56,11 @@ class BlogPost extends React.Component { | |||
</a> | |||
</div> | |||
); | |||
} else if (post.authorImage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize there already exists an option to customize the author thumbnail via authorImage
because it's undocumented...
@yangshun I agree with your approach to slowly phase out the old name. 👍 |
71c2f72
to
162316a
Compare
We will remove support for authorImage in favor of authorImageURL, after we remove authorImage from react-native-website
162316a
to
342dbc1
Compare
I posted updates for items 1 and 2 in this branch - let me know what you think. I created a branch for 3 here where I replaced |
Looks great! 🎉 |
@JoelMarcey Could you release a new version of Docusaurus so that we can update sites that depends on |
Thanks! For 3, posted this: facebook/react-native-website#314 |
@yangshun I think I can get out a version today. |
authorImage was replaced by authorImageURL in facebook#577 authorImage was removed in react-native-website in facebook/react-native-website#314
authorImage was replaced by authorImageURL in facebook#577 authorImage was removed from react-native-website in facebook/react-native-website#314 authorImage was undocumented, so no docs changes
authorImage was replaced by authorImageURL in facebook#577 authorImage was removed from react-native-website in facebook/react-native-website#314 authorImage was undocumented, so no docs changes
authorImage was replaced by authorImageURL in #577 authorImage was removed from react-native-website in facebook/react-native-website#314 authorImage was undocumented, so no docs changes
Motivation
@yangshun and I discussed this issue at our Week 2 meeting. Let me know what you think!
Have you read the Contributing Guidelines on pull requests?
Yes!
Test Plan
First I verified that this functionality already existed by changing Joel's image to Daria.
//
Then I updated the docs. I thought it made sense to rename
authorImage
toauthorImageURL
, which matches existingauthorURL
and is more self-documenting.IS:
WAS:
Related PRs
N/A