Commit graph

164 commits

Author SHA1 Message Date
Endilie Yacop Sucipto
c8bc00a3a7 Enable using Prism for syntax highlighting (#735)
* Enable user to use prism.js as syntax highlighter

* add package-lock

* if 'usePrism' is true, use prismjs on all languages

* don't get lang by hljs if use prism

* Update api-site-config.md

* Update api-doc-markdown.md

* only load prism css when usePrism is true
2018-06-09 11:38:01 -07:00
Endilie Yacop Sucipto
ff93ba9853 Translation language respect current url (#734) 2018-06-07 08:15:35 -07:00
Endilie Yacop Sucipto
d04b3ca87b Enable sub-directories in docs/ (#705) 2018-06-07 07:41:28 -07:00
Eric Nakagawa
49c27b733b Adds right-sidebar navigation made available in #475 to Blog Post pages (#682) 2018-06-06 14:20:18 -07:00
Endilie Yacop Sucipto
31f0c27f81 Enable clean / extension-less url (#677) 2018-06-06 13:37:49 -07:00
Lespagnol Rémy
aee255219b Add a scroll to top button siteConfig option (#723) 2018-06-06 12:34:32 -07:00
Endilie Yacop Sucipto
aae106c018 Enable Facebook comments on blog posts (#673)
* Enable comment on blog post

* adjust css

* Tweak
2018-05-19 09:26:57 -07:00
Endilie Yacop Sucipto
f8521c2fe1 Enhance footer with Facebook and Twitter buttons (#666)
* enhance footer with social media buttons

* Update api-site-config.md

* Update Footer.js

* fix minor issue on social-footer

* update facebookAppId description in api-site-config

* rm heading & pad footer social button

* Update api-site-config.md
2018-05-17 21:26:06 -07:00
Amy Lam
f9a09072e3 Add LiveReload (#663) 2018-05-17 16:17:56 -07:00
Agastya Darma
25cf8bb786 Migrate to React 16 (#655)
* migrating to react 16

* Add WarriorJS to Docusaurus users (#656)

* Separate users data from code

* Add WarriorJS to Docusaurus users

* [Feature] Introducing image compression using imagemin (#654)

* Introduce imagemin for compressing images

* Replace original images with the optimized ones

* Add imagemin-svgo to dependencies

* Remove console statement, replace let with const

* Replace let with const

* Add --skip-image-compression

* Run Prettier

* Fix header

* Prettier
2018-05-09 19:58:47 -07:00
Amy Lam
873a2427f9 Remove authorImage (#652)
authorImage was replaced by authorImageURL in https://github.com/facebook/Docusaurus/pull/577

authorImage was removed from react-native-website in https://github.com/facebook/react-native-website/pull/314 

authorImage was undocumented, so no docs changes
2018-05-07 23:58:52 -07:00
Yangshun Tay
8d676e6a5a
Extract blog post truncation logic and add tests (#640) 2018-05-06 09:15:18 -07:00
Erin Teo
5771549e75 Rename latestVersion to defaultVersion (#639)
* Rename lastVersion to defaultVersion

* Added defaultVersionShown to site-config doc

* Remove defaultVersionShown from siteConfig

* Update api-site-config.md
2018-05-05 17:24:39 -07:00
Yangshun Tay
545a053289 Add Facebook copyright headers (#633) 2018-05-04 09:40:07 -07:00
Yangshun Tay
be54c8f035 Fix header anchor alignment (#635) 2018-05-04 08:29:04 -07:00
Sviatoslav
9c98142fea Ensure anchor links are unique per document (#574) 2018-05-03 19:36:12 -07:00
Amy Lam
7fa0f910ac On mobile, hide title if logo exists (#629)
* On mobile, hide title if logo exists

* Run Prettier, use ternary, reorder

* Rename class for clarity

* Update main.css
2018-05-03 10:54:25 -07:00
Fabrizio Ruggeri
976ae770b5 Allow Google Analytics to use gtag.js (#601)
* Moved google analytics script to head

The code now uses the new gtag script to track the website on google analytics.
The migration is explained [here](https://developers.google.com/analytics/devguides/collection/gtagjs/migration).
This will help to solve issues such as #375.
As indicated at https://support.google.com/analytics/answer/1008080
the analytics code must be placed in the head tag, so it is moved there.

* Add a boolean to use the new gtag library

* Update api-site-config.md
2018-04-29 10:44:11 -07:00
huang.xinghui
aa32ff4a55 Add customize highlight.theme custom path support (#517)
* add themeUrl option to support custom theme file path

* Update api-site-config.md
2018-04-19 08:04:49 -07:00
Amy Lam
57cddb4d08 Allow customizing of blog author image URL documentation (#577)
* Rename authorImage to authorImageURL for clarity

Update documentation

* Fix typo

* Add documentation for authorImageURL

* Add support for authorImage

We will remove support for authorImage in favor of authorImageURL, after we remove authorImage from react-native-website

* Update guides-blog.md

* Update guides-blog.md
2018-04-17 23:15:27 -07:00
Joel Marcey
e738bbd99e
Add twitterImage to siteConfig options (#580) 2018-04-17 21:04:39 -07:00
Sviatoslav
1642c078a7 Support for non-latin characters in heading anchor links (#492) 2018-04-17 09:33:10 -07:00
Joel Marcey
0e3f3e3013
Fix header nav display for current language (#550)
Even if we were on Spanish pages, it still showed English in the Header nav.
This makes it so that the Header nav shows the currently selected language.
2018-04-12 08:45:02 -07:00
Jason Gauci
6dd6ead19f Add hide_title metadata that hides the title text on the top of the doc (#540) 2018-04-11 17:56:56 -07:00
Amy Lam
80ece69a10 Add form field title for a11y (#542)
* Add input title to improve a11y

Resolves pa11y error:

```
 • Error: This form field should be labelled in some way. Use the label element (either with a "for" attribute or wrapped around the form field), or "title", "aria-label" or "aria-labelledby" attributes as appropriate.
   ├── WCAG2AA.Principle1.Guideline1_3.1_3_1.F68
   ├── #search_input_react
   └── <input type="text" id="search_input_react" placeholder="Search" aria-label="Search" class="aa-input" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="false" aria-labelledby="search_input_react" aria-owns="...
```

* Fix Prettier failure on Circle CI
2018-04-10 08:46:08 -07:00
Yangshun Tay
099875a01a Display CompLibrary component in tabular format (#537) 2018-04-08 20:22:13 -07:00
Yangshun Tay
e19b9ac56e Add rel="noreferrer noopener" to <a> with target="_blank" (#531)
* Add rel="noreferrer noopener" to <a> with target="_blank"

* Run Prettier
2018-04-07 19:14:28 -07:00
Amy Lam
c2cd169b64 Add alt tags to images for a11y (#529)
- Add imageAlt to GridBlock
- Set alt equal to `user.caption` for mapped users
- Set alt equal to `post.author` for blog posts
- Update documentation
2018-04-07 19:13:12 -07:00
Elian Ibaj
c437f7be37 Use markdown-toc (#524) 2018-04-04 10:19:03 -07:00
Elian Ibaj
1a674885ae Fix body class (#521) 2018-03-28 10:55:00 -07:00
Pablo Estevez
508090377e Add Facebook Pixel ID setting (#507) 2018-03-14 18:01:23 -07:00
Ronen Amiel
c800870fef use id attribute instead of name for in page anchors and remove redundant anchors (#449) 2018-03-07 14:25:48 -08:00
Elian Ibaj
48ee457ec9 Add active link classes to site navigation menu (#463) 2018-03-04 08:53:31 -08:00
atroncy
4ea8158c0c feat(): add appId into algoliaConfig (#481) 2018-03-03 21:45:52 -08:00
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