Dániel Tar
654916ae98
Fix build on Windows ( #381 )
...
Use `path.dirName` instead of a `file.replace` on regex'd replaced string
2018-01-08 15:44:50 -08:00
Joel Marcey
5a77f186b9
Check English translation if language doesn't exist ( #361 )
...
Need this because of https://github.com/facebook/Docusaurus/pull/316
2017-12-27 15:18:58 -08:00
Joel Marcey
5bb062b6f0
Versioning ids should be based on whether translation is enabled ( #333 )
...
* 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
2017-12-20 19:47:51 -08:00
Joel Marcey
665b2da09f
Prettier fix for ce338fff64
2017-12-20 10:07:57 -08:00
Ricky Vetter
ce338fff64
Merge pull request #275 from rickyvetter/wrapPagesHTML
...
add wrapPagesHTML which renders html snippets in pages inside of a header + footer
2017-12-20 10:05:21 -08:00
Joel Marcey
db65f4b7fd
Prettier fix for b96fae035f
2017-12-20 10:03:24 -08:00
António Afonso
b96fae035f
Guard against lack of layouts
in siteConfig.js ( #330 )
...
If a document states a `layout` in its header but `layouts` doesn't exist in `siteConfig.js` the doc would not render.
2017-12-20 09:55:10 -08:00
Joel Marcey
a12ebcd401
Don't translate if we do not have a language
...
This will most likely be because we have not enabled translation
2017-12-19 17:58:49 -08:00
Richard Zhang
a5e963dba1
Issue 305 broken link because of language fixes ( #322 )
...
* 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
2017-12-19 17:44:43 -08:00
Joel Marcey
18c9a2ab31
Revert "Fixing Issue 305 - broken links because of language ( #316 )"
...
This reverts commit 7dc6c6c2da
.
2017-12-19 09:23:41 -08:00
Richard Zhang
7dc6c6c2da
Fixing Issue 305 - broken links because of language ( #316 )
...
* 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
2017-12-19 09:20:32 -08:00
neilsutcliffe
21cbece838
Fixes to testing guide (for Windows only) ( #304 )
...
* 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.
2017-12-18 11:48:53 -08:00
Kunall Banerjee
c60131fdb4
cleanup startup logs ( #291 )
2017-12-16 16:51:52 -08:00
Jan Kassens
d97e2e9d81
Add newlines at end of generated files ( #283 )
2017-12-13 13:55:40 -08:00
Hector Ramos
a7d81c629d
Resolve conflicts
2017-12-12 12:49:02 -08:00
Jan Kassens
b174ee2d2a
Update prettier to 1.9.1 ( #273 )
2017-12-12 12:47:52 -08:00
Ricky Vetter
c22203523f
use faded primaryColor background for inline code snippets instead of link color ( #276 )
2017-12-12 12:46:52 -08:00
Ricky Vetter
786fdbb136
add wrapPagesHTML which renders html snippets in pages inside of a header + footer
2017-12-11 21:46:07 -08:00
Joel Marcey
c9e4f4479d
Prettier fix
2017-12-11 16:41:09 -08:00
Héctor Ramos
11029cf02d
Update build script ( #272 )
...
* Copy dot files if present in the static folder, and add .circleci config to Docusaurus site
* Update docs
2017-12-11 16:32:05 -08:00
Héctor Ramos
ad87bab09b
Fix path to docs assets dir ( #265 )
2017-12-07 10:14:32 -08:00
Héctor Ramos
65421db62e
Add Prettier Formatting ( #258 )
...
* 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
2017-12-04 19:21:02 -08:00
Cheng Lou
76e423fba3
Use path
module instead of string concat /
( #255 )
...
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
2017-12-04 09:32:02 -08:00
Héctor Ramos
1efce743dd
Provide additional debugging information ( #241 )
2017-11-26 21:59:28 -08:00
Héctor Ramos
09726c6361
[Versioning] Fix issue when a doc is added ( #231 )
...
* Simplify function, return error if doc not found
2017-11-15 15:55:08 -08:00
Héctor Ramos
420d2e86fb
Replace diff with string comparison ( #230 )
2017-11-15 12:17:05 -08:00
Héctor Ramos
19e6cc7ecc
Check whether a previous/next doc actually exists ( #226 )
...
* Check whether a previous/next doc actually exists
* Use reasonable defaults
* Remove extraneous space
2017-11-14 20:36:25 -08:00
Eric Nakagawa
8d14f8fb02
Merge pull request #217 from JoelMarcey/custom-docs-subdir
...
Allow custom path for the location of documentation
2017-11-13 13:50:39 -08:00
Christine Abernathy
1d3f71a60a
Fix HTML copy file generation ( #223 )
2017-11-10 15:46:22 -08:00
Joel Marcey
e273dfc13b
Allow the docs not to just be in a folder called docs
...
Also:
- regex escaping
- update api documentation
2017-11-09 09:55:26 -08:00
Joel Marcey
dc0c1390c4
[WIP] Allow custom subpath for docs within the "docs" folder
...
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
2017-11-08 20:16:05 -08:00
Héctor Ramos
09354ab738
[BREAKING] Rename Marked to MarkdownBlock ( #162 )
...
* Switch to Remarkable
* Clean up references to custom code blocks
* Remove valdiateDOMNesting warning
* Add syntax highlighting
* Add Reason support
* Breaking change: prismColor to codeColor, remove CompLibrary.Prism, expose hljs
* Completely remove Prism and associated CSS rules
* Support loading plugins and scripts
* Remove CSS rules, allowing Highlight.js theme to be used entirely
* Remove unnecessary webplayer script
* Rename Marked to MarkdownBlock
* Rename Marked to MarkdownBlock
* Remove Marked.js
2017-10-30 15:47:13 -07:00
Héctor Ramos
459984516b
Ensure some errors are logged to the console ( #194 )
...
* Clarify some error conditions in versioning
* Clarify missing doc error;
* Remove excess space
* Remove excess space part duex
2017-10-30 11:42:45 -07:00
Eric Nakagawa
fa1ec70432
Bug fixes in generatejs ( #169 )
...
* Misc cleanups related to console.log messages in yarn build
* Fixes https://github.com/facebookexperimental/Docusaurus/issues/96
2017-10-26 16:13:56 -07:00
Ricky Vetter
c97da9d3f7
Sitemap local ( #157 )
...
* Better support for localized pages in sitemap
* clean console
2017-10-26 16:12:47 -07:00
Joel Marcey
f72df94dd3
Return empty object instead of false if no metadata ( #182 )
...
Closes #139
2017-10-26 07:02:52 -07:00
Eric Nakagawa
55b0f33f2a
Allows periods in blog file names -- will allow for version numbers, etc ( #163 )
...
* Allows periods in blog file names -- will allow for version numbers, etc
* Removed debug lines...
2017-10-24 19:27:37 -07:00
Joel Marcey
7b2e950a4c
Add previous and next titles to metadata props
2017-10-24 19:09:34 -07:00
Héctor Ramos
b832176dc6
[markdown] Switch to Remarkable ( #153 )
...
* Switch to Remarkable
* Clean up references to custom code blocks
* Remove valdiateDOMNesting warning
* Add syntax highlighting
* Add Reason support
* Breaking change: prismColor to codeColor, remove CompLibrary.Prism, expose hljs
* Completely remove Prism and associated CSS rules
* Support loading plugins and scripts
* Remove CSS rules, allowing Highlight.js theme to be used entirely
* Remove unnecessary webplayer script
2017-10-24 09:45:21 -07:00
Joel Marcey
7e23f3e4ef
Avoid null
enabledLanguages when there is no languages.js file ( #155 )
...
```
var enabledLanguages = languages.filter(function (lang) {
^
TypeError: Cannot read property 'filter' of null
at module.exports
```
2017-10-20 15:19:13 -07:00
Eric Nakagawa
574872d075
Only builds redirect pages if the current file is an english doc ( #152 )
2017-10-19 16:56:14 -07:00
Eric Nakagawa
d8b55fffa4
Fall back to English when strings are missing ( #151 )
2017-10-19 16:41:20 -07:00
Eric Nakagawa
22d0cebc18
Merge pull request #149 from ericnakagawa/noop-redirect
...
Removed copy from redirect page, reduced delay to 0s for js and meta
2017-10-19 13:20:07 -07:00
Eric Nakagawa
7f7459baa5
Merge pull request #148 from ericnakagawa/default-localization-english
...
This PR will create a default set of docs to use when localization is…
2017-10-19 13:19:55 -07:00
Eric Nakagawa
a9571ebf4d
Removed copy from redirect page, reduced delay to 0s for js and meta
2017-10-19 13:15:05 -07:00
Eric Nakagawa
7c80becb87
Fix bug in when running local server
2017-10-19 12:58:57 -07:00
Eric Nakagawa
bf2f0cf935
Typo fix
2017-10-19 10:27:03 -07:00
Eric Nakagawa
bfb28441b4
This PR will create a default set of docs to use when localization is enabled. This allows seeing using the site without having synced with crowdin. Once synced, those files will replace the default set generated by this PR.
2017-10-19 09:57:10 -07:00
Christopher Chedeau
57251a22c0
Ability to tweak the prism language ( #146 )
...
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]*(?=\()/,
});
},
```
2017-10-19 08:21:00 -07:00
Eric Nakagawa
c3a1d99964
Include baseUrl when redirecting /docs/ pages in a localized project ( #147 )
2017-10-19 07:29:48 -07:00