Total Pageviews

Sunday, 23 August 2026

在windows下,搭建静态博客程序quarkdown

首先安装powershell: 

https://github.com/PowerShell/PowerShell/releases/download/v7.6.5/PowerShell-7.6.5-win-x64.msi ,下载并安装。

然后启动powershell.exe , 运行命令:

irm https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.ps1 | iex

 然后,启动git bash, 运行命令:

 quarkdown create quarkdown-document

(会在当前目录下,生成 quarkdown-document目录)

 12799@DESKTOP-B6LK9IO MINGW64 ~ (main)
$ cd quarkdown-document

12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document (main)
$ ls
image/  main.qd

12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document (main)
$ quarkdown c main.qd
[16:45] Success @ C:\Users\12799\quarkdown-document\quarkdown-output\Quickstart
(quarkdown c main.qd就是生成/更新静态网站的根目录的命令)
12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document (main)
$ ls
image/  main.qd  quarkdown-output/

12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document (main)
$ cd quarkdown-output/

12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document/quarkdown-output (main)
$ ls
Quickstart/

12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document/quarkdown-output (main)
$ cd Quickstart/

12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document/quarkdown-output/Quickstart (main)
$ ls
index.html  lib/  media/  script/  script.checksum  theme/
12799@DESKTOP-B6LK9IO MINGW64 ~/quarkdown-document/quarkdown-output/Quickstart (main)
$ python3 -m http.server 2233

访问http://127.0.0.1:2233,即可看到静态网站效果。但是这个效果比较简陋。我们可以fork程序作者自己的博客网站程序:https://github.com/iamgio/iamgio.github.io,我fork后的项目地址是https://github.com/brightmann/igi-source-code

 访问https://github.com/brightmann/igi-source-code/tree/main/src/blog ,在此,新建源帖2026-08-23-fh.qd ,内容为:
.docname {战马}
.include {template/setup.qd}
.blogpost date:{August 23, 2026}

此处写正文或html codes.

(详见https://github.com/brightmann/igi-source-code/blob/main/src/blog/2026-08-23-fh.qd)

然后,
git clone https://github.com/brightmann/igi-source-code igi-source-code-by-brightmann
cd igi-source-code-by-brightmann
12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann(main)
$ ls
src/
12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann(main)
$ cd src

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src (main)
$ ls
about.qd  blog.qd      experience.qd  js/      projects.qd  setup.qd
blog/     contacts.qd  images/        main.qd  public/      stylesheets/

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src (main)
$ quarkdown c main.qd
[17:20] Success @ C:\Users\12799\igi-source-code-by-brightmann\src\quarkdown-output\Giorgio-Garofalo-iamgio

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src (main)
$ ls
about.qd  contacts.qd    js/          public/            stylesheets/
blog/     experience.qd  main.qd      quarkdown-output/
blog.qd   images/        projects.qd  setup.qd
(生成了quarkdown-output 目录)

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src (main)
$ cd quarkdown-output/

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src/quarkdown-output (main)
$ ls
Giorgio-Garofalo-iamgio/

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src/quarkdown-output (main)
$ cd Giorgio-Garofalo-iamgio/

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src/quarkdown-output/Giorgio-Garofalo-iamgio (main)
$ ls
2025-12-05-hello-world/                     index.html  script/          theme/
2025-12-10-accidentally-in-silicon-valley/  lib/        script.checksum
2026-03-28-overengineering/                 media/      sitemap.xml
2026-08-23-fh/                              robots.txt  static/
里面有index.html文件,可见~/igi-source-code-by-brightmann/src/quarkdown-output/Giorgio-Garofalo-iamgio就是静态网站的根目录
12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src/quarkdown-output/Giorgio-Garofalo-iamgio (main)
$ python3 -m http.server 2345
访问http://127.0.0.1:2345/ ,即可看到静态网站的效果。
http://127.0.0.1:2345/2026-08-23-fh/ 不能显示视频

12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src/quarkdown-output/Giorgio-Garofalo-iamgio (main)
$ ctrl+c
12799@DESKTOP-B6LK9IO MINGW64 ~/igi-source-code-by-brightmann/src/quarkdown-output/Giorgio-Garofalo-iamgio (main)
然后静态网站的根目录的内容push到在github.com/brightmann下所新建的空仓库igi:
git init .
git add .
git commit -m 'xx'
git remote set-url xyz git@github-first:brightmann/igi
(或者git remote add xyz git@github-first:brightmann/igi)
git branch -m main  
git push -f origin main

在本地机器上生成的静态网站的根目录的内容都可以通过以上的git命令push到在github.com/your-username下所新建的某个空仓库,这样再也不用东找西找静态服务器了)

 访问 https://brightmann.github.io/igi/ 即可看到静态网站的效果。

 https://brightmann.github.io/igi/2026-08-23-fh/ 不能显示视频。

项目地址:
https://github.com/iamgio/quarkdown
https://quarkdown.com/wiki/quickstart/
https://quarkdown.com/#install
https://github.com/quarkdown-labs/get-quarkdown/

程序作者自己的博客网站程序:

https://github.com/iamgio/iamgio.github.io

 https://github.com/iamgio/iamgio.github.io/issues/1

我fork后的项目地址是https://github.com/brightmann/igi-source-code

https://github.com/brightmann/igi

No comments:

Post a Comment