Commit graph

43 commits

Author SHA1 Message Date
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
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
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
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
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
48ee457ec9 Add active link classes to site navigation menu (#463) 2018-03-04 08:53:31 -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
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
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
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
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
Joel Marcey
b2de777b1e
Add docusaurus-init to the headerlink message (#202) 2017-10-31 09:20:23 -07:00
Eric Nakagawa
dc0cc487fa Add back metadata generator (#150)
Rollback package.json
2017-10-19 13:43:03 -07:00
Eric Nakagawa
7c80becb87 Fix bug in when running local server 2017-10-19 12:58:57 -07:00
Eric Nakagawa
bcba05ae03 Adds sitemap.xml. Adds 'Help Translate' to translatable strings. Error messages and fn name cleanups. (#136)
* added a note about needing more than one language to be enabled to allow for a drop down

* Removing debug statements

* Add 'Help Translate' to translatable strings, improves error messages around missing translated strings, calls write-translations on some routes

* Adds sitemap.xml to live server and build. Versioning not supported. -- Also did some file name and module cache cleanups.
2017-10-18 12:55:58 -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
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
Héctor Ramos
a484893c4f Small CSS adjustments. (#79) 2017-09-25 12:52:58 -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
376ad77361 Add a class to logo image in header 2017-09-25 10:01:34 -07:00
Eric Nakagawa
89285e7693 Fixes 2 additional console errors. One in HeaderNav and one in Index component. 2017-09-20 14:45:55 -07:00
Frank Li
43ef3c8142 Add comments 2017-08-15 16:55:38 -07:00
Frank Li
6b6910988b Small fix to headerNav 2017-08-14 14:49:17 -07:00
Frank Li
433f422632 Fix header nav require 2017-08-11 12:03:33 -07:00
Frank Li
b256d2f8d9 Initial changes to error messages 2017-08-09 15:43:30 -07:00
Frank Li
0c10287f84 Update blog header link 2017-08-09 14:21:32 -07:00
Frank Li
22cadc48fc Clean up 2017-08-08 14:01:43 -07:00
Frank Li
6ca90610f4 Update headerLinks API 2017-08-08 13:46:11 -07:00
Frank Li
63043c041a Add version header link and change current docs to be version 'next' 2017-08-04 12:41:13 -07:00
Frank Li
3598dffc58 Add versioning functionality 2017-08-03 10:25:01 -07:00
Frank Li
da4b381df4 Allow external link target (e.g. _blank) 2017-07-21 16:23:59 -07:00
Frank Li
b2be3331cf Update edit button and header language drop down 2017-07-20 15:56:38 -07:00
Frank Li
704897fd61 Add config option to allow disabled header title 2017-07-17 10:35:43 -07:00
Frank Li
099a13a264 Move references to languages and translated strings out of siteConfig.js into new translation.js module 2017-07-11 17:03:27 -07:00
Frank Li
fbae29b0ff Run Prettier 2017-07-10 16:38:35 -07:00
Joel Marcey
e3139eea2f Initial commit 2017-07-07 10:28:29 -07:00