omnilayer.github.io
Source repository for OmniLayer GitHub Page.
Install Site Building Tools
The only prerequisite is an installation of a recent command-line Java. (No browser plugins needed.)
-
Java Development Kit 8 is recommended.
Java 6 or Java 7 should also work.
Basic content editing can be done with a text-editor or on Github. The Content section has details and a list of live preview tools.
Modify the Site Source
The site source is rendered to static HTML using the JBake static site generator tool. The site is split into three directories: content
, templates
, and assets
and an overview of each is provided below. For detailed information please see the JBake Documentation.
Content
Content is in the content
directory. Most content is in AsciiDoctor markdown (.adoc
) files. AsciiDoc format provides easy editing, versioning, and maintenance with powerful formatting and structuring tools.
See the AsciiDoc Quick Reference to get started. Note that Github automatically renders AsciiDoc files when browsing repositories and allows AsciiDoc wiki pages. AsciiDoc is better suited for extensive technical documentation — which the Omni Team aims to provide — then standard or Github-flavored Markdown.
For example the entire O’Reilly Mastering Bitcoin book (by Andreas Antonopoulos) is written in AsciiDoc format (see repo).
AsciiDoc content can be live previewed using a variety of tools including:
-
See Editing AsciiDoc with Live Preview for additional options
JBake also supports content in Github markdown format and HTML.
Templates
The templates are used to wrap the content with headers, footer, and menus and to add stylesheets, etc. The templates are in the template
directory and are in Thymeleaf format which is HTML with additional attributes to allow variable things like variables and include files. Thymeleaf templates are natural templates which are valid HTML and do not can be rendered directly by browsers as static prototypes. Dummy text will be replaced at build-time with text from the files in the content
directory.
Assets
The assets
directory contains static images, fonts, Javascript, and CSS. These files are referenced from the templates and used to style the content and implement things like menu behavior.
Build Locally
./gradlew
Open ./build/site/index.html
to view the rendered site.
Publish to Github
./gradlew publish
Enter your Github username and password when prompted.
- NOTE
-
We will configure auto-publishing via Jenkins or Travis CI shortly.