Giter Club home page Giter Club logo

nats-docs's Introduction

NATS documentation

This repository contains the source content for http://nats.io/documentation. The nats.io website is built from Markdown content using Hugo, a static site generator written in Go.

This documentation repository and the main repository for the nats.io site share a common CSS theme submodule.

Contributing content

We view this project as a perpetual work in progress that can greatly benefit from and be enriched by the knowledge, wisdom and experience of our community.

We follow the standard Fork-and-Branch GitHub workflow. If you're not familiar with this process, please refer to either of the following excellent guides:

We encourage and welcome your contributions. We will review and discuss with you any contributions or corrections submitted via GitHub Pull Request.

Content Organization

The NATS documentation is a collection of Markdown articles located in `nats-docs/content and organized into the following categories/subdirectories:

Category Subirectory
Getting Started documentation
Clients documentation/clients
Concepts documentation/concepts
Internals documentation/internals
Tutorials documentation/tutorials

The Markdown documents contained in these directories are assembled by Hugo and listed in their respective categories in a navigation menu at the left side of every page.

Adding pages

Any new page should be a Markdown document placed in the appropriate directory. Each page added needs a header like the following:

+++
date = "2015-01-02"
title = "Title of Page"
category = "nats-docs/folder"
weight = 1
+++
  • Date format: Year-Month-Day
  • Title: Title of the page
  • Category: Directory path to file
  • Weight: When listing pages it signifies its importance and where it should land in the list.
  • Description: Optional

Adding categories

Modify nats-docs/config.toml to add the category and its weight (list position) to menu.main:

[[menu.main]]
  name = "getting started"
  weight = 0
[[menu.main]]
  name = "clients"
  weight = 1
[[menu.main]]
  name = "concepts"
  weight = 2
[[menu.main]]
  name = "internals"
  weight = 3
[[menu.main]]
  name = "server"
  weight = 4
[[menu.main]]
  name = "tutorials"
  weight = 5

Style guidelines and conventions for documentation

  • Use topic-based files and titles
  • Use only headers 1 (#), 2 (##) and 3 (###)
  • Use single spaces to separate sentences
  • Markdown syntax: http://daringfireball.net/projects/markdown/syntax#img
    • Links: [NATS](http://nats.io/)
    • Cross references: [client libraries](/documentation/clients/nats-clients/)
    • Images: ![drawing](/documentation/img/nats-msg.png)
  • Triple ticks for code, commands to run, user operations, input/output
  • Single ticks for executable names, file paths, inline commands, parameters, etc.
  • Graphics: save as *.png; source in /content/documentation/img/nats-img-src.graffle

Checking your work

To make sure your changes render correctly, you can build and preview the site on your local system using Hugo. One great thing about Hugo is that it has a live preview mode. In live preview mode, Hugo spawns a web server that detects content updates in the tree and will re-render the Markdown to HTML in real time. This means you can see the updated content and layout in real time as you edit!

###Install HUGO: Note 1: On OS X, if you have Homebrew, installation is even easier: just run brew install hugo.

Note 2: Hugo requires Go 1.4+. If Go is not already installed on your system, you can get it here.

Now install Hugo:

go get -u -v github.com/spf13/hugo

Clone your forked copy of the repository:

git clone [email protected]:<YOUR GIT USERNAME>/nats-docs.git

Change to the directory:

cd nats-docs/

Get the NATS HUGO theme

If you you want to modify the NATS theme, fork the NATS theme, then git clone your forked repository.

git clone [email protected]:YOUR-USERNAME/nats-theme.git themes/nats

If you just want the theme for presentation while you make changes, you can just clone the NATS theme directly.

git clone [email protected]:nats-io/nats-theme.git  themes/nats

Build the site and start the server:

hugo server -w --port=1515 --theme=nats --buildDrafts

nats-docs's People

Contributors

igrishaev avatar johnwlockwood avatar jonasi avatar kozlovic avatar lparis avatar pyhedgehog 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.