This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
forked from canstand/compost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
577 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ insert_final_newline = true | |
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
# Compost Theme | Hugo | ||
|
||
Compost is a simple theme for [Hugo](https://gohugo.io). | ||
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. | ||
|
||
It is based on the original [hugo-starter-tailwind-basic](https://github.com/bep/hugo-starter-tailwind-basic) and [Congo](https://github.com/jpanther/congo). | ||
🌏[Demo site](https://canstand.github.io/compost/) | ||
|
||
## Usage (As a Theme) | ||
## Features | ||
The main differences with [Congo](https://github.com/jpanther/congo): | ||
- The text style is customized for the [Chinese language](https://canstand.github.io/compost/zh/posts/typography/) (automatically applied when lang is zh), which does not affect the entire site English. | ||
- The Tailwind CSS JIT mode is not used. Therefore, you can directly use `hugo server -D` to test, the lack of which is that the build will take longer. | ||
|
||
Import `github.com/canstand/compost` into your project, and then run: | ||
## Usage | ||
|
||
1. Set the theme in the Hugo project as `github.com/canstand/compost`: | ||
```toml | ||
theme = 'github.com/canstand/compost' | ||
``` | ||
|
||
2. Install or upgrade dependencies: | ||
```bash | ||
hugo mod get -u | ||
hugo mod npm pack | ||
npm install | ||
``` | ||
|
||
Then run your project as usual. | ||
|
||
3. Then run your project as usual. | ||
```bash | ||
hugo server | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Hugo Compost 主题 | ||
|
||
Compost 是一个简单、轻量级的 [Hugo](https://gohugo.io) 主题。主要基于 [Congo](https://github.com/jpanther/congo) 改造,并参考了 [hugo-starter-tailwind-basic](https://github.com/bep/hugo-starter-tailwind-basic) 等。 | ||
|
||
🌏[演示站点](https://github.com/canstand/compost/zh) | ||
|
||
## 特性 | ||
与 [Congo](https://github.com/jpanther/congo) 的主要区别: | ||
* 针对简体中文语言定制了正文样式(lang 为 zh 时自动应用),不影响全站英文。 | ||
* 暂时没用 Tailwind CSS JIT 模式。因此可以直接用 `hugo server -D` 测试,缺占是 build 耗时会长一些。 | ||
|
||
## 使用 | ||
|
||
1. 在 Hugo 项目里指定主题为 `github.com/canstand/compost`: | ||
```toml | ||
theme = 'github.com/canstand/compost' | ||
``` | ||
|
||
2. 安装或升级依赖: | ||
|
||
```bash | ||
hugo mod get -u | ||
hugo mod npm pack | ||
npm install | ||
``` | ||
|
||
3. 之后按正常开发与测试: | ||
|
||
```bash | ||
hugo server | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: {{ replace .Name "-" " " | title }} | ||
date: {{ .Date }} | ||
draft: true | ||
description: "" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ body a, | |
body button { | ||
@apply transition; | ||
} | ||
|
||
body:lang(zh) { | ||
-webkit-font-smoothing: subpixel-antialiased; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.