Commit graph

5 commits

Author SHA1 Message Date
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
Ricky Vetter
c97da9d3f7 Sitemap local (#157)
* Better support for localized pages in sitemap

* clean console
2017-10-26 16:12:47 -07:00
Joel Marcey
7e23f3e4ef Avoid null enabledLanguages when there is no languages.js file (#155)
```
var enabledLanguages = languages.filter(function (lang) {
                                  ^

TypeError: Cannot read property 'filter' of null
    at module.exports
```
2017-10-20 15:19:13 -07:00
Joel Marcey
26f498a2db Add a check for languages.js in sitemap.js
Without this a build failure would occur for those that are not using the languages.js file.

e.g.,

```
sitemap.js triggered...
module.js:471
    throw err;
    ^

Error: Cannot find module '/home/ubuntu/fasttext-website/website/languages.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at module.exports (/home/ubuntu/fasttext-website/website/node_modules/docusaurus/lib/server/sitemap.js:48:15)
    at execute (/home/ubuntu/fasttext-website/website/node_modules/docusaurus/lib/server/generate.js:316:5)
    at Object.<anonymous> (/home/ubuntu/fasttext-website/website/node_modules/docusaurus/lib/build-files.js:31:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
Error: generating html failed
```
2017-10-18 15:43:25 -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