hugo-theme-stack setting for github

简介: hugo-theme-stack setting for github

environment

To install Hugo on Kali Linux 2023.1, there are a few options available, depending on your preference. Here are two methods:
  • Method 1: Install using the APT package manager. Open a terminal and run the following command:

download hugo

# kali/debian
sudo apt install hugo
hugo version # 查看版本
# yum
sudo yum install hugo -y
# arch
sudo pacman -S hugo
# 选择主题进行下载  也可手动下载
git submodule add https://github.com/CaiJimmy/hugo-theme-stack/ themes/hugo-theme-stack

download git

# kali自带 预装
# yum/redhat系
sudo yum install git
# arch
sudo pacman -Syu git
# debian
sudo pacman -Syu git

安装Hugo

https://gohugo.io/getting-started/installing/#less-technical-users

安装Git

winget install Git.Git

建站

1 log in or sign in

github

2 在github账户中创建一个项目 名为 你的Github用户名.github.io

  • 这是存放生成出来的网站文件的地方

3在本地搭建网站

hugo new site  test  # 你的网站的根目录名
cd test/theme
git clone # 你的主题的GitHub网址.git  # wait a long time!
  • 到了这一步 甚至可以直接依照官方文档进行配置
    Stack的文档
  • 不建议本地+域名的方式进行搭建网站 这将会带来可怕的后果 逃(
  • 建议使用静态网站托管

stack网站目录结构(便于寻找你需要的文件)

├── archetypes                  
│   └── default.md
├── config.yaml                 # 网站配置文件
├── content                     # 站点内的内容都在这里
│   ├── categories              # “分类”页面的首页
│   │   └── Test                # “分类”页面下的一个分类页面
│   ├── page                    # 显示在网站主页左侧边栏菜单的选项
│   │   ├── about               # 左侧边栏菜单中的“关于”页面
│   │   ├── archives            # 左侧边栏菜单中的“归档”页面
│   │   ├── links               # 左侧边栏菜单中的“链接”页面
│   │   └── search              # 左侧边栏菜单中的“搜索”页面
│   └── post                    # 用户写的帖子都放在这里,每个子文件夹对应一个帖子
│       ├── chinese-test
│       ├── emoji-support
│       ├── markdown-syntax
│       ├── math-typesetting
│       ├── placeholder-text
│       └── rich-content
├── data
├── layouts
├── LICENSE
├── README.md
├── resources
│   └── _gen
│       ├── assets
│       └── images
├── static                     # 放用户自定义字体、用户头像、网站小图标等
└── themes                     # 放各种主题
    └── hugo-theme-stack       # stack主题
        ├── archetypes
        ├── assets
        ├── config.yaml
        ├── data
        ├── debug.sh
        ├── exampleSite
        ├── go.mod
        ├── i18n
        ├── images
        ├── layouts
        ├── LICENSE
        ├── netlify.toml
        ├── README.md
        └── theme.toml

配置

bug

  • 把你的网站名/themes/hugo-theme-stack/exampleSite/目录下的config.yaml复制到网站根目录(也就是你的网站名这个目录)
  • 删除网站根目录的config.toml
  • 然后打开网站根目录下的config.yaml进行填空
  • 博主头像放在/themes/hugo-theme-stack/assets/img/下 关于那个头像下的emoji,如果你不想加上,emoji那一行留空就好
目录
相关文章
|
13天前
|
消息中间件 Kafka Go
module declares its path as: github.com/IBM/sarama but was required as: gith
module declares its path as: github.com/IBM/sarama but was required as: gith
|
10月前
|
网络安全 API 对象存储
brew安装mark-text和picgo-core并配置
brew安装mark-text和picgo-core并配置
95 1
CEH v8~v11 Module Slides 和 Lab Manual 下载
CEH v8~v11 Module Slides 和 Lab Manual 下载
71 0
gitbook 发布 github pages
gitbook 发布 github pages
gitbook 发布 github pages
|
前端开发 开发工具 git
react项目实战学习笔记-学习11-warning: adding embedded git repository:xxxxxxxxxxhint: You‘ve added another git
react项目实战学习笔记-学习11-warning: adding embedded git repository:xxxxxxxxxxhint: You‘ve added another git
118 0
|
JavaScript
vue cli3.0创项目报错‘This may cause things to work incorrectly. Make sure to use the same version for b’
vue cli3.0创项目报错‘This may cause things to work incorrectly. Make sure to use the same version for b’
vue cli3.0创项目报错‘This may cause things to work incorrectly. Make sure to use the same version for b’
【错误记录】发布 Flutter 插件包报错 ( It‘s strongly recommended to include a “homepage“ or “repository“ field )
【错误记录】发布 Flutter 插件包报错 ( It‘s strongly recommended to include a “homepage“ or “repository“ field )
248 0
【错误记录】发布 Flutter 插件包报错 ( It‘s strongly recommended to include a “homepage“ or “repository“ field )
|
jenkins 持续交付 网络安全
Jenkins+GitHub报错hudson.plugins.git.GitException: Failed to fetch from GitHub 443
Jenkins+GitHub报错hudson.plugins.git.GitException: Failed to fetch from GitHub 443
Jenkins+GitHub报错hudson.plugins.git.GitException: Failed to fetch from GitHub 443
cannot push the change done in WebIDE to github
cannot push the change done in WebIDE to github
cannot push the change done in WebIDE to github
Github issue里MVP和Stretch label的区别
Github issue里MVP和Stretch label的区别
121 0
Github issue里MVP和Stretch label的区别