Commit graph

667 commits

Author SHA1 Message Date
Joel Marcey
c14a8d2e77
Always use PROJECT_NAME, even for user and org pages (#384)
* Always use PROJECT_NAME, even for user and org pages

The symptom was that if we had a user or org page (e.g., https://JoelMarcey.github.io), we would try to copy files to a directory within a directory, getting errors like:

```
Error: Copying build assets failed with error 'Error: Cannot copy '/Users/joelm/dev/JoelMarcey.github.io/website/build' to a subdirectory of itself, '/Users/joelm/dev/JoelMarcey.github.io/website/build/JoelMarcey.github.io-master'.'
```

This is because we were setting the end of `fromPath` to empty if we were using an org or user page.

But we don't need to do that. The `PROJECT_NAME` (set in `siteConfig.js` as `projectName`) is the user or org repo

e.g., https://github.com/JoelMarcey/JoelMarcey.github.io/ has a `projectName` of `JoelMarcey.github.io` with an `organizationName` of `JoelMarcey`.

So now the `fromPath` and `toPath` look like:

`fromPath`: `build/JoelMarcey.github.io`
`toPath`: `buuid/JoelMarcey.github.io-master`
2018-01-09 09:11:07 -08:00
Dániel Tar
654916ae98 Fix build on Windows (#381)
Use `path.dirName` instead of a `file.replace` on regex'd replaced string
2018-01-08 15:44:50 -08:00
Filip Danić
65085b1337 document changes from PR #206 (as per issue #212) (#380) 2018-01-08 08:22:46 -08:00
Joel Marcey
f533311bee
Add Reason as a Docusaurus user (#373)
And alphabetize the list as well
2018-01-04 13:03:36 -08:00
Ricky Vetter
57306e1c53
Remove "Lead" from my title
I'm barely a developer. I think it's a stretch to call me a lead :P
2018-01-04 11:59:13 -08:00
Ricky Vetter
b0b1a839e7
Update users to follow their naming convention
By convention both BuckleScript and ReasonReact are PascalCase. Also removed BuckleScript from fbOpenSource because it's not technically under that umbrella.
2018-01-04 11:51:46 -08:00
Joel Marcey
8e5b5c9f0f
Update publishing docs and API information (#372)
Some environment variables can be set by the CircleCI build itself
Document `USE_SSH`
2018-01-03 17:03:14 -08:00
Joel Marcey
efaa792206
Add password token back for Circle
Since we are not using SSH
2018-01-03 17:00:25 -08:00
Joel Marcey
3a2c801262
Do not use SSH for the new publishing bot 2018-01-03 16:52:42 -08:00
Joel Marcey
e260076fd9
Use docusaurus-bot for publishing (#371) 2018-01-03 16:21:29 -08:00
Joel Marcey
7b13b75695 Updated publishing documentation to make to check write access for user 2018-01-03 13:54:54 -08:00
Joel Marcey
ea52a1a110
Fix link in CHANGELOG.md 2017-12-27 16:19:32 -08:00
Joel Marcey
430e35b5ea
Publish Docusaurus v1.0.4 (#363) 2017-12-27 16:14:30 -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
5a77f186b9
Check English translation if language doesn't exist (#361)
Need this because of https://github.com/facebook/Docusaurus/pull/316
2017-12-27 15:18:58 -08:00
Thomas Gratier
5805149eff Remove uneeded run in syntax to run local server (#354) 2017-12-27 14:39:28 -08:00
artiebits
f8840e507c Allow hiding footer icon (#357) 2017-12-27 07:40:38 -08:00
Jonathan Chen
de381e8f03 Fix<slash>: Fix typo (#355) 2017-12-27 07:25:43 -08:00
Satana Charuwichitratana
0b48b07724 Fix wrong link to Contributing Guide (#341) 2017-12-21 19:44:41 -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
Joel Marcey
4637de9a52 Ignore VSCode workspaces 2017-12-20 13:46:30 -08:00
neilsutcliffe
93c93af40a Documentation on how to debug locally using VS Code. (#335) 2017-12-20 13:16:21 -08:00
Átila Camurça Alves
e6a1844299 Update getting-started-installation.md (#331)
instruction to run local `docusaurus-init` via `npx`
2017-12-20 11:49:47 -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
Ricky Vetter
d79ff9eaf0 add docs for wrapPagesHTML (#332) 2017-12-20 10:35:50 -08:00
Joel Marcey
665b2da09f Prettier fix for ce338fff64 2017-12-20 10:07:57 -08:00
Ricky Vetter
ce338fff64
Merge pull request #275 from rickyvetter/wrapPagesHTML
add wrapPagesHTML which renders html snippets in pages inside of a header + footer
2017-12-20 10:05:21 -08:00
Joel Marcey
4d704c1c09 Update package-lock.json 2017-12-20 10:04:34 -08:00
Joel Marcey
db65f4b7fd Prettier fix for b96fae035f 2017-12-20 10:03:24 -08:00
António Afonso
b96fae035f Guard against lack of layouts in siteConfig.js (#330)
If a document states a `layout` in its header but `layouts` doesn't exist in `siteConfig.js` the doc would not render.
2017-12-20 09:55:10 -08:00
Lachlan Campbell
0a9aa41538 Fix form of its (#329) 2017-12-20 07:32:07 -08:00
Thomas Broadley
b5fefcc676 docs: fix typos (#327) 2017-12-19 21:39:18 -08:00
Joel Marcey
83e8802d01 Add description for useEnglishUrl 2017-12-19 21:35:24 -08:00
Joel Marcey
a12ebcd401 Don't translate if we do not have a language
This will most likely be because we have not enabled translation
2017-12-19 17:58:49 -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
4a3da1f30a
Add a change log
via a CHANGELOG.md
2017-12-19 15:53:18 -08:00
Héctor Ramos
eafcf13a4c Switch rsync for fs-extra (#321) 2017-12-19 13:29:41 -08:00
Joel Marcey
54ffbddcd8 Add more details when failing to copy assets upon publish 2017-12-19 12:50:22 -08:00
Héctor Ramos
60bd8bc754 Switch to rsync package (#320)
* Switch to rsync package

This removes the need to install rsync natively in CI

* Update publish-gh-pages.js
2017-12-19 12:34:12 -08:00
ymz
ddf9827ae6 Fix zh-Hans' Chinese word & Beautify code (#311)
"中文" means both "zh-Hans" and "zh-Hant"
"简体中文" means "zh-Hans"
"繁體中文" means "zh-Hant"

References:
- [What's New in Globalization and Localization - msdn.microsoft.com](https://msdn.microsoft.com/en-us/library/dd997383(v=vs.100).aspx#new_specific_cultures)
- [zh-cn 与 zh-hans 是什么关系、有什么区别? - zhihu.com](https://www.zhihu.com/question/21980689)
2017-12-19 12:31:28 -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
Joel Marcey
f52e12df84 Add running Jest tests to CONTRIBUTING.md 2017-12-18 14:48:13 -08:00
Joel Marcey
f5db4c3f80 Update package and yarn lock files 2017-12-18 14:44:57 -08:00
Héctor Ramos
9dadb3578c Add first set of docusaurus-build tests using Jest (#259)
* 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

* Initial test suite

* Rename test to match original file

* restore test files

* Remove yarn.lock from pull request. Will run it again in a separate commit
2017-12-18 14:40:52 -08:00
azu
8ec4a6bfe5 Add almin to users (#303) 2017-12-18 11:56:05 -08:00
Dilpreet Singh
12c54f7819 Fixes documentation link in contributing.md (#314) 2017-12-18 11:51:16 -08:00
neilsutcliffe
21cbece838 Fixes to testing guide (for Windows only) (#304)
* Fixes to testing guide (for Windows only)

* Fixed line ending detection for UNIX and Windows

* Removed incorrect instructions about translations

* Removed redudant heading and turned it into a note.
2017-12-18 11:48:53 -08:00