GithubHelp home page GithubHelp logo

sailshq / sails-docs-translation-website-template Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 3.24 MB

A trimmed-down version of sailsjs.com, for hosting translations of the documentation.

JavaScript 20.31% CSS 3.37% HTML 76.32%

sails-docs-translation-website-template's Introduction

Translation Website Template

This is a trimmed-down version of the Sails website that can be used to host documentation in other languages.

You can read more about the various translation efforts here.

Pages included

Since the original website has a lot of hard-coded content which can quickly get out-of-date, this app mostly just includes the pages that are dynamically compiled from GitHub. Any pages from the original website that aren't included here are already set up to redirect to the applicable page on sailsjs.com.

The two pages not compiled from markdown that are still included in this app are:

  • Homepage
  • Get Started

Compiling the documentation from a translation repo

Compiling docs locally

First, in package.json, edit the "1.0" and "0.12" scripts so that sails_remote is set up to point to your translation repo.

sails_remote="git://github.com/marrouchi/sails-docs-fr"

Lift your app

npm run 0.12

Then send an HTTP request to http://localhost:1337/refresh with the X-Hub-Signature header set to whatever Run in Postman

After a moment, you will see messages like the following showing up in the terminal:

Compiling `reference` docs from the `0.12` branch of `git://github.com/marrouchi/sails-docs-fr`...
Compiling `anatomy` docs from the `0.12` branch of `git://github.com/marrouchi/sails-docs-fr`...
Compiling `concepts` docs from the `0.12` branch of `git://github.com/marrouchi/sails-docs-fr`...
Compiling `getting-started` docs from the `0.12` branch of `git://github.com/marrouchi/sails-docs-fr`...
Compiling `support/irc` docs from the `0.12` branch of `git://github.com/marrouchi/sails-docs-fr`...
Compiling `version-notes` docs from the `0.12` branch of `git://github.com/marrouchi/sails-docs-fr`...
Compiling `security` docs from the `0.12` branch of `git://github.com/marrouchi/sails-docs-fr`...

Compiling docs automatically

Once your site is online, if you want to automatically compile the docs when there are changes to the translation repo, you can set up a webhook in GitHub. In your translation repo, go to Settings > Webhooks > Add Webhook, and configure the following settings:

Setting
Payload URL http://YOUR-TRANSLATION-SITE.com/refresh
Content type application/json
Secret (Your super secret password)

Then, in your production app's config vars, set 'GITHUB_HOOK_SECRET' to be the super secret password you provided to GitHub.

Typography

The original Sails website uses Proxima Nova Soft for the header font, and Lato for the body. Since Proxima Nova Soft is hosted on Typekit and is not available for free, this app uses a similar Google Font, Mallanna, instead. The fonts are included in a link in layout.ejs, but if you'd rather, you can download them from Google Fonts and host them yourself. (Font Squirrel's webfont generator is handy for setting that up.)

sails-docs-translation-website-template's People

Contributors

rachaelshaw avatar

Stargazers

Haruka Asakura avatar

Watchers

James Cloos avatar Irl Nathan avatar

Forkers

mk2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.