Koru is a theme based on UCAR/NCAR’s custom ‘koru’ design. It is built on top the Foundation framework. This provides users and developers with responsiveness and accessibility.
Layouts
Default
The only front matter information required for default pages is:
---
layout:
title:
---
Front page
Front matter options for the front page are:
---
layout:
title:
banner-title:
banner-description:
banner-button-text:
banner-button-url:
---
Main menu
The main menu is set in the mainmenu.yml file in the _data directory. Paths can be both absolute and relative in the menu. The structure for creating a menu is:
menu:
- title: Software
url: /pages/documentation.html
Use the following structure to create submenus:
menu:
- title: Software
url: /pages/documentation.html
submenu:
- title: VAPOR
url: /pages/vapor.html
Update Koru base to Latest Version
- Run
npm update koru-base
(pulls in latest version from GitHub Registry) - Commit changes
Note: when in doubt, delete node_modules and re-run the previous steps
Jekyll Development
- If you haven’t already, set up a GitHub Access Token to publish, install, and delete packages.
- Set a
NPM_TOKEN
variable locally that will use the GitHub access token you just created.- To add the variable in your current session, run
export NPM_TOKEN=your-token-here
- Or add the variable to the configuration file of your shell environment (.bashrc, .zshrc, etc.)
- To add the variable in your current session, run
- Run
docker-compose build --build-arg NPM_TOKEN=${NPM_TOKEN} && docker-compose up
to run jekyll in a container.
New Release for downstream sites
- Commit and push your changes to GitHub
- Create a new version on GitHub
- Pull in the new release at
https://github.com/NCAR/jekyll-koru-test
in the_config.yml
file.
Google Analytics
To add Google Analytics code to your site:
- Log into Google Analytics
- If you have an existing site, go to your site’s Admin dashboard
- Under the “Property” column, click on “Tracking Info”
- Click on “Tracking Code”
- Copy your “Tracking ID”
- In your Jekyll _config.yml file, add “analytics: tracking-id”