Commit graph

2513 commits

Author SHA1 Message Date
Ricky Vetter
30eea17a24 upstream small screen header changes (#141) 2017-10-18 12:44:28 -07:00
Ricky Vetter
768ed88978 Add option to avoid indexing site (#142) 2017-10-18 11:35:30 -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
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
Ricky Vetter
a794897d85 switch to fbids (#135) 2017-10-18 10:02:12 -07:00
Ricky Vetter
967d0b7f3c Make some changes to font size/spacing (#134) 2017-10-18 10:01:06 -07:00
Ricky Vetter
e85e0822e5 Use fixed position on mobile nav (#133) 2017-10-18 09:58:41 -07:00
Ricky Vetter
e723d21113 normalize header padding (#132) 2017-10-18 09:53:08 -07:00
Ricky Vetter
e466c60481 Remove author name when unused (#131) 2017-10-18 09:52:23 -07:00
Ricky Vetter
fe938cd5b4 align search bar better (#130) 2017-10-18 09:51:16 -07:00
Ricky Vetter
3ec5da2b4e Remove active item bolding in sidebar (#122) 2017-10-12 14:21:34 +01:00
Ricky Vetter
524c577788 Add more robust font stack (#121) 2017-10-12 14:12:26 +01:00
Joel Marcey
348ca219b7 Bump docusuarus-init version 2017-10-06 13:09:47 -07:00
Joel Marcey
f55e09a427 Bump the version number to Beta 1
\o/
2017-10-06 12:59:22 -07:00
Joel Marcey
d3018dcb5b Docusaurus documentation license (#118)
CC 4.0 Attribution
2017-10-06 12:59:01 -07:00
Eric Nakagawa
8ac191a331 Fixes #104 by providing a useful error message.
Next step will be to run 'write-translations' on 'yarn start' and 'yarn build' (#119)
2017-10-06 12:16:27 -07:00
Joel Marcey
a1810c99fc Remove dependency from website package.json (#117)
This isn't needed and we don't need to keep up with it everytime we push a package.

We only have to keep up with the versioning in the main package.json
2017-10-06 10:36:37 -07:00
Joel Marcey
5e4ee88153 Admin: Info for testing Docusaurus with Docusaurus (#116) 2017-10-06 10:36:19 -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
Joel Marcey
01ebbb1512 Check for required folders based upon headerLinks right up front (#111)
I was getting this error when running the examples:

```
Error: It looks like you've enabled language support, but haven't provided translated files. The document with id: 'en-doc1' doesn't exist.
```

However, this error was an indirect result of me not renaming the `docs-examples-from-docusaurus` directory to `docs` since I had `doc` in my
`headerLinks` in the example siteConfig.js.

So let's check the headerLinks and make sure we have the required directories.

Here is an example of the error if I try to load a Docusaurus site just after running `npm run examples` without having renamed the directories.

```
Error: You have 'doc' in your headerLinks, but no 'docs' folder exists one level up from 'website' folder. Are you running the examples? If so, make sure you rename 'docs-examples-from-docusaurus' to 'docs'.
    at /Users/joelm/dev/test/website/node_modules/docusaurus/lib/core/nav/HeaderNav.js:226:15
:
:
```

Test Plan: Tested a local package in verdaccio
2017-10-05 11:14:27 -07:00
Joel Marcey
3558f8ca4e Ignore package-lock.json (#114) 2017-10-04 20:15:43 -07:00
Joel Marcey
a73438f02c Admin: Using a local Docusaurus package for testing (#110)
This is good if you want to test your latest code changes without publishing to the real npm server.

Two ways:

1. install package from the Docusaurus repo itself (note the clowntown I had to run into - we can talk about this @hramos)
2. Use verdaccio (or other local npm server)
2017-10-04 20:00:31 -07:00
Héctor Ramos
14dfcff769 Support algoliaOptions object as value in siteConfig.js (#113) 2017-10-04 19:13:30 -07:00
Joel Marcey
56e7c41893 Case sensitive requires 2017-10-04 09:17:07 -07:00
Héctor Ramos
053f384cfe Add web player files (#112) 2017-10-04 09:10:33 -07:00
Héctor Ramos
419a11af3e Extend Marked.js in order to support React Native's code players (#109)
* Extend Marked.js to support SnackPlayer and the WebPlayer, as used in React Native
2017-10-04 08:56:55 -07:00
Joel Marcey
069d5b3870 MIT License (#108) 2017-10-03 15:35:08 -07:00
Joel Marcey
ce0e55ee9b Admin: How to publish to npm (#107)
This starts our admin section of docs, in .md format
2017-10-03 15:24:38 -07:00
Ricky Vetter
9c7d8e55a9 add sourceCodeButton to site config (#93) 2017-10-03 15:20:35 -07:00
Joel Marcey
a3d1fb693b Bump version to alpha.42 2017-10-03 10:38:45 -07:00
Eric Nakagawa
73fb334599 Merge pull request #106 from JoelMarcey/fix-circular-json
Add back babel preset for React plugins package
2017-10-03 10:30:43 -07:00
Joel Marcey
9274b2a849 Add back babel preset for React plugins package
This fixes the circular JSON error in https://github.com/facebookexperimental/Docusaurus/issues/89

Maybe its not the best workaround here, but I think it does the trick.

Fixes #89
2017-10-02 18:57:58 -07:00
Joel Marcey
0d88c7d430 Remove duplicative publish doc 2017-09-29 15:38:58 -07:00
Eric Nakagawa
a818d8fd7a Update README, clean up getting started sections (#100) 2017-09-29 15:38:03 -07:00
Héctor Ramos
5c2c8570d2 Publishing your site Guide (#55) 2017-09-29 15:31:27 -07:00
Joel Marcey
a44cda05c5 Bump npm version to alpha 41 2017-09-28 14:49:15 -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
Joel Marcey
f26db92a46 Bump npm version 2017-09-27 15:31:20 -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
92ce92ee59 Merge pull request #91 from facebookexperimental/rickyvetter-patch-2
Fix link for logo
2017-09-26 13:41:13 -07:00
Eric Nakagawa
0c66a898b6 Add Reason support to Prism.js (#92) 2017-09-26 10:29:09 -07:00
Eric Nakagawa
effd1113ad Merge pull request #88 from ericnakagawa/master
Removed a redundant feature, added an error message to help troubleshooting building localized sites.
2017-09-26 10:22:43 -07:00
Ricky Vetter
c72da0c225 Fix link for logo
On projects where baseUrl is "/", the extra slash causes issues.
2017-09-25 23:08:06 -07:00
Héctor Ramos
3f2e8d3715 Update package.json 2017-09-25 14:37:47 -07:00
Héctor Ramos
45f6ef8fd9 Blog enhancements (#80)
* Small CSS adjustments.

* Blog adjustments.

* Add support for Prism in the blog
2017-09-25 12:53:54 -07:00
Héctor Ramos
a484893c4f Small CSS adjustments. (#79) 2017-09-25 12:52:58 -07:00
Eric Nakagawa
b241ed4404 Prints an console error if /blog/ folder has no files. 2017-09-25 12:11:37 -07:00
Eric Nakagawa
a86af92e7c Remove customCssFileName as any css file in /static/css gets appended to end of main.css 2017-09-25 11:35:35 -07:00
Eric Nakagawa
e71b4d902e Provide a more useful error in event someone tries to build site but hasn't provided localized files 2017-09-25 11:35:35 -07:00
Eric Nakagawa
f48ff77322 Merge pull request #81 from ericnakagawa/master
Several Docusaurus, Website changes and enhancements.
2017-09-25 11:35:12 -07:00