Total Pageviews

Sunday, 22 February 2026

安装基于deno的静态博客程序lume

首先安装deno,一句命令搞定:

$ curl -fsSL https://deno.land/x/install/install.sh | sh 

$ deno run -A https://lume.land/init.ts --theme=simple-blog
显示:
 BENVIDO - WELCOME! 🎉🎉🎉

  Lume has been configured successfully!
  Theme installed: Simple Blog


Quick start:

  deno task serve to start a local server
  deno task cms to start the CMS

See https://lume.land for online documentation
See https://discord.gg/YbTmpACHWB to propose new ideas and get help at Discord
See https://github.com/lumeland/lume to view the source code and report issues
See https://github.com/lumeland/theme-simple-blog to view the theme source code and report issues
See https://opencollective.com/lume to support Lume development

$  git clone https://github.com/lumeland/theme-simple-blog
cd theme-simple-blog
cd src
deno task build
显示:
...
🍾 Site built into ./_site
cd ..
cd _site
12799@DESKTOP-B6LK9IO MINGW64 ~/theme-simple-blog/_site (main)
$ ls
404.html  author/   favicon.png  feed.xml    js/        posts/      sitemap.xml
archive/  contact/  feed.json    index.html  pagefind/  robots.txt  styles.css
(可见~/theme-simple-blog/_site就是静态网站的根目录

新建源帖:
12799@DESKTOP-B6LK9IO MINGW64 ~/theme-simple-blog/_site (main)
$ cd ../src/posts
12799@DESKTOP-B6LK9IO MINGW64 ~/theme-simple-blog/src/posts (main)
$ nano fh.md
$ cat fh.md
显示:
---
title: 战马
date: '2026-02-22T20:30:00'
author: ym
tags:
  - misc1
  - misc2
  - misc3
comments:
  src: 'https://mastodon.gal/@misteroom/110810445656343599'
draft: false
---

此处写正文或html codes

$ 12799@DESKTOP-B6LK9IO MINGW64 ~/theme-simple-blog/src/posts (main)
$ cd ..
12799@DESKTOP-B6LK9IO MINGW64 ~/theme-simple-blog/src (main)
$ deno task build
$ cd ../_site

12799@DESKTOP-B6LK9IO MINGW64 ~/theme-simple-blog/_site (main)
$ python3 -m http.server 3000

在浏览器里,访问http://localhost:3000/ 即可看到静态网站的效果。

如图:


官网地址:https://lume.land
程序仓库:https://github.com/lumeland/lume
数据仓库:https://github.com/lumeland/theme-simple-blog

创建10个帖子后,会分页

 https://lume.land/blog/archive/

 https://lume.land/blog/archive/2/


No comments:

Post a Comment