generated from hugo-next/hugo-theme-next-starter
-
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
0 parents
commit e2eb2cf
Showing
27 changed files
with
2,849 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,17 @@ | ||
name: sync-2-gitee | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
sync-2-gitee: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Sync to Gitee | ||
uses: wearerequired/git-mirror-action@master | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} | ||
with: | ||
source-repo: [email protected]:hugo-next/hugo-theme-next-starter.git | ||
destination-repo: [email protected]:hugo-next/hugo-theme-next-starter.git |
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 @@ | ||
# Ignore Hugo resource files | ||
*.hugo*.lock | ||
resources/ | ||
public/ | ||
config/development/ |
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,4 @@ | ||
[submodule "themes/hugo-theme-next"] | ||
branch = main | ||
path = themes/hugo-theme-next | ||
url = https://github.com/hugo-next/hugo-theme-next.git |
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,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 hugo-next | ||
|
||
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,110 @@ | ||
[中文](https://github.com/hugo-next/hugo-theme-next-starter/blob/main/README.zh.md) | [English](#) | ||
|
||
# Hugo NexT theme starter | ||
|
||
It's usefully for people who are first time notice Hugo framework and want to create himself blog site. Following steps as below and good luck for you! :tada::tada::tada: | ||
|
||
> **Note** | ||
> Before that make sure your PC were installed [Git](https://git-scm.com/downloads) and [Hugo](https://github.com/gohugoio/hugo/releases/) software. | ||
## Deploy on Vercel | ||
|
||
Now you can deployment your site on Vercel paltform by this button: [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhugo-next%2Fhugo-theme-next-starter&env=HUGO_VERSION&envDescription=Enter%20latest%20version%20of%20Hugo%20engine.&envLink=https%3A%2F%2Fgithub.com%2Fgohugoio%2Fhugo%2Freleases%2F&project-name=my-blog&repo-name=my-blog&demo-title=Hugo%20NexT%20Theme&demo-description=Easily%20%26%20powerful%20theme%20of%20Hugo%20engine.&demo-url=https%3A%2F%2Fhugo-next.eu.org%2F&demo-image=https%3A%2F%2Fimgs.lisenhui.cn%2Fhugo-next%2Fhugo-next-demo.png&install-command=git%20submodule%20add%20https%3A%2F%2Fgithub.com%2Fhugo-next%2Fhugo-theme-next.git%20themes%2Fhugo-theme-next) | ||
|
||
### ➕ Create Github repository | ||
|
||
Please login Vercel with your Github account, then enter your repsitory name and click `Create`, also need enter latest Hugo version at `HUGO_VERSION` parameter, after those action then deploy it. | ||
|
||
![deploy-with-vercel-01.png](https://imgs.lisenhui.cn/hugo-next/deploy-with-vercel-01.png) | ||
|
||
### 🏗 Change Framework | ||
|
||
Because Vercel doesn't defined the framework the site not work at first time, you need change it to `Hugo` and save change. | ||
|
||
![deploy-with-vercel-02.png](https://imgs.lisenhui.cn/hugo-next/deploy-with-vercel-02.png) | ||
|
||
### 🚧 Redeployment | ||
|
||
Switch to `Deployment` tag page, refer to the following snapshot for operation, after a while the site will visit success. | ||
|
||
![deploy-with-vercel-03.png](https://imgs.lisenhui.cn/hugo-next/deploy-with-vercel-03.png) | ||
|
||
## ⏬ Clone Theme | ||
|
||
Click the green button which name call `Use this template` and upper right corner on the page. Full information such as below image: | ||
|
||
![Use Template](https://imgs.lisenhui.cn/hugo-next/use-hugo-next-starter.png) | ||
|
||
After do that click the green button which name call `Create repository from template`, then will create your site code automatic, and clone it on your PC environment. | ||
|
||
Remember that need use `git submodule` command to pull all things from `hugo-theme-next` at first time. | ||
|
||
``` | ||
# First time | ||
git submodule update --init --recursive | ||
# Next time | ||
git submodule update --remote --merge | ||
``` | ||
|
||
> **Note** | ||
> When you are in China, recommend to use `Gitee` repository url replace the submodule url in `.gitmodules` file content and then execute the above `Git` command line to improve the speed. | ||
## 💻 Local Preview | ||
|
||
Execute the `startup.sh` boot start script file which is under site root directory, when see some words like `stop` that mean success, and open browser visit | ||
[http://localhost:1414/](http://localhost:1414/) will enjoy yourself. | ||
|
||
```shell | ||
$ sh startup.sh | ||
======================================== | ||
███╗ ██╗███████╗██╗ ██╗████████╗ | ||
████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝ | ||
██╔██╗ ██║█████╗ ╚███╔╝ ██║ | ||
██║╚██╗██║██╔══╝ ██╔██╗ ██║ | ||
██║ ╚████║███████╗██╔╝ ██╗ ██║ | ||
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝ | ||
======================================== | ||
Hugo NexT version 4.3.1 | ||
Documentation: https://hugo-next.eu.org | ||
======================================== | ||
Start building sites … | ||
hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended windows/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio | ||
|
||
| ZH-CN | ||
-------------------+-------- | ||
Pages | 71 | ||
Paginator pages | 0 | ||
Non-page files | 0 | ||
Static files | 43 | ||
Processed images | 0 | ||
Aliases | 26 | ||
Sitemaps | 1 | ||
Cleaned | 0 | ||
|
||
Built in 233 ms | ||
Watching for changes in C:\xxx\hugo-theme-next-starter\{content,data,themes} | ||
Watching for config changes in C:\xxx\hugo-theme-next-starter\config\_default | ||
Environment: "development" | ||
Serving pages from memory | ||
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender | ||
Web Server is available at //localhost:1414/ (bind address 127.0.0.1) | ||
Press Ctrl+C to stop | ||
``` | ||
## 🎨 Snapshot | ||
![Hugo NexT Demo](https://imgs.lisenhui.cn/hugo-next/hugo-next-demo.png) | ||
## 🎉 Deployment | ||
Use `hugo` command to build site's static files, and deploy them into Web server just like `Nginx` and so on. Or you can enable `Github Page` function when you commit your local things there will build static files by automatic, more info:[Github Pages](https://pages.github.com/). | ||
> **Note** | ||
> Please relpace actual parameter's value in `config/_default/params.yaml` config file before deploy, such as comment, analytis, share and so on. | ||
## 📜 License | ||
[MIT License](LICENSE) | ||
Copyright (c) 2022, hugo-next teams. |
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,110 @@ | ||
[中文](#) | [English](https://github.com/hugo-next/hugo-theme-next-starter/blob/main/README.md) | ||
|
||
# Hugo NexT 主题启动器 | ||
|
||
本启动器是为初学者所准备的,如果你正在准备搭建个人博客站,那么参考如下步骤便可快速完成。加油,祝你好运!:tada::tada::tada: | ||
|
||
> **Note** | ||
> 请确认你的电脑上已经安装有 [Git](https://git-scm.com/downloads) 和 [Hugo](https://github.com/gohugoio/hugo/releases/) 两款软件。 | ||
|
||
## Vercel部署 | ||
|
||
若想在 Vercel 平台上部署站点可直接点击右侧的按钮:[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhugo-next%2Fhugo-theme-next-starter&env=HUGO_VERSION&envDescription=Enter%20latest%20version%20of%20Hugo%20engine.&envLink=https%3A%2F%2Fgithub.com%2Fgohugoio%2Fhugo%2Freleases%2F&project-name=my-blog&repo-name=my-blog&demo-title=Hugo%20NexT%20Theme&demo-description=Easily%20%26%20powerful%20theme%20of%20Hugo%20engine.&demo-url=https%3A%2F%2Fhugo-next.eu.org%2F&demo-image=https%3A%2F%2Fimgs.lisenhui.cn%2Fhugo-next%2Fhugo-next-demo.png&install-command=git%20submodule%20add%20https%3A%2F%2Fgithub.com%2Fhugo-next%2Fhugo-theme-next.git%20themes%2Fhugo-theme-next) | ||
|
||
### ➕ 创建 Github 仓库 | ||
|
||
请使用 Github 账户授权登录,参考下面截图输入新仓库名字,点击 `Create` 按钮(注意确认否要创建私有仓库),接下来在 HUGO_VERSION 中输入 `Hugo` 的最新版本号并发布。 | ||
|
||
![deploy-with-vercel-01.png](https://imgs.lisenhui.cn/hugo-next/deploy-with-vercel-01.png) | ||
|
||
### 🏗 调整框架 | ||
|
||
首次部署由于 Vercel 的问题站点无法直接访问,参考下面截图在设置中调整框架为 `Hugo` 并保存。 | ||
|
||
![deploy-with-vercel-02.png](https://imgs.lisenhui.cn/hugo-next/deploy-with-vercel-02.png) | ||
|
||
### 🚧 重新部署 | ||
|
||
切换到 `Deployment` 标签页,参考下面截图操作,重新发布后站点就可以正常访问啦。 | ||
|
||
![deploy-with-vercel-03.png](https://imgs.lisenhui.cn/hugo-next/deploy-with-vercel-03.png) | ||
|
||
## ⏬ 克隆主题 | ||
|
||
点击右上角的 `Use this template` 绿色按钮然后填写代码仓库的相关信息,参考如下: | ||
|
||
![使用模板创建](https://imgs.lisenhui.cn/hugo-next/use-hugo-next-starter.png) | ||
|
||
最后点击 `Create repository from template` 绿色按钮,会直接在你的空间中生成站点代码,再使用`git clone`命令把它克隆到本地进行创作。 | ||
|
||
记得首次完全克隆后,需要在根目录中使用如下的 `Git` 子模块更新命令拉取 `hugo-theme-next` 主题的最新版本。 | ||
|
||
``` | ||
# 首次初始化操作 | ||
$ git submodule update --init --recursive | ||
# 后续更新操作 | ||
$ git submodule update --remote | ||
``` | ||
|
||
> **Note** | ||
> 注意:当你在中国境内,建议先将 `.gitmodules` 的仓库指向 `Gitee` 地址,再执行上述的命令速度会更快。 | ||
## 💻 本地预览 | ||
|
||
在站点根目录下,执行自带的 `startup.sh` 启动脚本,当看到输出信息中带有 `stop` 字样时便表示启动成功,此时打开浏览器输入默认地址[http://localhost:1414/](http://localhost:1414/)访问浏览效果。 | ||
|
||
|
||
```shell | ||
$ sh startup.sh | ||
======================================== | ||
███╗ ██╗███████╗██╗ ██╗████████╗ | ||
████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝ | ||
██╔██╗ ██║█████╗ ╚███╔╝ ██║ | ||
██║╚██╗██║██╔══╝ ██╔██╗ ██║ | ||
██║ ╚████║███████╗██╔╝ ██╗ ██║ | ||
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝ | ||
======================================== | ||
Hugo NexT version 4.3.1 | ||
Documentation: https://hugo-next.eu.org | ||
======================================== | ||
Start building sites … | ||
hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended windows/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio | ||
|
||
| ZH-CN | ||
-------------------+-------- | ||
Pages | 71 | ||
Paginator pages | 0 | ||
Non-page files | 0 | ||
Static files | 43 | ||
Processed images | 0 | ||
Aliases | 26 | ||
Sitemaps | 1 | ||
Cleaned | 0 | ||
|
||
Built in 233 ms | ||
Watching for changes in C:\xxx\hugo-theme-next-starter\{content,data,themes} | ||
Watching for config changes in C:\xxx\hugo-theme-next-starter\config\_default | ||
Environment: "development" | ||
Serving pages from memory | ||
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender | ||
Web Server is available at //localhost:1414/ (bind address 127.0.0.1) | ||
Press Ctrl+C to stop | ||
``` | ||
## 🎨 效果预览 | ||
![Hugo NexT Demo](https://imgs.lisenhui.cn/hugo-next/hugo-next-demo.png) | ||
## 🎉 发布 | ||
执行 `hugo` 命令生成全站静态文件,并把文件部署到类似 `Nginx` 的 Web 服务器即可。若如自己没有服务器的话,也可以直接开启 `Github Pages` 功能,会在你推送本地文件到服务器时,自动生成站点的静态文件,使用详情可关注:[Github Pages](https://pages.github.com/)。 | ||
> **Note** | ||
> 请将 `config/_default/params.yaml` 配置文件中相关参数调整为你自己的实际环境,比如 评论插件,统计功能,分享功能等。 | ||
## 📜 许可证 | ||
[MIT 许可证](LICENSE) | ||
Copyright (c) 2022, hugo-next 团队 |
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,111 @@ | ||
# =============================================================== | ||
# 根据如下的配置说明完善自己的站点配置,建议另外拷贝进行调整避免冲突 | ||
# Improve your site configuration according to the following | ||
# configuration instructions. It is recommended to make | ||
# additional copies for adjustment to avoid conflicts | ||
# =============================================================== | ||
|
||
# --------------------------------------------------------------- | ||
# Hugo 引擎的基础配置 | ||
# Basic configure for Hugo engine | ||
# --------------------------------------------------------------- | ||
|
||
# 站点域名,比如: https://hugo-next.eu.org | ||
# Website domain, eg: https://hugo-next.eu.org | ||
baseURL: / | ||
# 站点标题 | ||
# Website title | ||
title: Hugo NexT | ||
# 主题名称 | ||
# Theme name | ||
theme: hugo-theme-next | ||
# 站点默认的语言和代码 | ||
# Default laguage & code for website | ||
defaultContentLanguage: zh-cn | ||
languageCode: zh-CN | ||
# 是否包含中文,日语,韩文 | ||
# Whether contains Chinese, Japanese and Korean | ||
hasCJKLanguage: true | ||
# 每页显示文章数量 | ||
# Display items per page | ||
paginate: 10 | ||
# 开启支持表情符号 | ||
# Enable Emoji support | ||
enableEmoji: true | ||
# 让 Makedown 文档支持 HTML 语法,高亮,文章目录等功能 | ||
# Make markdown content support HTML syntax, highlight, toc etc. | ||
markup: | ||
goldmark: | ||
renderer: | ||
unsafe: true | ||
highlight: | ||
# codeFences: true | ||
# lineNos: true | ||
# lineNumbersInTable: true | ||
# noClasses: true | ||
# # 高亮代码的样式名称,可选:monokai | emacs | api | dracula | friendly | ||
# # 更多的样式:https://xyproto.github.io/splash/docs/all.html | ||
# # Highlight style: monokai | emacs | api | dracula | friendly | ||
# # More: https://xyproto.github.io/splash/docs/all.html | ||
# style: "monokai" | ||
anchorLineNos: true | ||
codeFences: true | ||
guessSyntax: true | ||
hl_Lines: "" | ||
hl_inline: false | ||
lineAnchors: "" | ||
lineNoStart: 1 | ||
lineNos: false | ||
lineNumbersInTable: false | ||
noClasses: true | ||
noHl: false | ||
style: monokai | ||
tabWidth: 2 | ||
tableOfContents: | ||
# 开始/结束标题级别:1-6 (建议从2开始) | ||
# Heading title level of start or end: 1-6 | ||
# Recommand start at 2 | ||
startLevel: 2 | ||
endLevel: 4 | ||
|
||
# 站点文章导航文件 | ||
# Site map of all articles | ||
sitemap: | ||
filename: "sitemap.xml" | ||
changefreq: "weekly" | ||
priority: 0.5 | ||
|
||
outputFormats: | ||
RSS: | ||
baseName: "rss" | ||
# 自定义生成本地搜索文件 | ||
# Custom file of indexes for local search | ||
LocalIndexes: | ||
mediaType: application/xml | ||
baseName: searchindexes | ||
isPlainText: true | ||
notAlternative: true | ||
# 生成 Algolia 索引文件 | ||
# Build indexes of Aloglia | ||
AlgoliaIndexes: | ||
mediaType: application/json | ||
baseName: algolia | ||
isPlainText: true | ||
notAlternative: true | ||
|
||
# 默认使用本地搜索,如切换到 Algolia 搜索引擎, | ||
# 请将下面的 LocalIndexes 替换成 AlgoliaIndexes | ||
# By default use local search, before switch to Algolia engine | ||
# Please replace LocalIndexes with AlgoliaIndexes | ||
outputs: | ||
home: ["HTML", "RSS", "LocalIndexes"] | ||
|
||
# 输出 robots 文件支持爬虫扫描 | ||
# Enable robots with support crawler scan | ||
enableRobotsTXT: true | ||
|
||
# 强制输出时压缩文件 | ||
# Compress all files when output | ||
minify: | ||
minifyOutput: true | ||
|
Oops, something went wrong.