diff options
author | Thomas Heller <thomas.m.heller@gmail.com> | 2017-03-18 14:32:20 +0300 |
---|---|---|
committer | Thomas Heller <thomas.m.heller@gmail.com> | 2017-03-18 14:32:20 +0300 |
commit | de8a313a83624dfbc02984a2c737287a1996c226 (patch) | |
tree | 84e1223f35c733b601f0f3818d401e24d0f18c39 | |
parent | 7ab7d12a2489ec0d9cc56d87d3c3995369f85b64 (diff) |
explaining install, usage and features
-rw-r--r-- | README.md | 63 |
1 files changed, 63 insertions, 0 deletions
@@ -11,6 +11,69 @@ site generator. - nested menus - two-column +## Installation + +Read the [Hugo Quickstart +Guide](https://gohugo.io/overview/quickstart/) for an introduction to +Hugo itself. Once you created a new Hugo site, you can use the Crab +theme. + +In your Hugo site's folder: + +```sh +$ git clone https://github.com/thomasheller/crab themes/dimension +``` + +Alternatively, if your site is in a git repository, you can use git +submodules: + +```sh +$ git submodule add https://github.com/thomasheller/crab themes/dimension +``` + +To update the theme to the latest version, simply pull in the changes: + +```sh +$ git -C themes/crab pull +``` + +## Usage + +The file `exampleSite/config.toml` provides an example for how the +Crab theme can be configured, especially in regard to the menu items. + +Once you put a `config.toml` in your site's root directory, you can +get a preview of your Hugo site as usual: + +```sh +$ hugo serve -t crab +``` + +## Menus + +See the `exampleSite/config.toml` file for how the menus can be +configured: + +- Use the `weight` attribute to specify the order of menu items. + Menu items with smaller numbers appear before those with bigger + numbers. +- For every menu, specify an `identifier` if you intend the menu to + have sub-items. In each sub-item, make sure the `parent` attribute + matches the value of the `identifier` used for the parent menu. +- Choose a unique `name` for each item in the same menu. + +## Two-column layout + +Look at the `exampleSite/content/home.md` file for a sidebar example. +If you put a shortcode like this at the beginning of your content +file, the summary will appear in the right column: + +```md +{{% summary %}} +This appears in the sidebar. *Markdown* is supported! +{{% /summary %}} +``` + ## Contact If you think anything could be improved about the Crab theme, feel |