Giter Club home page Giter Club logo

ats-garage-docs's Introduction

ATS Garage Docsite

This is the source for docs.atsgarage.com and for the HERE Developer Portal docs for HERE OTA Connect. It’s built with Jekyll, a static site generator.

The text is written in Asciidoc, and rendered by Asciidoctor. Asciidoctor exercises a large number of styles, and has a tool to build stylesheets called asciidoctor-stylesheet-factory. However, that’s pretty much just a compass pipeline, so we added it to our jekyll build process (to eliminate some annoying steps). See ` _compass` for all those details.

Configuration

Building the site requires a github access token with access to ATS private repos. Pushing the site to docs.atsgargae.com requires a set of AWS IAM credentials with access to the docs.ota.here.com S3 bucket. Pushing to the dev portal requires push access to https://gerrit.it.here.com/#/admin/projects/DOCS/ota_update_platform.

Github token

  1. Generate the token.

  2. Copy ` _secrets.yml.example` to ` _secrets.yml`, substituting your token.

AWS credentials

  1. Get the docs IAM credentials from the Infra team.

  2. copy s3_credentials.env.example to s3_credentials.env, substituting the real credentials.

Build

Build the site with Docker:

./build.sh

Build the site from a local jekyll install:

bundle install
jekyll build --config _config.yml,_secrets.yml

Publish

Publish to the web:

./publish.sh <staging|prod|docs-ats>

Publish HTML assets to the internal HERE docs repo:

./publish-here.sh <gerrit_username>

Debugging

If you’re having issues with how jekyll is rendering the site, you can add debug breakpoints to any of the layouts or includes with a {% debug %} liquid tag. See the debugger docs at https://github.com/octopress/debugger.

If it’s a problem that only affects a single page, you can set the layout of that page to 'debug'.

Navigation

The sidebar navigation can be customized in ` _config.yml`. The sections key lists the sections that will appear in the navigation, and the navigation_tabs key lists the tabs, and which sections each one contains. (Details in the yaml comments.)

Multiple-language code tabs/code samples

You can make codetabs appear by using asciidoc attributes. Just put multiple source blocks, give one of them the "primary" role, and the others "secondary". Make sure to give each block a name; that’s what will be used for the title of the tab. Example:

[source,C,role="primary"]
.C (ANSI)
----
/* Hello World in C, Ansi-style */

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
  puts("Hello World!");
  return EXIT_SUCCESS;
}
----

[source,python,role="secondary"]
.Python
----
print("Hello World")
----

[source,python,role="secondary"]
.link:https://esolangs.org/wiki/Ook![Ook]
----
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook.
Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook?
Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook.
Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. Ook! Ook? Ook! Ook! Ook? Ook!
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook.
----

Contextual help in app

The web app needs some contextual help pages. Since that’s documentation, we want to keep the single source of truth here in the docs repo. We accomplish this by writing the contextual help pages in asciidoc (using include::[] statements as liberally as possible). For each contextual help page, do the following:

  1. Create a new jekyll page with the category context_help:

    ./bin/jekyll-page "My page title" context_help
  2. Change the :page_layout: to context_help to make it render as raw HTML without the navigation, etc.

  3. Write your doc.

  4. It will render in the static site under /context_help/page-name-slug.html when the site is built.

ats-garage-docs's People

Contributors

alexhumphreys avatar epicnuts avatar houcros avatar kmanikandan-kmk avatar lbonn avatar merlhere avatar merltron avatar pattivacek avatar tkfu avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ats-garage-docs's Issues

Build failure

Latest master fails to build with following error:
jekyll build --config _config.yml,_secrets.yml raceback (most recent call last): 26: from /usr/bin/jekyll:9:in

'
25: from /usr/lib/ruby/vendor_ruby/jekyll/plugin_manager.rb:51:in require_from_bundler' 24: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:114:in require'
23: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in require' 22: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in each'
21: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in block in require' 20: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in each'
19: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in block (2 levels) in require' 18: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in require'
17: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/jekyll-compass-2.0.1/lib/jekyll-compass.rb:6:in <top (required)>' 16: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/jekyll-compass-2.0.1/lib/jekyll-compass.rb:6:in require'
15: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/jekyll-compass-2.0.1/lib/jekyll/compass.rb:22:in <top (required)>' 14: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/jekyll-compass-2.0.1/lib/jekyll/compass.rb:22:in require'
13: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-1.0.3/lib/compass.rb:13:in <top (required)>' 12: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-1.0.3/lib/compass.rb:13:in each'
11: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-1.0.3/lib/compass.rb:14:in block in <top (required)>' 10: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-1.0.3/lib/compass.rb:14:in require'
9: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core.rb:68:in <top (required)>' 8: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core.rb:68:in require'
7: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions.rb:9:in <top (required)>' 6: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions.rb:9:in require'
5: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions.rb:19:in <top (required)>' 4: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions.rb:23:in module:Functions'
3: from /usr/lib/ruby/vendor_ruby/sass/script/functions.rb:632:in include' 2: from /usr/lib/ruby/vendor_ruby/sass/script/functions.rb:632:in include'
1: from /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:9:in included' /home/god/.local/bundle/vendor/ruby/2.5.0/gems/compass-core-1.0.3/lib/compass/core/sass_extensions/functions/urls.rb:5:in has?': undefined method has?' for Sass::Util:Module (NoMethodError) Did you mean? hash

Document container build

The docs mention native vs VM-based builds. The latter is too slow while the former is rather limited due to only old versions being supported according to https://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html#detailed-supported-distros

Using container (e. g. systemd-nspawn) seems like a reasonable compromise which should be added to the docs.

Note: we might also use it instead of qemu for quick/initial tests because we use ostree anyway but that requires further discussion.

Update required packages

  • git-core is called git nowadays
  • apt is the recommended way to install packages instead of apt-get
  • python(3)-devel is missing from required packages

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.