Jekyll theme originally built for Bytewax Docs.
Updating the content requires basic knowledge of Markdown. If you want also to modify theme style or behaviour, you'll need to use SCSS, jQuery & Liquid.
Add this line to your Jekyll site's Gemfile
:
gem "bytewax-docs"
And add this line to your Jekyll site's _config.yml
:
theme: bytewax-docs
And then execute:
$ bundle
Or install it yourself as:
$ gem install bytewax-docs
You can both convert gem-based theme or simply copy all theme files into your Jekyll site directory.
Note: customizing a theme may require all its files, which are not included in site's directory while using gem-based theme.
General site configuration can be changed by modifying _config.yml
. You'll find there:
Important: You need to restart your server after modifying the
_config.yml
file to see your changes applied.
Rest of configuration files are located in _data
folder, where you can adjust:
navbar.yml
- main site navigation, located in top navbar,footer.yml
- modify site footer content & menus,categories.yml
- specify order / hierarchy of the docs categories,cookies.yml
- show or hide cookie consent popup, define its content and Privacy Policy link (important to make your site GDPR complaint).npm install
to download all required node.js modules.gulp
. Then you should take a look in the _assets
folder and its subfolders:scss
folder you'll find theme styles written using SCSS. They're split into small partials, each responsible for other parts of the website. Files used throughout the whole theme are stored in the global
subfolder, where are located e.g. variables, mixins & typography styles. js
folder, where you'll find partials responsible for each part of website. Most of them use jQuery syntax. External libraries or plugins are stored in the lib
subfolder, which is higher in script concatenation order.Modyfing theme layout requires basic knowledge of HTML5 and Liquid templating language. Layout files can be found in two folders:
_layouts
contain general layout files, with smaller components attached using include tag_includes
folder, you'll find components used throughout the whole website. Global components are located in the main folder, local ones are in subfolders with corresponding names, e.g. components used only in the tutorials are located in the tutorials
subfolder.Docs articles are stored in the _docs
folder within category subfolders. Each articles starts with short metadata options, defined in front matter block. Metadata contain:
Important: Order value should be a number, starting from 0. The only exclusion to this rule is the article that is shown on the main Docs (/docs/) page, which is always set to -1.
---
title: Place article title here
category: Category name
order: 1
---
Docs articles should be written in Markdown syntax, however you can also use HTML in separated lines if needed.
If you want to add alert within the docs article, use following include
tag:
{% include alert.html type="info" icon="play_circle" content="This is a sample content, you can use <strong>HTML here.</strong>" %}
Each alert has three parameters:
If you want to change order of categories in the sidebar menu, you need to modify _data/categories.yml
file.
Tutorial articles are located in the _tutorials
folder. You can duplicate an existing article and repopulate it with your content, or create a new one from scratch. Each article should start with front-matter block:
---
title: Example case study
description: Here you can add a short description about the article.
snippets:
- url: path/to/code_snippet.py
name: code_snippet.py
id: code-snippet
notebooks:
- url: path/to/notebook.ipynb
name: notebook.ipynb
id: notebook
github-url: https://github.com/bytewax/example-repository
download-url: example.zip
featured-image: assets/img/example.png
featured-image-alt: Example image alt text
---
github-url
parameter.download-url
parameter.featured-image
to add its path and featured-image-alt
to provide its alternative text.Although case studies articles content should be written in markdown syntax, just as the blog posts and pages, code highlighting requires specific line added after each paragraph:
**Paragraph title, or step headline**
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tristique libero et sapien dictum, eget aliquet purus lacinia. Suspendisse potenti.
{: data-highlight="1-3" data-snippet="code-snippet"}
That Block IAL line, wrapped in braces & starting with colon should have inside:
id
parameter of the snippet linked to the paragraphStatic files (e.g. images) are located in assets
folder. You can put there your files and then link to their path using assets/your filename.ext
.
Theme uses following plugins / libraries:
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The theme is available as open source under the terms of the MIT License.