diff --git a/docs/en/commands.html b/docs/en/commands.html index 37b97ac2b2..2806421096 100644 --- a/docs/en/commands.html +++ b/docs/en/commands.html @@ -51,7 +51,7 @@
docusaurus-publish
Alias: publish-gh-pages
Builds, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:
-The following is generally set manually by the user in the CircleCI config.yml
file.
The following environment variables are generally set manually by the user in the CircleCI config.yml
file.
GIT_USER
: The git user to be associated with the deploy commit.USE_SSH
: Whether to use SSH instead of HTTPS for your connection to the GitHub repo.e.g.,
GIT_USER=docusaurus-bot USE_SSH=true yarn run publish-gh-pages
-The following are set by the CircleCI environment during the build process.
+The following environment variables are set by CircleCI during the build process.
CIRCLE_BRANCH
: The git branch associated with the commit that triggered the CI run.CI_PULL_REQUEST
: Expected to be truthy if the current CI run was triggered by a commit in a pull request.The following should be set by you in siteConfig.js
as organizationName
and projectName
, respectively. If they are not set in your site configuration, they fall back to the CircleCI environment.
CIRCLE_PROJECT_USERNAME
: The GitHub username or organization name that hosts the git repo, e.g. "facebook".CIRCLE_PROJECT_REPONAME
: The name of the git repo, e.g. "Docusaurus".CIRCLE_PROJECT_USERNAME
: The GitHub username or organization name that hosts the Git repo, e.g. "facebook".CIRCLE_PROJECT_REPONAME
: The name of the Git repo, e.g. "Docusaurus".You can learn more about configuring automatic deployments with CircleCI in the Publishing guide.
The links in the top navigation bar get siteNavItemActive
and siteNavGroupActive
class names to allow you to style the currently active link different from the others. siteNavItemActive
is applied when there's an exact match between the navigation link and the currently displayed web page.
--This does not include links of type
+href
which are meant for external links only. If you manually set anhref
in your headerLinks to an internal page, document, or blog post, it will not get thesiteNavItemActive
class even if that page is being displayed.This does not include links of type
href
which are meant for external links only. If you manually set anhref
in yourheaderLinks
to an internal page, document, or blog post, it will not get thesiteNavItemActive
class even if that page is being displayed.
siteNavGroupActive
will be added to these links:
The siteNavGroupActive
class will be added to these links:
doc
links that belong to the same sidebar as the currently displayed documentThese are two separate class names so you can have the active styles applied to either exact matches only or a bit more broadly for docs that belong together. If you don't want to make this distinction you can add both classes to the same css rule.
+These are two separate class names so you can have the active styles applied to either exact matches only or a bit more broadly for docs that belong together. If you don't want to make this distinction you can add both classes to the same CSS rule.
We support secondary on-page navigation so you can more easily see the topics associated with a given document. To enable this feature, you need to add the onPageNav
site configuration option to your siteConfig.js
.
onPageNav: 'separate',
diff --git a/docs/en/publishing.html b/docs/en/publishing.html
index 04288eb979..ecde7f63bb 100644
--- a/docs/en/publishing.html
+++ b/docs/en/publishing.html
@@ -86,7 +86,7 @@
steps:
- checkout
- - run:
+ - run:
name: Deploying to GitHub Pages
command: |
git config --global user.email "<GITHUB_USERNAME>@users.noreply.github.com"
@@ -113,7 +113,7 @@
If you would rather use a deploy key instead of a personal access token, you can by starting with the Circle CI instructions for adding a read/write deploy key.
-Tips & Tricks
+Tips & Tricks
When initially deploying to a gh-pages
branch using Circle CI, you may notice that some jobs triggered by commits to the gh-pages
branch fail to run successfully due to a lack of tests. You can easily work around this by creating a basic Circle CI config with the following contents:
# Circle CI 2.0 Config File
# This config file will prevent tests from being run on the gh-pages branch.
diff --git a/docs/en/search.html b/docs/en/search.html
index 8679794c28..0da958d675 100644
--- a/docs/en/search.html
+++ b/docs/en/search.html
@@ -22,9 +22,9 @@
...
algolia: {
...
- algoliaOptions: {
- facetFilters: [ "tags:VERSION" ],
- hitsPerPage: 5
+ algoliaOptions: {
+ facetFilters: [ "tags:VERSION" ],
+ hitsPerPage: 5
}
},
}
diff --git a/docs/en/translation.html b/docs/en/translation.html
index ed560ffcb2..4bb9f3178b 100644
--- a/docs/en/translation.html
+++ b/docs/en/translation.html
@@ -79,8 +79,8 @@ const translate = require("../../server/translate.js").translate;
Other Pages
For other pages, Docusaurus will automatically transform all <translate>
tags it finds into function calls that return the translated strings from the corresponding localized file locale.json
.
Crowdin
-Crowdin is a company that provides translation services. For Open Source projects, Crowdin provides free string translations
-Create your translation project on Crowdin. You can use Crowdin's guides to learn more about the translations work flow. We suggest that you deselect and do not include "English" as a translateable language to prevent the creation of en-US
localization files as this can lead to confusion.
+Crowdin is a company that provides translation services. For Open Source projects, Crowdin provides free string translations.
+Create your translation project on Crowdin. You can use Crowdin's guides to learn more about the translations work flow. We suggest that you deselect and do not include "English" as a translatable language to prevent the creation of en-US
localization files as this can lead to confusion.
Ensure in your Crowdin settings, in the Translations section, that "Duplicate Strings" are set to "Hide - all duplicates will share the same translation". This setting will ensure that identical strings between versions share a single translation.
@@ -89,7 +89,7 @@ const translate = require("../../server/translate.js").translate;
You will need to install the crowdin
command line interface. Please follow the installation directions.
The example below can be automatically generated by the Docusaurus cli with the examples
script. It should be placed in the top level of your project directory to configure how and what files are uploaded/downloaded.
-Below is an example Crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Behasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.
+Below is an example Crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Bahasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.
project_identifier_env: CROWDIN_DOCUSAURUS_PROJECT_ID
api_key_env: CROWDIN_DOCUSAURUS_API_KEY
base_path: "./"
@@ -113,8 +113,8 @@ const translate = require("../../server/translate.js").translate;
You can go here to learn more about customizing your crowdin.yaml
file.
Setup the Crowdin Scripts
-You will want to manually sync your files to and from crowdin. The sync process will upload any markdown files in /docs
as well as translatable strings in website/i18n/en.json
. (These strings can be generated by running yarn write-translations
.)
-You can add the following to your package.json
to manually trigger crowdin.
+You will want to manually sync your files to and from Crowdin. The sync process will upload any markdown files in /docs
as well as translatable strings in website/i18n/en.json
. (These strings can be generated by running yarn write-translations
.)
+You can add the following to your package.json
to manually trigger Crowdin.
"scripts": {
"crowdin-upload": "crowdin --config ../crowdin.yaml upload sources --auto-update -b master",
"crowdin-download": "crowdin --config ../crowdin.yaml download -b master"
@@ -129,7 +129,7 @@ const translate = require("../../server/translate.js").translate;
YOUR_CROWDIN_PROJECT_ID
is the name of your Crowdin project. e.g., for https://crowdin.com/project/docusaurus/, that variable would be set to docusaurus
. YOUR_CROWDIN_API_KEY
is a unique key that is like a password. You can find it in the API
tab of your Crowdin project's Settings
.
-These commands require having an environment variable set with your crowdin project id and api key (CROWDIN_PROJECT_ID
, CROWDIN_API_KEY
). You can preface them inline as done above or add them permanently to your .bashrc
or .bash_profile
.
+These commands require having an environment variable set with your Crowdin project id and api key (CROWDIN_PROJECT_ID
, CROWDIN_API_KEY
). You can preface them inline as done above or add them permanently to your .bashrc
or .bash_profile
.
If you run more than one localized Docusaurus project on your computer, you should change the name of the environment variables to something unique (CROWDIN_PROJECTNAME_PROJECT_ID
, CROWDIN_PROJECTNAME_API_KEY
).
diff --git a/docs/en/versioning.html b/docs/en/versioning.html
index 76d06d7fa8..9671ab29b9 100644
--- a/docs/en/versioning.html
+++ b/docs/en/versioning.html
@@ -31,7 +31,7 @@
You can create version numbers in whatever format you wish, and a new version can be created with any version number as long as it does not match an existing version. Version ordering is determined by the order in which versions are created, independently of how they are numbered.
Storing Files for Each Version
Versioned documents are placed into website/versioned_docs/version-${version}
, where ${version}
is the version number you supplied the version
script.
-The markdown header for each versioned doc is altered by renaming the id frontmatter field to original_id
, then using "version-${version}-${original_id}"
as the value for the actual id
field.
+The markdown header for each versioned doc is altered by renaming the id front matter field to original_id
, then using "version-${version}-${original_id}"
as the value for the actual id
field.
Versioned sidebars are copied into website/versioned_sidebars
and are named as version-${version}-sidebars.json
.
A website/versions.json
file is created the first time you cut a version and is used by Docusaurus to detect what versions exist. Each time a new version is added, it gets added to the versions.json
file.
If you wish to change the documentation for a past version, you can access the files for that respective version.
diff --git a/en/index.html b/en/index.html
index 5f31db9f56..64aaa25f62 100644
--- a/en/index.html
+++ b/en/index.html
@@ -39,11 +39,11 @@ along with some other special documentation
If you have ideas for useful features, feel free to
contribute on GitHub!


Christopher "vjeux" Chedeau
Lead Prettier Developer
-
I’ve helped open source many projects at Facebook and every one needed a website. They all had very similar constraints: the documentation should be written in markdown and be deployed via GitHub pages. None of the existing solutions were great, so I hacked my own and then forked it whenever we needed a new website. I’m so glad that Docusaurus now exists so that I don’t have to spend a week each time spinning up a new one.
+I've helped open source many projects at Facebook and every one needed a website. They all had very similar constraints: the documentation should be written in markdown and be deployed via GitHub pages. None of the existing solutions were great, so I hacked my own and then forked it whenever we needed a new website. I’m so glad that Docusaurus now exists so that I don’t have to spend a week each time spinning up a new one.

Hector Ramos
Lead React Native Advocate
-
Open source contributions to the React Native docs have skyrocketed after our move to Docusaurus. The docs are now hosted on a small repo in plain markdown, with none of the clutter that a typical static site generator would require. Thanks Slash!
+Open source contributions to the React Native docs have skyrocketed after our move to Docusaurus. The docs are now hosted on a small repo in plain markdown, with none of the clutter that a typical static site generator would require. Thanks Slash!

Ricky Vetter
ReasonReact Developer
-
Docusaurus has been a great choice for the ReasonML family of projects. It makes our documentation consistent, i18n-friendly, easy to maintain, and friendly for new contributors.
+Docusaurus has been a great choice for the ReasonML family of projects. It makes our documentation consistent, i18n-friendly, easy to maintain, and friendly for new contributors.