当前位置: 首页 > ai >正文

搭建一个永久免费的博客

搭建永久免费的博客(1)基本介绍

Hugo+Stack+GitHub

GitHub

GitHub

GitHub · Build and ship software on a single, collaborative platform · GitHub

下载安装git

Git - Downloads

Edge插件authenticator 2fa client

Settings->Password and authentication->Authenticator app->Edit

国内访问设置

# 打开 Hosts 文件(Windows 路径:C:\Windows\System32\drivers\etc\hosts)
notepad C:\Windows\System32\drivers\etc\hosts# 添加以下内容
140.82.114.3 github.com
140.82.114.4 gist.github.com
151.101.1.194 github.global.SSL.fastly.net# 保存文件后,刷新 DNS 缓存
ipconfig /flushdns

其他方法:使用加速器可以有效提高访问速度。推荐使用 Watt Toolkit(Steam++) 或 网易 UU 加速器

Hugo

Hugo v0.131.0

https://github.com/gohugoio/hugo

# 创建网站项目
hugo new site teacher_blog
# 启动服务
hugo server -D
# 创建文章
hugo new content post/about-me/index.md
hugo new content post/about-me/index.zh-cn.md

Stack

Stack v3.26.0

GitHub - CaiJimmy/hugo-theme-stack: Card-style Hugo theme designed for bloggers

Emoji

全部Emoji(3781) | EmojiAll

utterances

utterances

为Hugo构建的博客站点添加评论组件 - 简书

icons

Tabler Icons: 5900+ free vector icons for web design

iconfont-阿里巴巴矢量图标库

baseurl: freshman118.github.io
languageCode: en-us
theme: hugo-theme-stack
paginate: 5
title: 90后小陈老师
copyright: 90后小陈老师# Theme i18n support
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
DefaultContentLanguage: zh-cn# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: falselanguages:zh-cn:languageName: 中文title: 90后小陈老师weight: 2params:description: 演示说明
services:# Change it to your Disqus shortname before usingdisqus:shortname: "hugo-theme-stack"# GA Tracking IDgoogleAnalytics:id:permalinks:post: /p/:slug/page: /:slug/params:mainSections:- postfeaturedImageField: imagerssFullContent: truefavicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary)footer:since: 2025customText: dateFormat:published: 2006-02-02lastUpdated: 2006-02-02T13:18:50sidebar:emoji: 😁subtitle: 分享技术,享受生活avatar:enabled: truelocal: truesrc: img/avatar.jpgarticle:math: falsetoc: truereadingTime: falsecomments:enabled: trueprovider: disqusdisqusjs:shortname:apiUrl:apiKey:admin:adminLabel:utterances:repo:issueTerm: pathnamelabel:beaudar:repo:issueTerm: pathnamelabel:theme:        remark42:host:site:locale:vssue:platform:owner:repo:clientId:clientSecret:autoCreateIssue: false# Waline client configuration see: https://waline.js.org/en/reference/component.htmlwaline:serverURL:lang:pageview:emoji:- https://unpkg.com/@waline/emojis@1.0.1/weiborequiredMeta:- name- email- urllocale:admin: Adminplaceholder:twikoo:envId:region:path:lang:# See https://cactus.chat/docs/reference/web-client/#configuration for description of the various optionscactus:defaultHomeserverUrl: "https://matrix.cactus.chat:8448"serverName: "cactus.chat"siteName: "" # You must insert a unique identifier here matching the one you registered (See https://cactus.chat/docs/getting-started/quick-start/#register-your-site)giscus:repo:repoID:category:categoryID:mapping:lightTheme:darkTheme:reactionsEnabled: 1emitMetadata: 0gitalk:owner:admin:repo:clientID:clientSecret:cusdis:host:id:widgets:homepage:- type: search- type: archives# 显示归档年份数量params:limit: 4- type: categoriesparams:limit: 10# - type: tag-cloud#   params:#       limit: 10page:- type: tocopengraph:twitter:# Your Twitter usernamesite:# Available values: summary, summary_large_imagecard: summary_large_imagedefaultImage:opengraph:enabled: falselocal: falsesrc:colorScheme:# Display toggletoggle: true# Available values: auto, light, darkdefault: autoimageProcessing:cover:enabled: truecontent:enabled: true### Custom menu
### See https://stack.jimmycai.com/config/menu
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
menu:main: []social:- identifier: githubname: GitHuburl: https://github.com/freshman118params:icon: brand-github- identifier: bilibiliname: Bilibiliurl: https://space.bilibili.com/3493114532596161params:icon: brand-bilibilirelated:includeNewer: truethreshold: 60toLower: falseindices:- name: tagsweight: 100- name: categoriesweight: 200markup:goldmark:renderer:## Set to true if you have HTML content inside Markdownunsafe: truetableOfContents:endLevel: 4ordered: truestartLevel: 2highlight:noClasses: falsecodeFences: trueguessSyntax: truelineNoStart: 1lineNos: truelineNumbersInTable: truetabWidth: 4

上线

创建GitHub仓库

freshman118.github.io

hugo -D
cd public git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/freshman118/freshman118.github.io.git
git push -u origin main
git push -f origin main# 取消代理
git config --global --unset http.proxy 
git config --global --unset https.proxy
hugo -D
cd public 
git add .
git commit -m "3 commit"
git push -u origin main

http://www.xdnf.cn/news/7342.html

相关文章:

  • Java设计模式之组合模式:从入门到精通(保姆级教程)
  • Java 泛型详解
  • 黄仁勋Computex演讲:将于三季度推出下一代GB300系统,个人AI计算机DGX Spark已全面投产
  • 进程和线程有什么区别?多线程有什么优缺点?线程的创建方式有哪些?如何简单的使用线程?用户线程和守护线程有什么区别?start 和 run 方法有什么区别?
  • go 与面向对象编程(OOP)
  • 设置IDEA打开新项目使用JDK17
  • 【OpenCV基础2】图像运算、水印、加密、摄像头
  • 信号量基础入门:并发控制的核心概念
  • BGP选路
  • 常用ECSQL整理
  • ‌AT6558R-5N22北斗B1I单频导航芯片
  • 《深入理解数组名:sizeof(arr)、arr 和 arr 的区别》
  • 三种嵌入式开发常用的组网方式
  • 【C++】C++的IO流
  • 青岛地铁二号线列车运行图优化系统
  • AIGC与文本生成:人工智能写作的新纪元
  • Adminer:一个基于Web的轻量级数据库管理工具
  • Python | 需求预测模型
  • 使用 docker-volume-backup 备份 Docker 卷
  • plc基础知识整理(三菱)
  • PHP 实现连续子数组的最大和、整数中1出现的次数
  • 详解Oracle HASH CHAIN和HASH BUCKET
  • TS04:高性能四通道自动灵敏度校准电容触摸传感器
  • 【氮化镓】关态下负栅压对 p-GaN HEMTs 单粒子效应的影响
  • 智慧招生:实时数字人在院校招生中的应用
  • 上路兵线的理解-鳄鱼篇
  • 【工具推荐】--Git详解
  • LightRAG 由入门到精通
  • CSS- 4.5 css + div 布局 简易网易云音乐 官网布置实例
  • R 语言科研绘图第 49 期 --- 热力图-相关性