-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
0 parents
commit 389b779
Showing
149 changed files
with
1,806 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Cloudflare Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
deployments: write | ||
name: Publish to Cloudflare Pages | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: npm i -g postcss-cli autoprefixer @fullhuman/postcss-purgecss rtlcss | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: 'latest' | ||
extended: true | ||
|
||
- name: Cache Hugo modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/hugo_cache | ||
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-hugomod- | ||
- name: Build | ||
run: hugo --minify --gc --enableGitInfo | ||
|
||
- name: Publish to Cloudflare Pages | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: hb-theme | ||
directory: ./public | ||
# Optional: Enable this if you want to have GitHub Deployments triggered | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |
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,23 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
tags: example.com/user/site |
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,73 @@ | ||
name: GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: 'latest' | ||
extended: true | ||
|
||
- name: Install Node.js dependencies | ||
run: npm i -g postcss-cli autoprefixer @fullhuman/postcss-purgecss rtlcss | ||
|
||
- name: Build with Hugo | ||
env: | ||
HUGO_ENVIRONMENT: production | ||
HUGO_ENV: production | ||
run: | | ||
hugo \ | ||
--minify \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./public | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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,5 @@ | ||
.hugo_build.lock | ||
hugo_stats.json | ||
package-json.lock | ||
public/ | ||
node_modules/ |
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,8 @@ | ||
pull_request_rules: | ||
- name: automatic merge for Renovate pull requests | ||
conditions: | ||
- author=renovate[bot] | ||
- check-success=build | ||
actions: | ||
merge: | ||
method: rebase |
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,21 @@ | ||
############### | ||
# Build Stage # | ||
############### | ||
FROM razonyang/hugo:exts as builder | ||
# Base URL | ||
ARG HUGO_BASEURL= | ||
ENV HUGO_BASEURL=${HUGO_BASEURL} | ||
# Module Proxy | ||
ARG HUGO_MODULE_PROXY= | ||
ENV HUGO_MODULE_PROXY=${HUGO_MODULE_PROXY} | ||
# Build site | ||
COPY . /src | ||
RUN hugo --minify --gc --enableGitInfo | ||
# Set the fallback 404 page if defaultContentLanguageInSubdir is enabled, please replace the `en` with your default language code. | ||
RUN cp ./public/en/404.html ./public/404.html | ||
|
||
############### | ||
# Final Stage # | ||
############### | ||
FROM razonyang/hugo:nginx | ||
COPY --from=builder /src/public /site |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Razon Yang | ||
|
||
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 the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,41 @@ | ||
# HB Theme Template | ||
|
||
The starter theme template of [HB Framework](https://hb.hugomods.com). | ||
|
||
## Features | ||
|
||
- **Fast** and **SEO** friendly: [PageSpeed Insight](https://pagespeed.web.dev/analysis?url=https://hb-theme.hugomods.com/en/) scored perfect :100: in all four metrics on mobile and desktop. | ||
- **Multi-purpose**: blog, project documentations, digital garden and so on. | ||
- **Responsive**: mobile first, built on top of Bootstrap v5.3. | ||
- :ice_cube: **Modular** and **flexible**: extend features via various modules. | ||
- :first_quarter_moon: **Dark mode**: light, dark or auto (follow system). | ||
- :mag: **Search**: powerful client side *fuzzy* search that allows *filtering* and *sorting* of results, as well as searching from all multilingual sites. | ||
- **PurgeCSS**: remove unused CSS. | ||
- :rocket: **PWA**: | ||
- Installable: add site to home screen. | ||
- Offline available: offline page and offline image. | ||
- Allow precaching resources, such as CSS, JS and fonts. | ||
- :framed_picture: **Images Processing**: process images via URL query string and fragment, such as alignment, resizing, cropping and so on, friendly to Markdown. | ||
- :computer: **Code block panel**: expand toggle, code copy button, line number toggle and wrap toggle. | ||
- **Menus**: supports header menus and footer menus. | ||
- :framed_picture: Image viewer: zoom in/out image. | ||
- :card_index_dividers: **Archives**: group by year and month. | ||
- :memo: **Multiple authors**: articles can be co-authored. | ||
- :globe_with_meridians: **Multilingual**. | ||
- :arrow_left: **RTL**: supports Right-to-Left languages. | ||
- :arrow_up: Back/Return to top button. | ||
- Social links: supports header and footer social links. | ||
- Content: supports KaTex (math), Mermaid (diagrams) and Bootstrap shortcodes. | ||
- ... | ||
|
||
## Live Demos | ||
|
||
| Platform | URL | | ||
| -------- | --- | | ||
| Cloudflare Pages | https://hb-theme.hugomods.com/ | | ||
| GitHub Pages | https://hbstack.github.io/theme/ | | ||
| Netlify | https://hb-theme.netlify.app/ | | ||
|
||
## Screenshot | ||
|
||
![Screenshot](https://raw.githubusercontent.com/hbstack/theme/main/images/screenshot.png) |
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 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
description: | ||
noindex: false | ||
featured: false | ||
pinned: false | ||
series: | ||
# - | ||
categories: | ||
# - | ||
tags: | ||
# - | ||
images: | ||
# - | ||
# menu: | ||
# main: | ||
# weight: 100 | ||
# params: | ||
# icon: | ||
# vendor: bs | ||
# name: book | ||
# color: '#e24d0e' | ||
--- | ||
|
||
Summary. | ||
|
||
<!--more--> | ||
|
||
Content. |
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,35 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
# linkTitle: | ||
date: {{ .Date }} | ||
draft: true | ||
description: | ||
noindex: false | ||
nav_weight: 1000 | ||
# nav_icon: | ||
# vendor: bootstrap | ||
# name: toggles | ||
# color: '#e24d0e' | ||
series: | ||
- Docs | ||
categories: | ||
# - | ||
tags: | ||
# - | ||
images: | ||
# - | ||
# menu: | ||
# main: | ||
# weight: 100 | ||
# params: | ||
# icon: | ||
# vendor: bs | ||
# name: book | ||
# color: '#e24d0e' | ||
--- | ||
|
||
Summary. | ||
|
||
<!--more--> | ||
|
||
Content. |
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,34 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
# linkTitle: | ||
date: {{ .Date }} | ||
draft: true | ||
description: | ||
noindex: false | ||
nav_weight: 1000 | ||
# nav_icon: | ||
# vendor: bootstrap | ||
# name: toggles | ||
# color: '#e24d0e' | ||
series: | ||
- Tutorial | ||
categories: | ||
# - | ||
tags: | ||
# - | ||
images: | ||
# menu: | ||
# main: | ||
# weight: 100 | ||
# params: | ||
# icon: | ||
# vendor: bs | ||
# name: book | ||
# color: '#e24d0e' | ||
--- | ||
|
||
Summary. | ||
|
||
<!--more--> | ||
|
||
Content. |
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 @@ | ||
jsconfig.json |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.