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

fix(v2): deprecate docs homePageId in favor of frontmatter "slug: /" #3228

Merged
merged 2 commits into from
Aug 6, 2020

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Aug 6, 2020

Motivation

homePageId is not the best solution, as it is global across all versions. If we want to update the id of the home docs of current version, this will break the homepage for former version.

Frontmatter slug: / is more reliable, quite intuitive, and allows to set a different homepage for each version independently. Versions become more easily "sandboxed"

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Tests + Dogfooding

@slorber slorber requested a review from yangshun as a code owner August 6, 2020 15:44
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 6, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 57f8623

https://deploy-preview-3228--docusaurus-2.netlify.app

@slorber slorber added pr: maintenance This PR does not produce any behavior differences to end users when upgrading. pr: bug fix This PR fixes a bug in a past release. and removed pr: maintenance This PR does not produce any behavior differences to end users when upgrading. labels Aug 6, 2020
@slorber slorber merged commit 0a33a52 into master Aug 6, 2020
@yangshun yangshun deleted the slorber/remove-homePageId branch August 26, 2020 02:00
Addono added a commit to unveiler-io/developer-website that referenced this pull request Sep 12, 2020
@gabrielcsapo
Copy link
Contributor

Will this be added to categories @slorber ? We would like to avoid using frontmatter for certain docs we are generating.

@slorber
Copy link
Collaborator Author

slorber commented Aug 13, 2021

@gabrielcsapo I don't understand what you mean by "added to categories" here.

About frontmatter, I plan to add a generic createFrontMatter option that will allow you to provide doc frontmatters "from the outside" (ie the md file does not need to have any frontmatter)

@gabrielcsapo
Copy link
Contributor

That would be awesome @slorber! This would be similar to editUrl function in the config?

@slorber
Copy link
Collaborator Author

slorber commented Aug 17, 2021

Not sure what you mean by "similar", but in a sense yes it will also be a callback giving you additional control, to inject/filter/replace/enhance the frontmatter of any doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants