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 undefined variable error when adding custom page #676

Merged
merged 1 commit into from
May 19, 2018

Conversation

endiliey
Copy link
Contributor

Motivation

I tried to add a custom page to Docosaurus
buggg

Build the static files

cd website
yarn build

But got an error en is not defined
en undefined

This is because of a typo
https://github.com/facebook/Docusaurus/blob/b66045f28478e05a7de701bb644412c1898fc0af/lib/server/generate.js#L533

It should be
writeFileAndCreateFolder(targetFile.replace(sep + 'en' + sep, sep), str);

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

cd website
yarn build

success

Run test in root folder

yarn test

pass

Related PRs

#490

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 19, 2018
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented May 19, 2018

Deploy preview for docusaurus-preview ready!

Built with commit 60a9ec1

https://deploy-preview-676--docusaurus-preview.netlify.com

`'en'` is written as `en`
Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮 Wow! Super great catch!

@JoelMarcey JoelMarcey merged commit 24da6bf into facebook:master May 19, 2018
@endiliey
Copy link
Contributor Author

endiliey commented May 19, 2018

I'm working on a PR for #413, so I had to read all the relevant codes 😄

@endiliey endiliey deleted the patch-1 branch May 21, 2018 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants