Giter Club home page Giter Club logo

linbit-documentation's Introduction

Using the LINBIT Documentation Framework

Rendered version

User’s Guides

If you are interested in the rendered version of the User’s Guide, please read them at docs.linbit.com.

Tech Guides

You can download PDF versions for free from our home page.

Build dependencies

If you have docker, execute make dockerimage, which will generate a "linbit-documentation" base Docker image containing all the dependencies for generating HTML and PDF outputs.

Otherwise you will need GNU make and you have to install the following dependencies:

HTML targets (UGs/tech-guides)

  • asciidoctor

HTML targets (man pages)

  • mandoc

PDF targets

Fonts

LINBIT Fonts

We do not publish the official LINBIT fonts in that repository. Public projects have to be able to generate PDFs without LINBIT’s fonts, private ones are allowed to fail if the linbit-fonts directory does not exist. Actually they should fail, which is the default anyways.

If you build official PDFs/private projects, make sure that you cloned the internal linbit-fonts repository.

Japanese Fonts

If you intend to generate the pdf versions of the Japanese user’s guides, make sure you downloaded this zip archive. Extract the archive to a genshingothic-fonts directory in the root of the documentation.

If you already built the linbit-documentation Docker image and use the -docker make targets, this action is taken care of for you.

Tech Guides

We do not publish the source of our tech guides, make sure that you cloned the internal tech-guides repository.

Makefile interface/API for projects

Projects are organized in subdirectories, for example the user’s guide for DRBD 9 is in UG9. The top level Makefile contains HTML and PDF targets for these (e.g., make UG9-pdf-finalize). The final output is generated in $project/$lang/output-$format-finalize (e.g. UG9/en/output-pdf-finalize).

Every project needs a proper Makefile that has the following targets:

  • pdf

  • pdf-finalize

  • html

  • html-finalize

If a project only generates PDF output, implement the HTML targets as empty.

PDF and HTML targets

These generate their output to output-$format. It is perfectly fine that these directories contain temporary files like symlinks. As already written, we want proper Makefiles, so if the source does not change re-executing these targets should only process files that changed.

pdf-finalize and html-finalize targets

These generate their output to output-$format-finalize. This is the final output. The one that is published to a web page/sent to a web developer. For example this generates tar archive files for UG9 that can be sent to someone who puts it on the web page.

It is usually the final target that is executed after multiple iterations of make pdf/make html and it is fine if that target alters the content of output-$format to generate output-$format-finalize. If possible it should not, but it is not a strict requirement.

Docker targets

The top-level Makefile also contains targets that end in "-docker". These can be used to generate the output with the previously describe "linbit-documentation" base image. For example one can execute make UG9-html-finalize-docker.

The -docker make targets depend on the "local" make targets. Using the Docker targets is preferred, for consistent results, unless you have a reason not to use them. As of January 2023, local make targets are untested and unsupported, except as they are run through the linbit-documentation Docker image.

Internationalization

The English version is the default, but if you want to build the Japanese version, you have to set the make variable "lang" accordingly (e.g., make UG9-html-finalize-docker lang=ja). Japanese version is created by English .adoc files and Japanese .po files. Pot files used for localization can be created by the pot target, (e.g, `make UG9-pot-docker). Make sure created pot files include correct sentences.

Working on a Public Project

  • cd to the project (e.g, cd UG9/en)

  • modify sources accordingly

  • make pdf or make html

Output is generated in output-$format. These directories (in contrast to output-$format-finalize) can contain temporary files (symlinks, processed adoc files,…​). When you are satisfied, make $format-finalize, to generate the final output in output-$format-finalize.

Working on a Private Project

  • make sure you are at the top-level of the framework (linbit-documentation)

  • git clone the private project

  • follow Working on a Public Project

Style:

  • Read it, learn it, live it!

  • Hostnames: 'bob' ⇒ 'bob'

  • Commands: `rm -rf` ⇒ rm -rf

  • DRBD states: _Primary_ ⇒ Primary

  • Blocks: Add newline before and after the block. Delimit blocks using four (4) hyphens only. For example:

* Re-enable your DRBD resource:

----
# drbdadm up <resource>
----

* On one node, promote the DRBD resource:

linbit-documentation's People

Contributors

rck avatar phmarek avatar wanzenbug avatar osamu-sayama-sti avatar ghernadi avatar philipp-reisner avatar kermat avatar rp- avatar dvance avatar brhellman avatar joelcolledge avatar chrboe avatar andreas-gruenbacher avatar lge avatar jokucera avatar acidrop avatar johannesthoma avatar ryan-ronnander avatar gelma avatar benjaminalfery avatar ivanpesin avatar yusufyildiz avatar purplepalmdash avatar tenison avatar rainerlein avatar struberg avatar fe-ax avatar limenet avatar gheja avatar fghaas avatar

Watchers

Osamu Sayama 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.