mirror of https://github.com/onweru/compose.git

edit | blame | history | raw

Compose

Compose is a Hugo theme for documentation websites, inspired by forestry.io's docs page. The theme provides a simple navigation & structure.

Hugo Compose Theme

Features

  1. Docs
  2. Gallery Support (via shortcode)
  3. Native lazy loading of images

Installation

Install a recent release of the Hugo "extended" version; ideally versions >= 0.61.0. If you install from hugo releases page, download the _extended version, which supports sass.

Run your site with compose theme

You could go with the options right below.

Option 1 (my favorite)

This option enables you to load compose theme as a hugo module.

git clone https://github.com/onweru/compose.git
cd compose/exampleSite/
hugo server

There's one drawback to this technique. Your site would always use the most up-to-date version of the theme. This might break your site if there are drastic changes that you don't like.

You can overcome that drawback by forking the repo instead and following the same approach. Be sure the edit the theme = ["github.com/onweru/compose"] from the config.toml file appropriately.

⚠️ If you choose Option 2 or Option 3 below, ensure you edit these lines in the config.toml file as advised on the comments

Option 2 (recommended)

Generate a new Hugo site and add this theme as a Git submodule inside your themes folder:

hugo new site yourSiteName
cd yourSiteName
git init
git submodule add https://github.com/onweru/compose.git themes/compose
cp -a themes/compose/exampleSite/* .

Then run

hugo server

Hurray!

Option 3 (Great for testing quickly)

You can run your site directly from the exampleSite. To do so, use the following commands:

git clone https://github.com/onweru/compose.git
cd compose/exampleSite/
hugo server --themesDir ../..

Although, option 3 is great for quick testing, it is somewhat problematic when you want to update your theme. You would need to be careful not to overwrite your changes.

Once set, jump over to the config.toml file and start configuring your site.

ExampleSite

The exampleSite, as the theme's user guide.

This guide covers the necessary bits. As the project evolves, the userguide will get more comprehensive

You can use Hugo to generate and serve a local copy of the guide (also useful for testing local theme changes), making sure you have installed all the prerequisites listed above:

git clone --recurse-submodules --depth 1 https://github.com/onweru/compose.git
cd compose/exampleSite/
hugo server --themesDir ../..

Note that you need the themesDir flag when running Hugo because the site files are inside the theme repo.

How do I disable dark mode?

Under params add enableDarkMode = false to your config.toml file. If your site is based on the exampleSite, the value is already included; you only need to uncomment it.

The user will still have the option to activate dark mode, if they so wish

From the same creator

  1. Clarity Theme
  2. Newsroom Theme
  3. Swift Theme

License

This theme is available under the MIT license.

edit | blame | history | raw
MIT License

Copyright (c) 2020 Weru

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
.github/ISSUE_TEMPLATE/bug_report 773 b
.github/ISSUE_TEMPLATE/feature_request 558 b
.github/pull-request_template 429 b
CODE_OF_CONDUCT 857 b
README 2 KB
exampleSite/README 183 b
exampleSite/content/_index 1 KB
exampleSite/content/blog/_index 22 b
exampleSite/content/blog/creating-a-new-theme 47 KB
exampleSite/content/blog/emoji-support 2 KB
exampleSite/content/blog/goisforlovers 10 KB
exampleSite/content/blog/hugoisforlovers 3 KB
exampleSite/content/blog/migrate-from-jekyll 7 KB
exampleSite/content/docs/_index 612 b
exampleSite/content/docs/clarity/_index 387 b
exampleSite/content/docs/clarity/blogging 2 KB
exampleSite/content/docs/clarity/customize 6 KB
exampleSite/content/docs/clarity/features 705 b
exampleSite/content/docs/clarity/getting-started 2 KB
exampleSite/content/docs/clarity/images 4 KB
exampleSite/content/docs/clarity/syntax-highlighting 2 KB
exampleSite/content/docs/clarity/theme-overrides 2 KB
exampleSite/content/docs/compose/_index 307 b
exampleSite/content/docs/compose/customize 3 KB
exampleSite/content/docs/compose/github-actions 761 b
exampleSite/content/docs/compose/graphs-charts-tables 3 KB
exampleSite/content/docs/compose/install-theme 3 KB
exampleSite/content/docs/compose/mermaid 16 KB
exampleSite/content/docs/compose/organize-content 1 KB
exampleSite/content/docs/compose/search 3 KB
exampleSite/content/docs/compose/shortcodes-example 2 KB
exampleSite/content/docs/compose/shortcodes 6 KB
exampleSite/content/docs/compose/use-tina-cms 2 KB
exampleSite/content/search 58 b
exampleSite/content/tutorials/_index 547 b
exampleSite/content/tutorials/example/_index 324 b
exampleSite/content/tutorials/example/mermaid 8 KB