Hugo项目实战-集成评论博客添加评论功能

实践效果

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

Quick Start

Install Hugo

brew install hugo
# or
port install hugo

hugo version

Create a New Site

hugo new site quickstart

Add a Theme

cd quickstart
git init
git submodule add https://github.com/shenhonglei/airspace-hugo.git themes/airspace-hugo

Then, add the theme to the site configuration:

echo 'theme = "ananke"' >> config.toml

Add Some Content

You can manually create content files (for example as content/<CATEGORY>/<FILE>.<FORMAT>) and provide metadata in them, however you can use the new command to do a few things for you (like add title and date):

hugo new posts/my-first-post.md

Start the Hugo server

Now, start the Hugo server with drafts enabled:

hugo server -D

Navigate to your new site at http://localhost:1313/.

Build static pages

It is simple. Just call:

hugo -D

Output will be in ./public/ directory by default (-d/--destination flag to change it, or set publishdir in the config file).

Theme Installation

使用模板方法一

git clone https://github.com/shenhonglei/airspace-hugo.git
cd exampleSite/
hugo server --themesDir ../..

使用模板方法二

#创建一个新的项目
hugo new site demo
# 主题模板安装
#下载主题https://github.com/shenhonglei/airspace-hugo.git
cd demo/themes
将下载的airspace-hugo copy到themes,然后将exampleSite目录的内容copy到demo目录,替换全部。
#运行
hugo server 
#访问
http://localhost:1313

个人博客快速建站

快速下载Themefisher模板,每个模板都有自己的文档、支持、持续更新内容。

eg:github-模板代码-airspace-hugoairspace-hugo使用文档

然后再参照,GitHub Actions 自动化部署 Hugo for GitHub Pages,自动化部署。

申请域名,解析服务等。

个人博客仓库名:xxxxx.github.io

Your GitHub Pages site is currently being built from the master branc:
master/root

Custom domain:xxxx.com
Enforce HTTPS :yes

hexo 博客添加评论功能

设置一个评论系统

  • 多说

  • 网易云跟帖

  • 畅言

  • 来必力(LiveRe)

  • Disqus

  • Hypercomments

  • valine

    Valine 诞生于2017年8月7日,是一款基于LeanCloud的快速、简洁且高效的无后端评论系统。 理论上支持但不限于静态博客,目前已有HexoJekyllTypechoHugoGhost 等博客程序在使用Valine。

    特性

  • Github大礼包:gitmentgitalk(推荐),gitter(推荐); 三个都支持Markdown;

    原则上来说比较靠谱的是gitment(依托于github issue,能够自己管理,而且被墙的概率小),不过兼容性不太好(需要chrome内核才行)。

    Gitalk 是一个基于 GitHub Issue 和 Preact 开发的评论插件。

    特性

    • 使用 GitHub 登录
    • 支持多语言 [en, zh-CN, zh-TW, es-ES, fr, ru, de, pl, ko]
    • 支持个人或组织
    • 无干扰模式(设置 distractionFreeMode 为 true 开启)
    • 快捷键提交评论 (cmd|ctrl + enter)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

[shenhonglei]

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值