Total Pageviews

Wednesday, 12 November 2025

搭建基于js的静态博客程序:cms.js-starter

 首先fork此项目https://github.com/chrisdiana/cms.js-starter ,我fork后的项目地址是

 https://github.com/luckypoem/cms.js-starter

然后编辑 https://github.com/luckypoem/cms.js-starter/blob/develop/js/config.js文件,

 mode的值设为GITHUB。username的值改为我的github用户名luckypoem , repo的值设为我的github仓库名cms.js-starter ,branch的值设为gh-pages 。

为你的仓库创建 gh-pages分支。然后,稍等2分钟,即可访问

https://luckypoem.github.io/cms.js-starter/。

创建新帖:

访问 https://github.com/luckypoem/cms.js-starter/tree/develop/posts,点击右上角的add file->create new file, 在Name your file框里,填写2025-11-12-1116-hxs.md,然后在下面的框中输入:

---
layout: post
title: 你的文章的标题
excerpt: 这是一篇文章。
tags: sampletag
author: ym
---

此处写正文或html codes. 然后点击右上角的Commit changes按钮。 

项目地址:https://github.com/chrisdiana/cms.js-starter

https://github.com/luckypoem/cms.js-starter

演示网站: https://luckypoem.github.io/cms.js-starter

注意: 在Name your file框里,填写md文件名时,一定要按这样的格式2025-11-12-1116-hxs.md填写md文件名。只有这样填写,发表后,帖子才会按发表的时间顺序排列

 这个静态博客程序不错,比那些基于github issues的静态博客程序好用,可以发表180 kb 的长篇文章和嵌入视频。

搭建简单,强烈推荐。 

No comments:

Post a Comment