Code Monkey home page Code Monkey logo

docs's Introduction

The Things Network Documentation Build Status

This is a Jekyll site which Travis automatically tests and builds to the gh-pages branch to be served via GitHub Pages.

Update content

If you do a lot of edits please use a local build to preview and test.

  • The homepage for the site is index.html.
  • The guides are a Jekyll collection in the _content folder.
  • Store assets in the same folder as the markdown file you need it in and include them by their filename. You can also use relative paths to re-use images from other guides.
  • To link to another child guide, use the relative markdown path (e.g. ../devices/registration.md) and Jekyll will make it .html.
  • To link to another parent guide, use the relative markdown path (e.g. ../devices/index.md) or the directory path, ending with a slash (../devices/).
  • Guides are sorted on descending zindex first, then title ascending and if those are equal label descending.
  • Use blockquotes (>) to create callouts for important notes.
  • To set an image to use on Facebook and Twitter use image:/absolute/path/to/image.png in your frontmatter.
  • You can use most of the icons we use in the console. Simply use <i class="ion-eye"></i> in the Markdown and we'll style it as a button.

Build local for preview and design

  1. Install Ruby 2.0.0 or higher

  2. Install Bundler:

    $ gem install bundler
  3. Install Jekyll using Bundler:

    $ bundle install
  4. Install Node.js and NPM.

  5. Install front-end and development dependencies:

$ npm install
> This will also overwrite any local git pre-commit hook to execute [npm run webpack](package.json#L12), [npm test](package.json#L15) and [npm run add](package.json#L16) to append the webpack build.
  1. Run Webpack, build the local Jekyll site and watch for changes:

    $ npm run dev

    Be aware that this will use Jekyll's experimental incremental mode. Only the file you edit will be regenerated. So a change in a guide's title will not cause the navigation on all other pages to be updated. Just kill the proces and run it again.

Guidance

Build and upload a preview

If you do some major refactoring and would like to upload a build somewhere for preview, then you can use:

npm run scp user@host:/path

This will create a build in _scp, upload it with scp and then delete the directory. Make sure the server has your public key or it will prompt for a password and cause the script to fail.

Alternatively, you can set the SCP_TARGET environment variable or dotenv.

Test Build Status

Pull Requests and Pushes will be tested automatically by Travis. It will let Jekyll try to build the site and then run HTMLProofer to test for broken links etc.

The test will also run automatically before every commit. To run the test manually, follow Build local to install the dependencies and then run:

npm test

Automatic updates

Some content we source directly from elsewhere, e.g. the MQTT API Reference.

Update

  1. Follow the previous section to install NPM and dependencies.

  2. Run the pull script:

    npm run pull

Source

To source more content from elsewhere edit _scripts/pull.js.

docs's People

Contributors

chgerwig avatar chiflux avatar danicampora avatar dicktonyboy avatar dorianamouroux avatar fabaff avatar faif avatar fokkezb avatar gomezjdaniel avatar h0l0gram avatar htdvisser avatar jjjskaye avatar johanstokking avatar jpmeijers avatar kersing avatar kiwibrew avatar krishnaiyer avatar maartenarits avatar martinbeentjes avatar mjunior-fitec avatar nestorayuso avatar qinzhijin avatar rish-c avatar romeovs avatar svdgraaf avatar tdsmtdsm avatar terrillmoore avatar trung-dung avatar wienke avatar yerion avatar

Watchers

 avatar  avatar

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.