Commit Graph

51 Commits

Author SHA1 Message Date
Endilie Yacop Sucipto 21dcea2a31
Integrate eslint & precommit to codebase (#815)
* add eslint, precommit & refactor

* fix exit code 127

* modify contributing.md & add package-lock

* use .eslintrc.js
2018-07-01 12:27:31 +08:00
Rémi Doreau a77ae958db Duplicate code in readMetadata.js & versionFallback.js #725 (#726)
* Duplicate code in readMetadata.js & versionFallback.js #725

* Putting back package-lock.json

* Rename lib/server/utilsMetadata.js -> lib/server/metadataUtils.js

* Update splitHeader + extractMetadata

* Update prettier
2018-06-12 12:25:23 +08:00
Endilie Yacop Sucipto 6244bb1aa4 Fix typo in code comment (#747) 2018-06-10 02:17:08 -07:00
Endilie Yacop Sucipto d04b3ca87b Enable sub-directories in docs/ (#705) 2018-06-07 07:41:28 -07:00
Steven Zeck df6f6df333 Do not ignore 'custom_edit_url' (#604) 2018-04-25 10:40:53 -07:00
Christopher Chedeau c400636fb6 Do not ignore the `layout` header (#587)
#347 added support for warning for unknown fields but didn't take into account `layout` which was added by #128
2018-04-20 09:19:57 -07:00
Joel Marcey 86edbec1d0
Split out @generated string (#553)
Nuclide treats files with @generated as read-only. This can fix that.
2018-04-12 14:11:01 -07:00
Joel Marcey 71278431f1 Add hide_title to metadata check whitelist 2018-04-11 18:02:25 -07:00
António Afonso ad5b8b92b4 Ignore and warn about unsupported header fields (#347)
Unsupported header fields might mess up the creation of metadata.js (e.g.: next).
Skip unknown header fields and log a warn about them.
2018-04-11 17:45:03 -07:00
Eric Nakagawa dfb70e1829 Allow controlling number of blog posts in Recent Blogs sidebar. (#432)
New feature. Allow controlling number of blog posts in Recent Blogs sidebar. Can have qty or ALL.
2018-02-02 08:11:51 -08:00
Sunny Luo 43e80fcea7 Fix regex for non english versioned docs (#412) 2018-01-23 13:23:33 -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
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
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
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
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 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
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
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
Eric Nakagawa a4695a3083 Code cleanups for consistency & adds Docusaurus to meta tags (#138)
* Add a made with Docusaurus meta tag

* Code cleanups and changes for clarity

* Add back pages string extraction
2017-10-18 14:40:16 -07:00
Eric Nakagawa bcba05ae03 Adds sitemap.xml. Adds 'Help Translate' to translatable strings. Error messages and fn name cleanups. (#136)
* added a note about needing more than one language to be enabled to allow for a drop down

* Removing debug statements

* Add 'Help Translate' to translatable strings, improves error messages around missing translated strings, calls write-translations on some routes

* Adds sitemap.xml to live server and build. Versioning not supported. -- Also did some file name and module cache cleanups.
2017-10-18 12:55:58 -07:00
Christopher Chedeau 5693eba5d1 Allow for header and empty body (#127)
My hack of checking if the body was empty wasn't correct :(

```js
---
id: String
title: String
layout: stdlib
---
```

The above would be treated as pure content. Now it's working properly :)
2017-10-18 10:16:30 -07:00
Joel Marcey 77535d80f2 The complete move to MIT license (#115)
- headers in .js files
- update README and LICENSE year

Testing:

grep BSD, Patents, patents turned up nothing
2017-10-05 11:14:49 -07:00
Eric Nakagawa dc835770a0 RSS/ATOM Feed added, Prism changes, and global Copyright notice. (#94)
* Add Reason support to Prism.js

* Add XML/ATOM feed. Generates for both localhost and build script. Adds meta links to feeds to all html files.

* Updated /core/Footer.js to pull from siteConfig
2017-09-27 12:49:09 -07:00
Eric Nakagawa b241ed4404 Prints an console error if /blog/ folder has no files. 2017-09-25 12:11:37 -07:00
Frank Li 43ef3c8142 Add comments 2017-08-15 16:55:38 -07:00
Frank Li ae4c577237 Fix to metadata ids 2017-08-14 10:19:01 -07:00
Frank Li 964e9e2108 Update doc metadata to use file name as id fallback and id as title fallback 2017-08-10 14:51:34 -07:00
Frank Li b256d2f8d9 Initial changes to error messages 2017-08-09 15:43:30 -07:00
Frank Li b94dbff181 Fix versioning bugs 2017-08-08 11:44:30 -07:00
Frank Li 9ddd2f5ea4 Merge branch 'master' into versioning 2017-08-08 11:39:23 -07:00
Frank Li 4b96408fa5 Rename sidebar.json to sidebars.json 2017-08-07 17:25:52 -07:00
Frank Li 09ca732402 Allow document not in sidebar.json to be displayed 2017-08-07 15:15:09 -07:00
Frank Li 63043c041a Add version header link and change current docs to be version 'next' 2017-08-04 12:41:13 -07:00
Frank Li 3598dffc58 Add versioning functionality 2017-08-03 10:25:01 -07:00
Frank Li 6d2b6740c1 Clean up API changes 2017-08-02 15:13:10 -07:00
Frank Li 419e0c0ff9 Initial API refactor 2017-07-31 16:19:02 -07:00
Frank Li abc5e325cd Use information from "docSidebar.js" file instead of doc front matters for sidebars. 2017-07-24 13:33:58 -07:00
Frank Li 2585dfa1f9 Skip processing any docs with empty/no front matter instead of throwing error 2017-07-17 12:25:36 -07:00
Frank Li fbae29b0ff Run Prettier 2017-07-10 16:38:35 -07:00