Total Pageviews

Monday, 29 June 2026

静态博客程序:devdojo-static

 this tool Static can help convert your Node.js application into a static site suitable for deployment on GitHub Pages.  

--------------------------------------- 

npm install -g @devdojo/static
static new devdojo-static-site
(此命令会在当前目录下,生成devdojo-static-site 目录。
cd devdojo-static-site
12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ ls
CNAME collections/ includes/ package.json public/
README.md assets/ content/ layouts/ pages/ tailwind.config.js

12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ npm install
12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ ls
CNAME assets/ includes/ package-lock.json public/
README.md collections/ layouts/ package.json tailwind.config.js
content/   node_modules/  pages/

12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ static build
(此命令会在当前目录下,生成_site目录。_site目录就是静态网站的根目录。static build
就是生成/更新静态网站的根目录的命令)
12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ ls
CNAME content/ node_modules/ pages/
README.md assets/ includes/ package-lock.json public/
_site/ collections/ layouts/ package.json tailwind.config.js
(生成了_site目录
12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ ls _site
assets/ favicon.ico index.html robots.txt

12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$
新建源帖:
12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ cd content

12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site/content (main)
$ nano test.md
 12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site/content (main)
$ ls
test.md

12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site/content (main)
$ cat test.md
---
title: 测试
description: 这是一篇文章
---

这是测试。。。


12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site/content (main)
$ cd ..
12799@DESKTOP-B6LK9IO MINGW64 ~/devdojo-static-site (main)
$ static build
项目地址:
https://github.com/thedevdojo/static
官网:
https://static.devdojo.com/ 
https://static.devdojo.com/docs/getting-started/
(有问题) 
 

No comments:

Post a Comment