Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Refactor: refactor the feed and search features #490

Merged
merged 22 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bc254bc
:mag: Refactor: add JSON feed support and refactor output formats bui…
Lruihao Aug 12, 2024
049f6bb
:truck: Feat: migrate index templates to layouts/_default folder and …
Lruihao Aug 12, 2024
dcd9d81
:pencil: Style(ignore): fix typo
Lruihao Aug 13, 2024
f9288d6
:truck: Chore: migrate index templates to default home templates
Lruihao Aug 13, 2024
65de5ca
:truck: Chore: migrate section templates to layouts/section folder
Lruihao Aug 13, 2024
008af16
:sparkles: Feat: add JSON feed support for section pages (#475)
Lruihao Aug 13, 2024
874913c
:construction: Feat: add common template for JSON feed (#475)
Lruihao Aug 13, 2024
4b8b685
:construction: Feat: add JSON feed support for section and term list …
Lruihao Aug 13, 2024
cd574fa
:rocket: Chore: fix git stage error in update-version script
Lruihao Aug 13, 2024
cbdfa1b
:zap: Perf: add front matter hiddenFromFeed for JSON feed (#475)
Lruihao Aug 13, 2024
eb8d027
:mag: Feat: add tags attribute for JSON feed (#475)
Lruihao Aug 13, 2024
2c123a3
:recycle: Refactor: refactor RSS feed templates
Lruihao Aug 13, 2024
1d651b5
:construction: WIP: rename json-feed.html to json.html
Lruihao Aug 13, 2024
9cb7523
:construction: Feat: revert single.md
Lruihao Aug 13, 2024
3581ee1
:zap: Perf: enhance JSON feed 1.1 compatibility
Lruihao Aug 14, 2024
4017cc9
:recycle: Refactor: refactor post author map getting
Lruihao Aug 15, 2024
3e8f4b0
:sparkles: WIP: add featured image support in feed
Lruihao Aug 15, 2024
852b883
:pencil: Docs: update README and screenshot
Lruihao Aug 15, 2024
7e22c33
:wrench: Chore: update changelog template
Lruihao Aug 16, 2024
d913b1f
:construction: WIP: add feed scoped config for section and list
Lruihao Aug 18, 2024
e9f2943
:fire: Feat: migrate JSON feed to hugo-fixit/hugo-json-feed
Lruihao Aug 24, 2024
733f38f
:truck: Feat: remove front matter hiddenFromRss and rssFullText, add…
Lruihao Aug 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CONTRIBUTING

Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.

## How to contribute to this project

First, fork this repository by clicking the fork button.
Expand Down
68 changes: 42 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,57 @@
# FixIt Theme | Hugo
<!-- markdownlint-disable-file MD033 MD041 -->
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.png)

<div align="center">English | <a href="README.zh-cn.md">简体中文</a></div>

<a title="FixIt website" href="https://fixit.lruihao.cn"><img align="right" alt="FixIt logo" width="70" height="70" src="https://avatars.githubusercontent.com/u/110414864?s=200&v=4"></a>

# FixIt

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.127.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)

👉 English README | [简体中文说明](README.zh-cn.md)
> «FixIt» is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).

[FixIt](https://github.com/hugo-fixit/FixIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LoveIt](https://github.com/dillonzq/LoveIt) Theme, [KeepIt](https://github.com/Fastbyte01/KeepIt) Theme and [LeaveIt](https://github.com/liuzc/LeaveIt) Theme.

It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [KeepIt Theme](https://github.com/Fastbyte01/KeepIt) and [LeaveIt Theme](https://github.com/liuzc/LeaveIt).[^1]
## Live Preview

![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.webp)
<p align="center">
💟 <a href="https://fixit.lruihao.cn">Production</a> | ❇️ <a href="https://pre.fixit.lruihao.cn">Preview</a> | 🚼 <a href="https://demo.fixit.lruihao.cn">Demo</a> | 🆕 <a href="https://hugo-fixit.github.io/hugo-fixit-starter/">Starter</a>
<br>
<br>
More «FixIt» examples <a href="https://fixit.lruihao.cn/showcase/">here</a>.
</p>

## Getting started
## Documentation

1. [Installation](https://fixit.lruihao.cn/documentation/installation/)
2. [Getting Started](https://fixit.lruihao.cn/documentation/getting-started/)
3. [Content Management](https://fixit.lruihao.cn/documentation/content-management/)
4. [Advanced Usage](https://fixit.lruihao.cn/documentation/advanced/)
Head to the [Quick Start](https://fixit.lruihao.cn/documentation/getting-started/quick-start/) page for a step-by-step guide on how to create a new website with FixIt.

Alternatively, you can run the [documentation site](https://fixit.lruihao.cn/) locally. For more details, see [hugo-fixit/docs](https://github.com/hugo-fixit/docs).
Outline: [Installation](https://fixit.lruihao.cn/documentation/installation/) ➜ [Getting Started](https://fixit.lruihao.cn/documentation/getting-started/) ➜ [Content Management](https://fixit.lruihao.cn/documentation/content-management/) ➜ [Advanced Usage](https://fixit.lruihao.cn/documentation/advanced/)

## Template repository

- [hugo-fixit/hugo-fixit-start](https://github.com/hugo-fixit/hugo-fixit-start/generate)
- [hugo-fixit/hugo-fixit-start1](https://github.com/hugo-fixit/hugo-fixit-start1/generate)
- [hugo-fixit/docs](https://github.com/hugo-fixit/docs/generate)
- [Lruihao/hugo-blog](https://github.com/Lruihao/hugo-blog/generate)
Click the following links to generate a new repository with template:

## Who used FixIt
| Template repository | Generate link |
| :----------------------------------------- | :----------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [Click][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [Click][starter1:generate] |
| [hugo-fixit/docs][docs] | [Click][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [Click][lruihao-blog:generate] |

To see this theme in action, here are some [live demo sites](https://fixit.lruihao.cn/friends/) which are rendered with **FixIt** theme.
[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
[starter1]: https://github.com/hugo-fixit/hugo-fixit-starter1
[starter1:generate]: https://github.com/hugo-fixit/hugo-fixit-starter1/generate
[docs]: https://github.com/hugo-fixit/docs
[docs:generate]: https://github.com/hugo-fixit/docs/generate
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate

<!-- ## Why choose FixIt -->

## Features

Expand Down Expand Up @@ -96,12 +116,12 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
- Kinds of **admonitions** shortcode
- **Custom style** shortcode
- **Custom script** shortcode
- Open more **custom blocks**
- **Animated typing** supported by [TypeIt](https://typeitjs.com/)
- **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent)
- **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark)
- **Chinese typesetting** supported by [pangu.js](https://github.com/vinta/pangu.js)
- Options to **cache remote image** locally
- High **extensibility**
- ...

### Theme Components
Expand Down Expand Up @@ -152,13 +172,12 @@ Don't forget to leave a ⭐️ if you like this theme, thanks!

## Contributing

- [Roadmap of FixIt](https://github.com/orgs/hugo-fixit/projects/2)

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for getting started with the contribution.
We welcome you to join the development of FixIt. Please see [contributing document](CONTRIBUTING.md). 🤗

Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
Also, we welcome Issue or PR to our [official-components](https://github.com/hugo-fixit).

**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**.
> [!note]
> When contributing, please first discuss the change you wish to make via a discussion on this repository before making the actual change.

## Acknowledgements

Expand Down Expand Up @@ -226,6 +245,3 @@ If you enjoy the theme, please consider buying me a coffee ☕️. Thanks!
## Author

[Lruihao](https://github.com/Lruihao "Follow me on GitHub")

<!-- footnote reference definition -->
[^1]: The theme name is interesting: "leave it, keep it, love it, fix it". Appears and leaves, loves but cannot keep. Doesn't it look like that damn love and BUG? 🤣
76 changes: 46 additions & 30 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,57 @@
# FixIt 主题 | Hugo
<!-- markdownlint-disable-file MD033 MD041 -->
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.png)

<div align="center"><a href="README.md">English</a> | 简体中文</div>

<a title="FixIt 官网" href="https://fixit.lruihao.cn/zh-cn/"><img align="right" alt="FixIt logo" width="70" height="70" src="https://avatars.githubusercontent.com/u/110414864?s=200&v=4"></a>

# FixIt

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.127.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)

👉 [English README](README.md) | 简体中文说明
> «FixIt» 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。

[FixIt](https://github.com/hugo-fixit/FixIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题
它的原型基于 [LoveIt](https://github.com/dillonzq/LoveIt) 主题,[KeepIt](https://github.com/Fastbyte01/KeepIt) 主题和 [LeaveIt](https://github.com/liuzc/LeaveIt) 主题

它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt),[KeepIt 主题](https://github.com/Fastbyte01/KeepIt) 和 [LeaveIt 主题](https://github.com/liuzc/LeaveIt)。[^1]
## 即时预览

![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.webp)
<p align="center">
💟 <a href="https://fixit.lruihao.cn/zh-cn/">Production</a> | ❇️ <a href="https://pre.fixit.lruihao.cn/zh-cn/">Preview</a> | 🚼 <a href="https://demo.fixit.lruihao.cn">Demo</a> | 🆕 <a href="https://hugo-fixit.github.io/hugo-fixit-starter/">Starter</a>
<br>
<br>
更多 «FixIt» 的例子参见 <a href="https://fixit.lruihao.cn/zh-cn/showcase/">这里</a>。
</p>

## 主题文档

1. [安装篇](https://fixit.lruihao.cn/zh-cn/documentation/installation/)
2. [入门篇](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/)
3. [内容管理](https://fixit.lruihao.cn/zh-cn/documentation/content-management/)
4. [进阶篇](https://fixit.lruihao.cn/zh-cn/documentation/advanced/)
前往 [快速上手](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/quick-start/) 页面,了解如何使用 FixIt 主题创建一个新网站的详细步骤。

或者在本地运行 [文档站点](https://fixit.lruihao.cn/zh-cn/),更多细节详见 [hugo-fixit/docs](https://github.com/hugo-fixit/docs)。
大纲:[安装篇](https://fixit.lruihao.cn/zh-cn/documentation/installation/) ➜ [入门篇](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/) ➜ [内容管理](https://fixit.lruihao.cn/zh-cn/documentation/content-management/) ➜ [进阶篇](https://fixit.lruihao.cn/zh-cn/documentation/advanced/)

## 模板仓库

- [hugo-fixit/hugo-fixit-start](https://github.com/hugo-fixit/hugo-fixit-start/generate)
- [hugo-fixit/hugo-fixit-start1](https://github.com/hugo-fixit/hugo-fixit-start1/generate)
- [hugo-fixit/docs](https://github.com/hugo-fixit/docs/generate)
- [Lruihao/hugo-blog](https://github.com/Lruihao/hugo-blog/generate)
点击以下链接使用模板生成一个新的仓库:

## 谁在用 FixIt
| 模板仓库 | 生成链接 |
| :----------------------------------------- | :-------------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [点击生成][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [点击生成][starter1:generate] |
| [hugo-fixit/docs][docs] | [点击生成][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [点击生成][lruihao-blog:generate] |

为了直观地浏览主题特性,这里有一些基于 **FixIt** 主题渲染的 [预览网站](https://fixit.lruihao.cn/zh-cn/friends/)。
[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
[starter1]: https://github.com/hugo-fixit/hugo-fixit-starter1
[starter1:generate]: https://github.com/hugo-fixit/hugo-fixit-starter1/generate
[docs]: https://github.com/hugo-fixit/docs
[docs:generate]: https://github.com/hugo-fixit/docs/generate
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate

<!-- ## 为什么选择 FixIt -->

## 特性

Expand Down Expand Up @@ -96,17 +116,17 @@
- 支持多种**注释**的 shortcode
- 支持**自定义样式**的 shortcode
- 支持**自定义脚本**的 shortcode
- 支持**自定义模板块**
- 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode
- 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅**
- 支持基于 [cell-watermark](https://github.com/Lruihao/watermark) 的**网页水印**
- 支持基于 [pangu.js](https://github.com/vinta/pangu.js) 的**中文排版**
- 支持本地**缓存远程图床图片**
- 高**扩展性**
- ……

### 主题组件

FixIt 主题旨在在 **简洁性****可扩展性** 之间取得平衡。为此,我们开发了一系列额外的 [Hugo 主题组件](https://fixit.lruihao.cn/zh-cn/components/) 供用户选择。
FixIt 主题旨在在**简洁性****可扩展性**之间取得平衡。为此,我们开发了一系列额外的 [Hugo 主题组件](https://fixit.lruihao.cn/zh-cn/components/) 供用户选择。

## 多语言和国际化

Expand All @@ -130,6 +150,10 @@ FixIt 支持下列语言:

[语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility)

## 镜像

Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>

## 社区支持

所有的反馈都是欢迎的!详见 [Discussions][discussions]、[Pull requests][pulls] 和 [Issues][issues]。
Expand All @@ -152,17 +176,12 @@ FixIt 支持下列语言:

## 参与贡献

- [Hugo FixIt 路线图](https://github.com/orgs/hugo-fixit/projects/2)

请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 以了解贡献该项目的基本信息。

确保在贡献和参与讨论时遵守 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)。
我们欢迎你加入 FixIt 的开发,贡献出你的一份力量。请看开源 [贡献指南](CONTRIBUTING.md)。 🤗

**贡献时,请先通过此存储库上的问题讨论你希望进行的更改,然后再进行实际更改**
你也可以随时向我们的 [官方插件](https://github.com/hugo-fixit) 提交 Issue 或 Pull Request

## 镜像

- Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
> [!note]
> 在贡献时,请先通过此存储库上的讨论来讨论你希望进行的更改,然后再进行实际更改。

## 致谢

Expand Down Expand Up @@ -230,6 +249,3 @@ FixIt 根据 **MIT** 许可协议授权。更多信息请查看 [LICENSE 文件]
## 作者

[Lruihao](https://github.com/Lruihao "在 GitHub 上关注我")

<!-- footnote reference definition -->
[^1]: 主题名称趣谈:“leave it, keep it,love it,fix it”。出现又离开,爱而不得。这像不像那该死的爱情和 BUG 呢?🤣
2 changes: 1 addition & 1 deletion archetypes/post-bundle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
hiddenFromRelated: false
hiddenFromFeed: false
summary:
resources:
- name: featured-image
Expand Down
2 changes: 1 addition & 1 deletion archetypes/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
hiddenFromRelated: false
hiddenFromFeed: false
summary:
resources:
- name: featured-image
Expand Down
2 changes: 1 addition & 1 deletion build/changelog/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file.
{{/if}}

{{!-- List commits with `Breaking change: ` somewhere in the message --}}
{{#commit-list commits heading='### :boom: Breaking Changes' message='^(Breaking change|BREAKING CHANGE):'}}
{{#commit-list commits heading='### :boom: Breaking Changes' message='(:boom:|Breaking change:|BREAKING CHANGE:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

Expand Down
4 changes: 2 additions & 2 deletions build/update-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const latestVersion = stage === 'version' ? version : devVersion;
const lastVersion = initHtml.match(/v\d+\.\d+\.\d+(-\w+)?/)[0];
const newInitHtml = initHtml.replace(/v\d+\.\d+\.\d+(-\w+)?/, `v${latestVersion}`);
fs.writeFileSync(initHtmlPath, newInitHtml);
// Add the updated file to the git stage
execSync('git add .');
// Add the updated files to the git stage
execSync('git add layouts/partials/init/index.html package.json package-lock.json');
console.log(`Update the FixIt version from ${lastVersion} to v${latestVersion}.`);

export default latestVersion;
Loading