Howtosolvetheproblemofthemeconfiguration
解决新主题配置问题
安装的主题事例
kakawait主题
github库链接https://github.com/kakawait/hugo-tranquilpeak-theme
新site安装theme
创造一个新site后在新site里打开cmd输入
cd themes
git clone https://github.com/kakawait/hugo-tranquilpeak-theme.git
在themes里面的hugo-tranquilpeak-theme文件中的config.toml中复制文件内容于site的hugo.toml文件 然后依据注释进行修改字符串内内容大都可以修改 例:
[author]
name = "Firstname Lastname"
bio = "Super bio with markdown support **COOL**"
job = "Your job title"
location = "France"
# Your Gravatar email. Overwrite `author.picture` everywhere in the blog
gravatarEmail = "thibaud.lepretre@gmail.com"
# Your profile picture
# Overwritten by your gravatar image if `author.gravatarEmail` is filled
picture = "https://cdn1.iconfinder.com/data/icons/ninja-things-1/1772/ninja-simple-512.png"
改为
[author]
name = "lixidu"
bio = "A growing student"
job = "Student"
location = "China"
# Your Gravatar email. Overwrite `author.picture` everywhere in the blog
gravatarEmail = "example@XXX.com"
# Your profile picture
# Overwritten by your gravatar image if `author.gravatarEmail` is filled
picture = "https://cdn1.iconfinder.com/data/icons/ninja-things-1/1772/ninja-simple-512.png"
可以创建一个gravatar邮箱头像替换其picture 如
picture = "https://s.gravatar.com/avatar/07f20e852149a29dd89c7fc7f56548fdf66c93a7508e97a9821c0173827987dc?s=80"
主要为主页面头像问题的解决和名字
languageCode = "en-us"
defaultContentLanguage = "en-us"
修改为中文
languageCode = "zh-cn"
defaultContentLanguage = "zh-cn"
其他修改可以查看https://github.com/kakawait/hugo-tranquilpeak-theme/blob/master/docs/user.md
若是换主题
也是按上面操作不过多赘述
而后用hugo 刷新site
hugo server 预览
在public文件使用cmd写代码
git add .
git commmit -m ' '
git push
进行上传到github 如何建立github库不赘诉 结束