No release in over 3 years
Jekyll theme to use with Hyde C++ documentation system.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1.4
~> 12.0

Runtime

 Project Readme

jekyll-theme-adobe-hyde

This is a Jekyll theme for use with the Hyde C++ documentation tool. The theme works directly with GitHub Pages.

This theme is based on the slate theme and incorporates a number of templates we've developed for various Hyde based sites.

The inspiration for the layout comes from cppreference. Please help us improve the templates by contributing!

Table Of Contents
  • Installation
    • GitHub Pages
    • Using Ruby Gems (does not work with GitHub pages)
  • Usage
    • Adding a Header Image
    • Customizing the Theme
  • Contributing
  • Development
  • License

Installation

GitHub Pages

If using GitHub Pages or the jekyll-remote-theme plugin, specify the theme as a remote theme in your _config.yml file:

remote_theme: adobe/hyde-theme@v2.0.2

It is strongly recommended that you use a version tag to avoid having an updated version of the theme break your site.

Using Ruby Gems (does not work with GitHub pages)

Add this line to your Jekyll site's Gemfile:

gem "jekyll-theme-adobe-hyde"

And add this line to your Jekyll site's _config.yml:

theme: jekyll-theme-adobe-hyde

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-theme-adobe-hyde

Usage

Adding a Header Image

The following configuration options can be used in the _config.yml file

adobe_hyde:
    # The header image to use on the site
    header_image: <relative url of image>
    # The source url root for the documented code, i.e. `https://github.com/<org>/<repo>/blob/main`
    source_root: <source url root>
    # The path root for the documented code, corresponding to the `hyde --hyde-yaml-dir=` option, i.e. `/includes` if `hyde --hyde-yaml-dir=./includes`
    hyde_yaml_dir: <hyde yaml dir>

Customizing the Theme

The theme includes variable overrides that won't overwrite theme files. This lets you customize some of the layout and coloring parameters of the theme, and still keep up with the latest theme changes easily. To start, copy these three files from the theme to the same location in your local Jekyll site:

  • _sass/_overrides.scss
  • _sass/_overrides-light.scss
  • _sass/_overrides-dark.scss

You can customize theme variables within these files. See an example of this in the stlab.cc repository.

TODO: More documentation is needed for features such as {% include figure.md %}.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/adobe/hyde-theme. This project is intended to be a safe, welcoming space for collaboration. Please see the code of conduct and contributing documents.

Development

TODO: These instructions need to be updated. We don't currently have test content in the repo.

To set up your environment to develop this theme, run bundle install.

Your theme is setup just like a normal Jekyll site! To test your theme, run bundle exec jekyll serve and open your browser at http://localhost:4000. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.

When your theme is released, only the files in _layouts, _includes, _sass and assets tracked with Git will be bundled. To add a custom directory to your theme-gem, please edit the regexp in jekyll-theme-adobe-hyde.gemspec accordingly.

Cleanup / Linting

To run the cleanup / linter tool over the files in this repository:

find . -name '*.scss' | xargs -L 1 bundle exec sass-convert -i

License

The theme is available as open source under the terms of the Apache License 2.0.