Commit graph

130 commits

Author SHA1 Message Date
cheercroaker
4553afda2b Add missing i18n support in side nav breadcrumb (#482) 2018-03-03 21:40:57 -08:00
cheercroaker
f8486e02ae Add missing i18n support in header link (#477)
* Add missing i18n support in header link

* Format file with prettier
2018-03-03 21:27:04 -08:00
Elian Ibaj
4ff2fe280e Add separate on-page navigation sidebar (#475) 2018-03-03 21:23:59 -08:00
Elian Ibaj
6eb658009b Add function to generate TOC from document headings (#474) 2018-02-27 16:33:48 -08:00
Glavin Wiechert
41750667cd Allow edit URL to be customized with doc metadata (#443) 2018-02-11 16:43:37 -08:00
Tom Auger
2d7274f6fe Blog feed fixes #370 (#407)
* Refactor markdown rendering into separate module

* Render blog feed description in html
2018-02-11 08:05:58 -08: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
Harrison Shoff
c6a9848a17 Add key to stylesheet links in Head.js (#425)
* Add key to config.stylesheets.map in Head.js

* Run prettier on Head.js
2018-01-31 19:59:41 -08:00
Héctor Ramos
61c5d2d8e0 Treat latest version as current version (#418)
If the site is versioned, and the latest version is displayed, the URL will not change. We need to let Algolia know this is the case.
2018-01-25 17:28:25 -08:00
Rick Hanlon II
4c2558e8bd Fix margin for right-aligned images (#398)
Update so imageAlign* has a class for all directions
2018-01-17 19:04:03 -08:00
Joel Marcey
b0f26db3e1
Do not set html lang attribute if there is no language set (#362)
* Do not set html lang attribute if there is no language set

* Prettier fixes
2017-12-27 15:19:32 -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
250395a96a
Better error when parsing headerLinks.doc fields (#337)
Closes #309
2017-12-20 19:47:13 -08:00
Christian Oliff
3e2cfc27ff No need for chromeframe tag (#328)
Remove the unneeded chromeframe tag, it has long since been retired by Google and was only ever needed for very old IE (would render the page in Chrome within IE).
REF: http://www.chromium.org/developers/how-tos/chrome-frame-getting-started
2017-12-20 10:56:00 -08:00
Joel Marcey
ff117979c6 Add language to the version part
just like we did with the language part

otherwise we get `-version-....` ids with no prefixes
2017-12-19 17:51:03 -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
António Afonso
829508797e A bunch of tiny little fixes for issues I found while setting up docusaurus (#312)
* Do not show users related UI if no users have been specified

* Fixed typo in Docusaurus homepage link

* Allow projects without icons

Not every project has an icon, so avoid showing a broken image in that case.

* Do not show project icon in the footer if there's no footer icon
2017-12-18 09:26:33 -08:00
Forbes Lindesay
bf8006f6ba Include a lang property on html node (#295)
Google Chrome guesses the language if this is not present. Large quantities of source code can confuse it and lead to it selecting completely the wrong language.
2017-12-16 20:05:58 -08:00
Joel Marcey
c888bc52b9 Fix og:image URL to make it absolute 2017-12-14 09:53:37 -08:00
Joel Marcey
606029b9ff Fix prettier 2017-12-14 09:38:32 -08:00
Joel Marcey
d6fb14cfa4
Add introductory blog post (#279)
* Add introductory blog post

For launch!

\o/

* Update post to launch date

* Add ogImage and fix how we get og:Description

Plus a few updates to the post

* Remove some code block info
2017-12-14 09:32:49 -08:00
Jan Kassens
b174ee2d2a Update prettier to 1.9.1 (#273) 2017-12-12 12:47:52 -08:00
Héctor Ramos
97612cf20b Link to master version of doc when editing (#262)
* Ensure Edit this Doc links always point to the master source of truth, and not a particular version

* Only show Edit this Doc link if editUrl has been set
2017-12-05 15:44:14 -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
df05fd2bbc Switch Algolia DocSearch to load using https (#252)
* Change docsearch to explicit https
2017-12-04 09:26:44 -08:00
Héctor Ramos
bb48bb4f0c Remove keys warning when loading scripts (#244) 2017-11-27 15:14:55 -08:00
Christopher Chedeau
c407cdf96f Enable stylesheets as a parallel to scripts (#225)
* Enable stylesheets as a parallel to scripts

Also moves the scripts above the custom stylesheet to follow the comment :)

* Update api-site-config.md
2017-11-13 17:54:24 -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
Christopher Chedeau
d5f26a52d4 Add the ability to render html and linkify links (#208)
Marked had the ability to display html code. This is useful if you want to embed iframes, set size to images... This allows arbitrary html to be embedded with no sanitization, so `<script>alert()</script>` will be executed. This isn't such a big issue since the markdown is written only by contributors.

I also removed the componentWillUpdate call since it's not used (and wrong).
2017-11-01 13:40:00 -07:00
Christopher Chedeau
e9c5cef664 Add the ability to define a default language (#206)
* Add the ability to define a default language

I don't want to have to add the language i'm working on to every single block nor do I want to rely on a default heuristic to find the language.

This adds the ability to write

```
highlight: { defaultLang: 'xxxx' }
```

in `siteConfig.js` to force the language when not specified.

I tested it without a a highlight block, without a defaultLang attribute and with one and with a wrong one. All of them work as expected.

* Move comment around
2017-11-01 12:16:15 -07:00
Joel Marcey
b2de777b1e
Add docusaurus-init to the headerlink message (#202) 2017-10-31 09:20:23 -07: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
Ricky Vetter
5263976ad3 move main.css below hljs css (#195) 2017-10-30 10:55:39 -07:00
Joel Marcey
fe516baaa2 Syntax bug fix from #169 2017-10-26 16:29:14 -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
Héctor Ramos
73b9a1128b Switch to GFM-style heading anchors (#164) 2017-10-26 16:12:17 -07:00
Héctor Ramos
ba666cc6ae Remove sourceCodeButton config key (#181) 2017-10-26 12:16:36 -07:00
Hector Ramos
9bb4f906fc Use RegExp with global flag to ensure all fenced code blocks have the hljs class applied 2017-10-26 12:14:46 -07:00
Héctor Ramos
fb294ab845 [markdown] Remove client-side syntax highlighting (#189)
* Remove client side highlighting

* Update CSS rules to render plain code blocks with expected left border

* Add back codeColor background color config

* Ensure all pre code blocks use Highlight.js classes
2017-10-26 12:07:02 -07:00
Joel Marcey
0df005484c Oops - forgot to remove debugging statement 2017-10-24 19:10:29 -07:00
Joel Marcey
7b2e950a4c Add previous and next titles to metadata props 2017-10-24 19:09:34 -07:00
Joel Marcey
429ffda351 Use title of previous and next if no i18n 2017-10-24 16:42:31 -07:00
Joel Marcey
78bd09dec3 Better logic 2017-10-24 16:35:32 -07:00
Joel Marcey
7c1b48b92c Show doc names instead of previous and next
Use the previous and next doc metadata to show docs in the buttons
2017-10-24 16:20:32 -07:00
Eric Nakagawa
867a49dd1c Removes #content from sidebar links and from within pages (#170) 2017-10-24 15:15:52 -07:00
Eric Nakagawa
c2243a3c20 Only show 'Read More' button on blog list page when post has <!-- truncate --> token (#161)
* Only show 'Read More' button on blog list page when the text includes a <truncate> token

* Remove console.log
2017-10-24 13:46:42 -07:00
Héctor Ramos
49034dd6bb Fix Remarkable case issue (#166) 2017-10-24 10:49: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