Skip to content

Commit

Permalink
Merge branch 'hugo-fixit:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DerLinkman authored Jun 27, 2024
2 parents 015d2d1 + 9d1ab1a commit aa9878c
Show file tree
Hide file tree
Showing 146 changed files with 1,927 additions and 2,955 deletions.
19 changes: 19 additions & 0 deletions .auto-changelog/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"output": "CHANGELOG.md",
"template": ".auto-changelog/template.hbs",
"handlebarsSetup": ".auto-changelog/setup.js",
"sortCommits": "relevance",
"commitLimit": false,
"ignoreCommitPattern": "\\(ignore\\)",
"replaceText": {
"^(Feat|feat):": ":sparkles: Feat:",
"^(Fix|fix):": ":bug: Fix:",
"^(Build|build):": ":hammer: Build:",
"^(Refactor|refactor):": ":recycle: Refactor:",
"^(Style|style):": ":lipstick: Style:",
"^(Perf|perf):": ":zap: Perf:",
"^(Test|test):": ":white_check_mark: Test:",
"^(Docs|docs):": ":memo: Docs:",
"^(Chore|chore):": ":wrench: Chore:"
}
}
31 changes: 31 additions & 0 deletions .auto-changelog/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Custom Handlebars helpers
module.exports = function (Handlebars) {
/**
* Handlebars helper to replace a string with another string
* @param {String} context the string to replace
* @param {Object} options
* @param {String} options.hash.from the string to replace
* @param {String} options.hash.to the string to replace with
* @example {{replace "foo bar" from="foo" to="baz"}} => "baz bar"
*/
Handlebars.registerHelper('replace', function (context, options) {
return context.replace(options.hash.from, options.hash.to)
})
/**
* Handlebars helper to convert a name to a GitHub username
* @param {String} context name to convert
* @param {Object} options
* @param {Boolean} [options.hash.linked=true] whether to return a linked username
* @example {{githubUser "Cell"}} => "Lruihao"
*/
Handlebars.registerHelper('githubUser', function (context, { hash: { linked = false }}) {
const map = {
'Cell': "Lruihao",
}
const username = map[context] || context
if (linked) {
return `[@${username}](https://github.com/${username})`
}
return `@${username}`
})
}
70 changes: 70 additions & 0 deletions .auto-changelog/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Changelog

All notable changes to this project will be documented in this file.
{{!-- if need, set replaceText in config.json "#(\\d+)": "[#$1](https://github.com/hugo-fixit/FixIt/issues/$1)" --}}

{{#each releases}}
{{#if href}}
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
{{else}}
## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
{{/if}}

{{#if summary}}
{{summary}}
{{/if}}

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

{{!-- List commits that add new features, but exclude those that have `:sparkles:` in the message --}}
{{#commit-list commits heading='### :tada: New Features' message='(:tada:|Feat:|feat:)' exclude='^:sparkles:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List commits that enhance existing features, but exclude those that have `:tada:` in the message --}}
{{#commit-list commits heading='### :sparkles: Enhancements' message='(:sparkles:|Feat:|feat:|Perf:|perf:)' exclude='^:tada:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List commits that bug fixes --}}
{{#commit-list commits heading='### :bug: Bug Fixes' message='(:bug:|Fix:|fix:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List commits that improve the documentation --}}
{{#commit-list commits heading='### :memo: Documentation' message='(:memo:|Docs:|docs:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List other changes commits --}}
{{#commit-list commits heading='### :wrench: Other Changes' message='(Refactor:|refactor:|Style:|style:|Test:|test:|Chore:|chore:|Build:|build:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

**Full Changelog**: {{href}}

---

### Uncategorized

{{#if merges}}
#### Merged pull requests

{{#each merges}}
{{!-- {{#if href}}[`#{{id}}`]({{href}}){{/if}} --}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}} by {{githubUser author}} in {{#if id}}#{{id}}{{/if}}
{{/each}}
{{/if}}

{{#if fixes}}
#### Closed issues

{{#each fixes}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} {{#if id}}#{{id}}{{/if}}{{/each}} by {{githubUser commit.author}}
{{/each}}
{{/if}}

{{/each}}
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v3
with:
hugo-version: latest
extended: true
- name: Build Hugo static files
run: hugo -v --source=docs --gc --minify
run: hugo -v --source=demo --gc --minify
27 changes: 0 additions & 27 deletions .github/workflows/contributors.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions

name: Release for new tag

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- 'v*.*.*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for generating release notes

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies and generate release notes
run: |
npm install
npm run release -- --starting-version ${{ github.ref_name }}
- name: GitHub Release
uses: softprops/action-gh-release@v2
with:
# Creates a draft release. Defaults to false
draft: true
body_path: CHANGELOG.md
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ $RECYCLE.BIN/
## Linux
.directory


CHANGELOG.md
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ The MIT License (MIT)

Copyright (c) 2018 LIUZHICHAO.COM
Copyright (c) 2019-2020 DILLONZQ.COM
Copyright (c) 2021-2023 LRUIHAO.CN
Copyright (c) 2021-2024 Lruihao (https://lruihao.cn)

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
Expand Down
95 changes: 32 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,32 @@
# FixIt Theme | Hugo

[![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.112.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.123.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)

👉 English README | [简体中文说明](README.zh-cn.md)

> [FixIt](https://github.com/hugo-fixit/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 Theme](https://github.com/dillonzq/LoveIt), [KeepIt Theme](https://github.com/Fastbyte01/KeepIt) and [LeaveIt Theme](https://github.com/liuzc/LeaveIt).
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]

The FixIt theme inherits the excellent features of these themes, and adds new features and optimizations on those basis. Please read [Why Choose FixIt](#why-choose-fixit) to learn more.

![Hugo Theme FixIt](https://fixit.lruihao.cn/images/Apple-Devices-Preview.jpg)
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.webp)

## Getting started

Head to the [getting started page](http://fixit.lruihao.cn/documentation/getting-started/) or start with a template:

- [hugo-fixit/hugo-fixit-blog-git](https://github.com/hugo-fixit/hugo-fixit-blog-git)
- [hugo-fixit/hugo-fixit-blog-go](https://github.com/hugo-fixit/hugo-fixit-blog-go)

## [Documentation](https://fixit.lruihao.cn/categories/documentation/)

Head to this [documentation page](https://fixit.lruihao.cn/documentation/basics/) for a complete guidence to get started with the FixIt theme.

Or run [Documentation Site](https://fixit.lruihao.cn) locally, see more details from [Contributing](#contributing).

In addition, there is the [FixIt wiki](https://github.com/hugo-fixit/FixIt/wiki).

## Migrate from LoveIt

If you are currently using the LoveIt theme (or some other themes), it is very easy to migrate to FixIt.

You can add this repo as a submodule of your site directory. Alternatively, you can install the theme in [other ways](https://fixit.lruihao.cn/documentation/basics/#install-theme).

```bash
git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
```

And later you can update the submodule in your site directory to the latest commit using this command:

```bash
git submodule update --remote --merge
```
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/)

Next, go to the `hugo.toml` and change the default theme to `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).

```diff
- theme = "LoveIt"
+ theme = "FixIt"
```
## Template repository

Now the migration is finished and everything is ready 🎉

## Why choose FixIt

The FixIt theme inherits the excellent features of themes such as LoveIt, and adds new features and optimizations on those basis, as detailed in [Features](#features). In addition, the FixIt theme has the following advantages:

- Complete Chinese and English official documentations
- Community support: Theme official website, Discussions and official QQ group
- Continuously and actively update
- Constantly incorporate suggestions and ideas from all sides
- Highly open theme customizable section

In short, if you prefer the design language and freedom of the FixIt theme, and if you like to personalize your own themes as I do, the FixIt theme may be more suitable for you.
- [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)

## Who used FixIt

Expand Down Expand Up @@ -128,7 +90,7 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
- **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
- **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
- **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
- **Bilibili player** shortcode
- **Bilibili player** and **Douyin player** shortcode
- Kinds of **admonitions** shortcode
- **Custom style** shortcode
- **Custom script** shortcode
Expand All @@ -137,8 +99,13 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
- **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

The FixIt theme balances **simplicity** and **extensibility** with extra [Hugo theme components](https://fixit.lruihao.cn/components/) for customization.

## Multilingual and i18n

FixIt supports the following languages:
Expand All @@ -156,14 +123,13 @@ FixIt supports the following languages:
- Russian
- Romanian
- Vietnamese
- Hindi
- [Contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls)

[Languages Compatibility](https://fixit.lruihao.cn/documentation/basics/#language-compatibility)

## [Roadmap](https://github.com/hugo-fixit/FixIt/projects/1)

## [Changelog](/CHANGELOG.md)

## Questions, ideas, bugs, pull requests

All feedback is welcome! Head over to the [issues](https://github.com/hugo-fixit/FixIt/issues) or [discussions](https://github.com/hugo-fixit/FixIt/discussions) tracker.
Expand All @@ -176,11 +142,11 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib

**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**.

## [Contributors](contributors.md)

## Acknowledgements

<details open>
Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/contributors) for their support!

<details>
<summary>Thanks to the authors of following resources included in the theme:</summary>

- [normalize.css](https://github.com/necolas/normalize.css)
Expand Down Expand Up @@ -220,7 +186,7 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib

</details>

<details open>
<details>
<summary>The FixIt also draws on some features of the following projects, and thanks to their authors as well:</summary>

- [DoIt](https://github.com/HEIGE-PCloud/DoIt)
Expand All @@ -234,15 +200,18 @@ FixIt is licensed under the **MIT** license. Check the [LICENSE file](LICENSE) f

## Author

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

## Sponsor

Giving me a Star 🌟 is already the greatest encouragement and support for me.\
If you enjoy the theme, please consider buying me a coffee ☕️.
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)

If you enjoy the theme, please consider buying me a coffee ☕️. Thanks!

- [PayPal](https://paypal.me/Lruihao)
- [Alipay](images/alipay.jpg)
- [Wechat](images/wechatpay.jpg)

Thanks! ❤️
Don't forget to leave a ⭐️ if you like this theme, thanks!

[^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? 🤣
Loading

0 comments on commit aa9878c

Please sign in to comment.