Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
* dev:
  🔥 Feat: remove `params.dev.githubtoken` adn replace with environment variable `HUGO_PARAMS_GHTOKEN`
  Docs: 完善 link shortcode (hugo-fixit/FixIt#391)
  Docs: 更新 Gravatar 镜像
  Docs: 更新打赏设置
  🔧 Chore: remove unnecessary parameters in package.json
  Docs: 贡献文档关闭推荐阅读功能
  Fix: 兼容低版本 hugo relref 写法
  Docs: 贡献指南加上封面图
  Docs: 完善贡献文档
  Docs: 增加贡献文档(未完成)
  • Loading branch information
Lruihao committed May 6, 2024
2 parents 45712f8 + c77e8a5 commit a09801d
Show file tree
Hide file tree
Showing 33 changed files with 614 additions and 98 deletions.
2 changes: 0 additions & 2 deletions config/.gitignore

This file was deleted.

2 changes: 2 additions & 0 deletions config/_default/markup.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
table = true
taskList = true
typographer = true
# TODO passthrough refactor https://gohugo.io/getting-started/configuration-markup/#parserattributeblock
# TODO hugo 0.122.0 https://gohugo.io/content-management/mathematics/
[goldmark.parser]
autoHeadingID = true
autoHeadingIDType = "github"
Expand Down
11 changes: 11 additions & 0 deletions config/_default/menus.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
identifier = "components"
parent = "about"
name = "Components"
title = "Hugo FixIt Components"
url = "components/"
weight = 24
[main.params]
Expand All @@ -111,6 +112,16 @@
weight = 26
[main.params]
icon = "fa-solid fa-microchip"
[[main]]
identifier = "contributing"
parent = "about"
name = "Contributing"
title = "Contribute to the FixIt project"
url = "contributing/overview/"
weight = 27
[main.params]
icon = "fa-solid fa-heart-circle-bolt text-danger fa-beat"
class = "fa-bounce"

[[main]]
identifier = "github"
Expand Down
18 changes: 14 additions & 4 deletions config/_default/menus.zh-cn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
icon = "fa-regular fa-comments"
[[main]]
identifier = "guides"
parent = "about"
name = "相关教程"
url = "guides/"
weight = 23
parent = "about"
[main.params]
icon = "fa-regular fa-compass"
[[main]]
Expand All @@ -97,20 +97,30 @@
icon = "fa-solid fa-puzzle-piece"
[[main]]
identifier = "showcase"
parent = "about"
name = "案例展示"
url = "showcase/"
weight = 25
parent = "about"
[main.params]
icon = "fa-solid fa-blog"
[[main]]
identifier = "references"
name = "参考"
parent = "about"
name = "API 参考"
url = "references/overview/"
weight = 26
parent = "about"
[main.params]
icon = "fa-solid fa-microchip"
[[main]]
identifier = "contributing"
parent = "about"
name = "贡献指南"
title = "为 FixIt 项目做贡献"
url = "contributing/overview/"
weight = 27
[main.params]
icon = "fa-solid fa-heart-circle-bolt text-danger fa-beat"
class = "fa-bounce"

[[main]]
identifier = "github"
Expand Down
9 changes: 5 additions & 4 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ disableThemeInject = false
enable = true
# Gravatar host, default: "www.gravatar.com"
# Gravatar 主机,默认:“www.gravatar.com”
host = "gravatar.lruihao.cn" # ["cn.gravatar.com", "gravatar.loli.net", ...]
host = "cravatar.cn" # ["cravatar.cn", "gravatar.loli.net", ...]
style = "mp" # ["", "mp", "identicon", "monsterid", "wavatar", "retro", "blank", "robohash"]

# Back to top
Expand Down Expand Up @@ -1064,14 +1064,15 @@ disableThemeInject = false

# FixIt 0.2.15 | NEW Developer options
# FixIt 0.2.15 | 新增 开发者选项
# Select the scope named `public_repo` to generate personal access token,
# Configure with environment variable `HUGO_PARAMS_GHTOKEN=xxx`, see https://gohugo.io/functions/os/getenv/#examples
# 选择命名为 "public_repo" 的范围以生成个人访问令牌,
# 配置环境变量 HUGO_PARAMS_GHTOKEN=xxx,详见 https://gohugo.io/functions/os/getenv/#examples
[dev]
enable = false
# Check for updates
# 检查更新
c4u = false
# For using the GitHub API, please do not expose to public!
# 用于使用 GitHub API,请勿公开展示!
githubToken = ""
# Mobile Devtools config
# 移动端开发者工具配置
[dev.mDevtools]
Expand Down
16 changes: 16 additions & 0 deletions config/development/params.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -------------------------------------------------------------------------------------
# Theme Core Configuration
# See: https://fixit.lruihao.cn/theme-documentation-basics/#site-configuration
# -------------------------------------------------------------------------------------

# FixIt 0.2.15 | NEW Developer options
# Configure with environment variable HUGO_PARAMS_GHTOKEN=xxx, see https://gohugo.io/functions/os/getenv/#examples
[dev]
enable = false
# Check for updates
c4u = true
# Mobile Devtools confi
[dev.mDevtools]
enable = false
# "vConsole", "eruda" supported
type = "vConsole"
9 changes: 9 additions & 0 deletions content/en/contributing/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Contributing
date: 2024-04-25T20:17:52+08:00
description: Hugo FixIt is eager for enthusiasm and participation from the open-source community. We need your support.
keywords:
- hugo-fixit
- FixIt
- Contribution
---
26 changes: 26 additions & 0 deletions content/en/contributing/components/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Develop theme components (TODO)
date: 2024-04-25T20:30:45+08:00
type: posts
collections:
- Contributing
draft: true
hiddenFromHomePage: true
reward: true
related:
enable: false
---
<!-- markdownlint-disable-file reference-links-images -->
If you’ve built a Hugo theme components and want to contribute back to the Hugo FixIt Community, please share it with us.

<!--more-->

Visit [this page][components] to browse a collection of themes components created by the Hugo FixIt community.

## References

Head to the [References][references] page for more information.

<!-- link reference definition -->
[components]: {{< relref "/components/" >}}
[references]: {{< relref "/references/" >}}
49 changes: 49 additions & 0 deletions content/en/contributing/development/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Develop FixIt theme
date: 2024-04-25T20:30:43+08:00
type: posts
collections:
- Contributing
hiddenFromHomePage: true
reward: true
related:
enable: false
---

Contribute to the development of FixIt.

<!--more-->

## Introduction

You can contribute to the FixIt theme project by:

- Answering questions on the [discussions][discussions] page
- Squashing [bugs][bugs]
- Developing [new features][features]

For a complete guide to contributing to FixIt, see the [Contribution Guide][contribution-guide].

## Prerequisites

To contribute to the development of the FixIt theme, you need to:

- Install [Hugo][hugo] with the extended version
- Install [Go][go]
- Install [Git][git]
- Install [Node.js][node] above version 18.0.0

## References
<!-- markdownlint-disable-file reference-links-images -->
Head to the [References][references] page for more information.

<!-- link reference definition -->
[discussions]: https://github.com/orgs/hugo-fixit/discussions
[bugs]: https://github.com/hugo-fixit/FixIt/issues?q=is%3Aopen+is%3Aissue+label%3Abug
[features]: https://github.com/hugo-fixit/FixIt/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement
[contribution-guide]: https://github.com/hugo-fixit/FixIt/blob/master/CONTRIBUTING.md
[hugo]: https://gohugo.io/installation/
[go]: https://go.dev/doc/install
[git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
[node]: https://nodejs.org/en/download/
[references]: {{< relref "/references/" >}}
83 changes: 83 additions & 0 deletions content/en/contributing/documentation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Improve documentation
date: 2024-04-25T20:30:44+08:00
type: posts
collections:
- Contributing
hiddenFromHomePage: true
reward: true
related:
enable: false
---

Help us to improve the documentation by identifying issues and suggesting changes.

<!--more-->

## Introduction

We welcome corrections and improvements to the documentation. Please note that the documentation resides in its own repository, separate from the project repository.

For corrections and improvements to the current documentation, please submit issues and pull requests to the [documentation repository][docs].

You can also:
<!-- markdownlint-disable-file reference-links-images -->
- Submit [showcase][showcase] by editing the `data/friends.yml` file
- Submit [theme components][components] by editing the `data/projects.lang.yml` file

## Prerequisites

To contribute to the documentation, you need to:

- Install [Hugo][hugo] with the extended version
- Install [Go][go]
- Install [Git][git]
- Install [Node.js][node] above version 18.0.0

## Guidelines

First, fork this repository by clicking the fork button.

Next, clone your forked repo.

```bash
git clone https://github.com/hugo-fixit/docs.git fixit-docs && cd fixit-docs
```

Then, install the dev dependencies.

```bash
npm install
```

And now you are ready to go!

Here are some useful commands.

```bash
# run a local debugging server with watch
npm run server
# run a local debugging server with watch in production environment
npm run server:production
# see Edit the theme section
npm run server:development
```

## Edit the theme

If you want to do docs-related theme changes, the simplest way is to have both `fixit-docs` and `FixIt` cloned as sibling directories, and then run:

```bash
HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"
```

Finally, create a new pull request at <https://github.com/hugo-fixit/docs/pulls> to submit your contribution 🎉

<!-- link reference definition -->
[docs]: https://github.com/hugo-fixit/docs
[hugo]: https://gohugo.io/installation/
[go]: https://go.dev/doc/install
[git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
[node]: https://nodejs.org/en/download/
[showcase]: {{< relref path="/showcase" >}}
[components]: {{< relref "/components" >}}
Binary file added content/en/contributing/overview/cover.webp
Binary file not shown.
34 changes: 34 additions & 0 deletions content/en/contributing/overview/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Contribute to the FixIt project
linkTitle: Overview of contributing
date: 2024-04-25T20:30:42+08:00
collections:
- Contributing
resources:
- name: featured-image
src: cover.webp
type: posts
pageStyle: wide
reward: true
related:
enable: false
description: Hugo FixIt is eager for enthusiasm and participation from the open-source community. We need your support!
keywords:
- hugo-fixit
- FixIt
- Contribution
---

Hugo FixIt is eager for enthusiasm and participation from the open-source community. We need your support!

<!--more-->

{{< link "../development" "🔧 Develop FixIt theme" "Contribute to the development of FixIt." true >}}

---

{{< link "../documentation" "📝 Improve documentation" "Help us to improve the documentation by identifying issues and suggesting changes." true >}}

---

{{< link "../components" "🧩 Develop theme components" "Contribute to the development of Hugo FixIt components." true >}}
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Find out how to encrypt content in FixIt theme.

## Page Encryption

### Frontmatter
### Front matter

The FixIt theme provides two frontmatters for page encryption.
The FixIt theme provides two front matters for page encryption.

- **password**: _[required]_ password of encrypted page content
- **message**: _[optional]_ encryption prompt

For example, the frontmatters in this article are as follows:
For example, the front matters in this article are as follows:

```yaml
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
weight: 2
title: Content Management Overview
date: 2024-04-06T12:57:26+08:00
type: posts
Expand Down
Loading

0 comments on commit a09801d

Please sign in to comment.