* Versioning ids should be based on whether translation is enabled
Ref: ff117979c6 and a5e963dba1
Tested locally on:
Docusaurus
Relay
Test site from `npm run examples`
* Prettier
* without having having to worry about site design.
Let me know if double having is intentional
* distinguish case of no translation and en lang
* prettier recommends
* distinguish case of no translation and en lang
* prettier recommends
* merge with latest origin/master changes
* typo
* link with language fixes
* do not show language dropdown if only one enabled
* check translation outside of LanguageDropDown.render
* without having having to worry about site design.
Let me know if double having is intentional
* distinguish case of no translation and en lang
* prettier recommends
* distinguish case of no translation and en lang
* prettier recommends
* merge with latest origin/master changes
* typo
* Fixes to testing guide (for Windows only)
* Fixed line ending detection for UNIX and Windows
* Removed incorrect instructions about translations
* Removed redudant heading and turned it into a note.
* Add Prettier formatting to source files and example files, and check that Prettier formatting is maintained on PRs
* Remove trailing-comma as we are using Node 6 on Circle
* Use latest Node 6 LTS version in Circle
* Remove unused test
This also in part prepares for #253. I discovered a bug when setting `projectName` to `""`, and some `"build/" + projectName + "/foo"` concatenated into `"build//foo"`. Granted, it's a hack, but we should use `path` anyway.
Test: tested on https://github.com/BuckleScript/bucklescript.github.io. Seems working
e.g.,
The default is
`docs/*.md`
This allows
`docs/somedir/*.md`
or
`docs/somedir/anotherdir/*.md`
Notes:
- All URLs are still /docs/*.html (i.e. the subpath does not get preserved in the link).
- Files in `translated_docs`, if any, will still only be one level
- This should not affect translations or versioning
I want to be able to tweak the default tokenizer for syntax highlighting. The current one isn't as good as it could be.
With this PR, I would be able to add this to the siteConfig and it would give me the Prism access so that I can get proper syntax highlighting:
```js
prism: function(Prism) {
Prism.languages.javascript = Prism.languages.extend("javascript", {
keyword: /\b(alias|as|async|await|base class|...|with)\b/,
constant: /\b[A-Z][a-zA-Z0-9_]*\b/,
builtin: /\bopen_file|...|invariant_violation|invariant|getcwd\b/,
function: /\b[_$a-z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/,
});
},
```
Without this a build failure would occur for those that are not using the languages.js file.
e.g.,
```
sitemap.js triggered...
module.js:471
throw err;
^
Error: Cannot find module '/home/ubuntu/fasttext-website/website/languages.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at module.exports (/home/ubuntu/fasttext-website/website/node_modules/docusaurus/lib/server/sitemap.js:48:15)
at execute (/home/ubuntu/fasttext-website/website/node_modules/docusaurus/lib/server/generate.js:316:5)
at Object.<anonymous> (/home/ubuntu/fasttext-website/website/node_modules/docusaurus/lib/build-files.js:31:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
Error: generating html failed
```