Commit graph

387 commits

Author SHA1 Message Date
Amy Lam
1796764b1c Print out directory tree during docusaurus-init (#665)
* WIP does not work

* rm -rf website/

Run docusaurus-init

Even by deleting text here, it still shows up? Confused.

* Shift in tree printing logic

* Shift printing logic to the current location
2018-05-15 20:06:44 -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
Ahmad Alfy
ab6bab9f8d [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
2018-05-09 16:59:36 -07:00
Ahmad Alfy
e3b4f3945e Fix collapse of sidebar caused by #646 (#653) 2018-05-08 15:25:11 -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
Ahmad Alfy
0ea685d455 Fix misalignment of the sidebar and the content (#650) 2018-05-07 17:59:47 -07:00
Yangshun Tay
1a6f2fc51c Add open in browser functionality (#643) 2018-05-07 09:46:14 -07:00
Ahmad Alfy
432bdffb22 Fix collapse of main content on "Users" page on IE11 (#646) 2018-05-06 15:37:12 -07:00
Yangshun Tay
8d676e6a5a
Extract blog post truncation logic and add tests (#640) 2018-05-06 09:15:18 -07:00
Ahmad Alfy
5b3f54741e Fix flex children's width not calculated correctly on IE11 (#644)
This is a known issue on IE11 caused by the fact that IE add the padding value to the `flex-basis` leading to increase in the size of the column beyond intended. The block behave as if has `box-sizing` set to `border-box` even if it is set correctly.

Reference: https://github.com/philipwalton/flexbugs#flexbug-7
2018-05-05 22:58:58 -07:00
Ahmad Alfy
17dd6d9c8e Fix font rendering on IE11 (#642)
This is an issue on IE11, it cannot pick the correct system font because the font `-apple-system` makes the value invalid and hence making the whole declaration invalid.

A good solution is to split the shorthand version into separate properties/values and it will work.
2018-05-05 22:42:00 -07:00
Ahmad Alfy
6d77403dc1 Fix navigation collapse on IE11 (#641)
* Fix navigation collapse on IE11
2018-05-05 21:49:06 -07:00
Matthew Francis Brunetti
cf59f72ecd Windows compatibility fix (#583) 2018-05-05 18:29:28 -07:00
Ahmad Alfy
b220ec2f23 Implement sticky footer using flexbox (#637)
Implemented the solution provided [here](https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/) to allow the footer to stick downward no matter how much content the page contain.
2018-05-05 17:56:43 -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
Joel Marcey
dbc597bfd7 Allow configuring what version is shown by default (#554)
* [RFC] Allow configure what version is shown by default

Seeing if this will work - it won't work if you want to show `master` or `next` by default.
Only named version that would exist in `versioned_docs`.

If this does work and we want to go with it - `latestVersion` in many places seems like a
misnomer. `defaultVersion` would be better or something

* Remove from docusaurus siteconfig
2018-05-04 10:00:46 -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
Yangshun Tay
ef7f8b061f Reduce redundant css (#621) 2018-04-29 22:24:33 -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
Yangshun Tay
812f2be6e3 Sidebar revamp (#617)
* Revamp sidebar

* Change links color

* Tweak for mobile
2018-04-28 18:44:02 -07:00
Paulus Schoutsen
6c9c7e5de5 Generate sitemap if any blog post or page exists (#610) 2018-04-27 23:09:47 -07:00
Yangshun Tay
327d044362 Improve code block appearance (#609) 2018-04-27 06:21:36 -07:00
Yangshun Tay
3a24606887 Improve <table> appearance (#607) 2018-04-26 08:39:26 -07:00
Steven Zeck
df6f6df333 Do not ignore 'custom_edit_url' (#604) 2018-04-25 10:40:53 -07:00
Eric Nakagawa
ec13640097 Revert "Output the full path to build folder to aid when deploying site." (#593) 2018-04-23 11:42:10 -07:00
Eric Nakagawa
083d70d679 Output the full path to build folder to aid when deploying site. 2018-04-23 09:35:47 -07:00
Yangshun Tay
d3fd347d21
Regenerate blog metadata on request to blog (#590) 2018-04-22 20:46:16 -07:00
Christopher Chedeau
1d4e334a86 Restore the ability to use the --port command line argument (#588)
The behavior was changed in #516. With this change, both the command line argument and environment variable will work.
2018-04-20 09:25:12 -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
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
Yangshun Tay
b23b0def1d Fix CSS media queries (#576) 2018-04-17 09:47:04 -07:00
Sviatoslav
1642c078a7 Support for non-latin characters in heading anchor links (#492) 2018-04-17 09:33:10 -07:00
Yangshun Tay
ba024a25c7 Fix search bar width for mobile nav (#575)
* Shorten search bar width for mobile nav

* Remove min-device-width

* Use max-width
2018-04-17 08:17:20 -07:00
Yangshun Tay
159b80df94
Use cssnano to minify main CSS file (#569)
* Add cssnano to CSS generation

* Add babel-polyfill

* Call cssnano at the end

* Fix tests

* Add babelrc
2018-04-16 21:31:01 -07:00
Yangshun Tay
946e2cef90
Add <doctype HTML> to HTML pages (#566)
* Add doctype to static rendering

* Set content-type for CSS
2018-04-15 15:50:43 -07:00
Limon Monte
858b6f347f Fix body height by changing CSS height property to min-height (#556) 2018-04-13 08:40:58 -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
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
Joel Marcey
71278431f1 Add hide_title to metadata check whitelist 2018-04-11 18:02:25 -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
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
Yangshun Tay
1db939b119 Revert yarn prettier addition in yarn ci-check (#543) 2018-04-10 10:30:29 -07:00
Kaveh Khorram
bbbe311004 Dynamic port switching (#516) 2018-04-10 08:48:44 -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