Hugo Theme Hello Friend NG 安装与配置指南

Hugo Theme Hello Friend NG 安装与配置指南

hugo-theme-hello-friend-ng Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing! hugo-theme-hello-friend-ng 项目地址: https://gitcode.com/gh_mirrors/hu/hugo-theme-hello-friend-ng

1. 项目基础介绍

Hugo Theme Hello Friend NG 是一个基于 Hugo 的开源博客主题,它提供了一种简洁而优雅的方式来展示你的内容。该主题受到了 Hello Friend 和 Hermit 主题的启发,并包含了多种功能,如暗/亮模式切换、响应式设计、代码高亮、音频支持等。项目主要使用 HTML、SCSS 和 JavaScript 编程语言。

2. 关键技术和框架

  • Hugo: 一个快速的静态网站生成器,使用 Go 语言编写。
  • PrismJS: 用于代码高亮的 JavaScript 库。
  • Inter Font: 一款优雅的字体,提高了阅读体验。

3. 安装和配置

准备工作

在开始安装之前,请确保你已经安装了以下软件:

  • Hugo:确保你的系统中已经安装了 Hugo。可以通过 Hugo 的官方文档来了解如何安装:Hugo 安装指南
  • Git:用于从 GitHub 克隆主题。

安装步骤

  1. 克隆主题

    打开终端(或命令提示符),然后执行以下命令来克隆主题到你的 Hugo 站点的 themes 目录中:

    git clone https://github.com/rhazdon/hugo-theme-hello-friend-ng.git themes/hello-friend-ng
    

    或者,如果你想以子模块的方式添加主题,可以使用以下命令:

    git submodule add https://github.com/rhazdon/hugo-theme-hello-friend-ng.git themes/hello-friend-ng
    
  2. 配置主题

    在你的 Hugo 站点根目录中,复制 exampleSite/config.toml 文件到根目录,并重命名为 config.toml。然后根据你的需要编辑这个配置文件。

    配置文件示例:

    baseurl = "localhost"
    title = "My Blog"
    languageCode = "zh-CN"
    theme = "hello-friend-ng"
    paginate = 10
    

    你可以根据需要添加更多配置,如网站标题、副标题、元数据等。

  3. 启动 Hugo 服务器

    在你的 Hugo 站点根目录中,运行以下命令来启动 Hugo 服务器:

    hugo server
    

    现在你可以通过浏览器访问 http://localhost:1313 来查看你的网站。

  4. 发布网站

    当你完成网站的开发并准备好发布时,运行以下命令来生成静态网站文件:

    hugo
    

    默认情况下,生成的静态文件会在 public 目录中。你可以将这些文件部署到你的服务器或任何静态网站托管平台上。

通过以上步骤,你应该能够成功安装和配置 Hugo Theme Hello Friend NG,并开始构建你的个人博客。

hugo-theme-hello-friend-ng Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing! hugo-theme-hello-friend-ng 项目地址: https://gitcode.com/gh_mirrors/hu/hugo-theme-hello-friend-ng

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

费津钊Bobbie

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

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

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

打赏作者

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

抵扣说明:

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

余额充值