Commit graph

43 commits

Author SHA1 Message Date
Kunall Banerjee
c60131fdb4 cleanup startup logs (#291) 2017-12-16 16:51:52 -08:00
Hector Ramos
a7d81c629d Resolve conflicts 2017-12-12 12:49:02 -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
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
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
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
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
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
a26bba14c6 Add the ability to provide custom layout (#128)
* Add the ability to provide custom layout

When I designed the system, I added the ability to provide a custom layout that would use arbitrary JavaScript to render some custom pages. This is why files are called "DocsLayout.js", "BlogPostLayout.js"... This ability to customize it was [ripped out](https://github.com/facebook/react-native/blob/master/website/server/convert.js#L78) during the migration to Docusaurus but I need it for the project I'm working on right now (that should remain unnamed!).

This adds back the ability to do it in a way that fits the third party system. In order to provide a new layout:

1) Add a `layout` field in the header of your markdown file:

```js
---
layout: mylayout
---
```

2) In your `siteConfig`, add

```js
  layouts: {
    mylayout: function({React, Marked}) {
      return class extends React.Component {
        render() {
           return React.createElement('div', {}, this.props.metadata.layout);
         }
      }
    }
  }
```

I think that it's a reasonable to add and would unblock me :)

* Update DocsLayout.js
2017-10-18 10:20:13 -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
3b5db4bbf8 2 bug fixes (#98)
* Merge fix

* Updating lock file.

* Bug fix for rss feed truncation...

* Fixes infinite recursive loop for #89

* Removed use of module cache invalidator from feed.js

* Replaced 'latest' babel presets with 'env'

* Ignore temp build folder

* Adding back new truncation logic for RSS

* Updating yarn lock
2017-09-28 14:46:29 -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
Frank Li
cfc6030d23 Fix replacement of relative doc links 2017-08-16 16:17:33 -07:00
Frank Li
43ef3c8142 Add comments 2017-08-15 16:55:38 -07:00
Frank Li
2e33758bef Clean up cache removal function 2017-08-11 11:39:04 -07:00
Frank Li
074ac07837 Small fix 2017-08-10 16:10:30 -07:00
Frank Li
4646fc98c5 Update color configurations 2017-08-10 16:03:43 -07:00
Frank Li
b256d2f8d9 Initial changes to error messages 2017-08-09 15:43:30 -07:00
Frank Li
d2eaf04ec7 Fix markdown html link replacement 2017-08-08 15:44:51 -07:00
Frank Li
94a3265aab Fix blog metadata 2017-08-08 14:58:41 -07:00
Frank Li
9ddd2f5ea4 Merge branch 'master' into versioning 2017-08-08 11:39:23 -07:00
Frank Li
b4e9a068ab Update server to provide message with full link 2017-08-07 11:08:37 -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
67592dcf8a Use versions.json file and move versioned, translated docs into translated_docs 2017-08-03 15:58:56 -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
f3cb4d1860 Merge branch 'master' into sidebar-ordering 2017-07-25 16:34:57 -07:00
Frank Li
ab58eaa9fa Update use of readCategories.js 2017-07-25 16:30:49 -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
b359a2500d Update how separate css files are identified 2017-07-21 12:37:16 -07:00
Frank Li
1edd160ceb Allow separate css files that don't get added to Docusaurus's 2017-07-21 12:13:13 -07:00
Frank Li
ee82575df0 Update server routing for static assets 2017-07-19 10:57:07 -07:00
Frank Li
a455ca9745 Update server routing 2017-07-19 10:50:32 -07:00
Frank Li
e3b99f800b Update server routing for "docs" urls 2017-07-18 16:52:47 -07:00
Frank Li
ea4a4f6fe3 Fix hardcoded port number 2017-07-12 14:43:24 -07:00
Frank Li
2d2f324c7d Add new translate functionality to dev server 2017-07-12 11:38:02 -07:00
Frank Li
099a13a264 Move references to languages and translated strings out of siteConfig.js into new translation.js module 2017-07-11 17:03:27 -07:00
Frank Li
0f6800df10 Allow server port to be chosen and update example 2017-07-11 14:48:57 -07:00
Frank Li
fbae29b0ff Run Prettier 2017-07-10 16:38:35 -07:00
Joel Marcey
e3139eea2f Initial commit 2017-07-07 10:28:29 -07:00