2 Star 0 Fork 0

oschina1 / oschina1111111111

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

piao.gitee.io

A super concise theme for Hugo v

安装Hugo

  1. Mac下直接使用Homebrew 安装: geg
brew install hugo
  1. 源码安装
export GOPATH=$HOME/go
go get -u -v github.com/spf13/hugo

生成站点

  1. 使用Hugo快速生成站点,指定生成路径:/path/to/site
hugo new site /path/to/site
  1. 生成后站点目录结构
  • content:通常存放网站用到的文档
  • static:通常存放网站使用到的图片、音视频
  • themes:网站使用到的主题
  • config.toml:网站的配置文件

创建文章

  1. 创建一个about页面
cd /path/to/site
hugo new about.md

about.md 自动生成到了 content/about.md

  1. 创建第一篇文章,放到 post 目录
hugo new post/first.md

安装皮肤

皮肤列表 挑选一个心仪的皮肤, 比如 Hugo Hyde themes/blog

  1. 下载Hugo皮肤
$ git clone https://github.com/olOwOlo/hugo-theme-even themes/even
  1. Theme 文档

中文说明

  1. Update Theme
cd ./themes/even/
git pull

运行Hogo

  1. 站点根目录执行 Hugo 命令进行调试
hugo server --theme=even --buildDrafts

浏览器里打开: http://localhost:1313/

部署到gitee pages

  1. 生成public静态资源页面,去掉文章头部的 draft=true 再重新生成
hugo --theme=even --baseUrl="https://piao.gitee.io/"
  1. public目录提交
cd public
git init
git remote add origin https://gitee.com/piao/piao.git
git add -A
git commit -m "first commit"
git push -u origin master

浏览器里访问:https://piao.gitee.io/

  1. 推送到github
cd public
git init
git remote add origin https://github.com/piaohua/piaohua.github.io.git
git add -A
git commit -m "first commit"
git push -u origin master

浏览器里访问:https://piaohua.github.io/

  1. 创建 deploy.sh 脚本
hugo new deploy.sh

License

Released under the MIT License.

Acknowledgements

The MIT License (MIT) Copyright (c) 2020 piaohua 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.

简介

暂无描述 展开 收起
Shell
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/oschina1111111111/oschina1111111111.git
git@gitee.com:oschina1111111111/oschina1111111111.git
oschina1111111111
oschina1111111111
oschina1111111111
master

搜索帮助