Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/canstand/compost
Compost is a simple theme for Hugo built with tailwindcss.
https://github.com/canstand/compost
hugo hugo-theme tailwindcss
Last synced: 7 days ago
JSON representation
Compost is a simple theme for Hugo built with tailwindcss.
- Host: GitHub
- URL: https://github.com/canstand/compost
- Owner: canstand
- License: mit
- Created: 2021-09-27T11:12:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-19T15:54:56.000Z (4 months ago)
- Last Synced: 2025-01-16T14:26:14.602Z (14 days ago)
- Topics: hugo, hugo-theme, tailwindcss
- Language: HTML
- Homepage: https://canstand.github.io/compost/
- Size: 2.68 MB
- Stars: 55
- Watchers: 1
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Compost Theme | Hugo
Compost is a simple, lightweight theme for [Hugo](https://gohugo.io). Mainly based on the [Congo](https://github.com/jpanther/congo), also refer to [hugo-starter-tailwind-basic](https://github.com/bep/hugo-starter-tailwind-basic) and so on.
π[Demo site](https://canstand.github.io/compost/) | [δΈζ](https://canstand.github.io/compost/zh)
## Features
- Styles are based on [Tailwind CSS](https://tailwindcss.com/docs) 3.x, and the official [Typography plugin](https://github.com/tailwindlabs/tailwindcss-typography).
- You can build and test directly with the `hugo` command (using some of the tricks mentioned in [#8343](https://github.com/gohugoio/hugo/issues/8343)).
- π The article style is specially customized for the Simplified Chinese language (only applied when the lang of html is zh).
- β¨ Automatically resize images with Hugo's built-in function, and add native lazy loading attr (supported by browsers)## Usage
0. This theme uses `go modules`, not `git submodule`, to ensure that the [requirements](https://gohugo.io/hugo-modules/use-modules/#prerequisite) are met and to see the [instructions](https://gohugo.io/hugo-modules/use-modules/#initialize-a-new-module). ([Notes for Windows users](https://gohugo.io/getting-started/quick-start/#commands))
1. Set the theme in the Hugo project as `github.com/canstand/compost`, and add required options to `hugo.toml`:
```toml
# required
[build]
_merge = 'deep'# required
[markup]
_merge = 'deep'# for better seo
[minify]
_merge = 'deep'# required
[module]
[[module.mounts]]
source = 'assets'
target = 'assets'
[[module.mounts]]
source = "hugo_stats.json"
target = "assets/watching/hugo_stats.json"
[[module.imports]]
path="github.com/canstand/compost"
```2. Install or upgrade dependencies:
```bash
hugo mod get -u
hugo mod npm pack
npm install
```3. Then run your project as usual.
```bash
hugo server
```