尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证One small server for many blogs on many domains, built so search engines and AI assistants can read every post. Mirror of git.borodutch.com/backmeupplz/lanternlog.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Lanternlog is one small server that hosts many blogs, each on its own domain, and makes every page easy for search engines and AI assistants to find, read and cite. It is a single Rust binary with an SQLite file, and you publish to it through a small HTTP API, which suits scripts and AI agents as well as people.
BlogPosting or WebPage with author, dates, word count and image, plus BreadcrumbList on posts and Blog (or WebSite, with a custom front page) on the home page.www. redirect to the main one, and paths without a trailing slash redirect to the one with it.sitemap.xml, an Atom feed at feed.xml with full posts, robots.txt, llms.txt and llms-full.txt, and a Markdown copy of every page at /slug.md.With Docker:
docker build -t lanternlog .
docker run -d --name lanternlog -p 8080:8080 -v lanternlog:/data -e LANTERNLOG_TOKEN="$(openssl rand -hex 32)" lanternlog
From source, with Rust installed:
cargo build --release
LANTERNLOG_TOKEN=change-me ./target/release/lanternlog
Point each blog's domain at the server, and put a TLS proxy in front of it (any proxy that passes the Host header works). On Tugport, deploy the repository as one service and add every blog's domain to it; Tugport issues the certificates.
| Variable | Default | What it does |
|---|---|---|
PORT | 8080 | Port to listen on |
LANTERNLOG_DATA | ./data | Folder for lanternlog.db and uploaded images |
LANTERNLOG_TOKEN | none | Bearer token for the admin API; the API is off without it |
LANTERNLOG_SCHEME | https | Scheme used in addresses in pages and feeds |
LANTERNLOG_INDEXNOW | on | off stops IndexNow pings |
LANTERNLOG_FONTS | none | Extra folder of fonts for share images (Inter is in the Docker image) |
Every call needs Authorization: Bearer $LANTERNLOG_TOKEN, and can go to any of the server's domains.
Create or change a blog:
curl -X PUT https://blog.example.com/api/sites/blog.example.com \
-H "Authorization: Bearer $LANTERNLOG_TOKEN" -H "Content-Type: application/json" -d '{
"title": "Example Notes",
"description": "What we learn running Example in production.",
"aliases": ["www.blog.example.com"],
"author": "Jane Doe", "author_url": "https://jane.example",
"project_name": "Example", "project_url": "https://example.com",
"cta": "Example deploys an app with one command.",
"accent": "#e4572e", "lang": "en"
}'
Publish a post (the slug comes from the address; status is draft until you say published):
curl -X PUT https://blog.example.com/api/sites/blog.example.com/posts/one-server \
-H "Authorization: Bearer $LANTERNLOG_TOKEN" -H "Content-Type: application/json" -d '{
"title": "Moving to one server",
"description": "Why we put every service on one machine, and what it cost.",
"body": "We moved **every service** to one box.\n\n## Why one box\n\n...",
"tags": ["Self-hosting"],
"status": "published"
}'
The answer holds the post's address. Set "kind": "page" for pages such as About: they appear in the header instead of the post list and the feed. To give a blog a front page of its own, publish a page and set the blog's "home" to its slug; the page then shows at /, with the latest posts below it. The docs list every setting, including the branding ones (logo, favicon, og_image, links, head, footer, font and credit).
| Call | What it does |
|---|---|
GET /api/sites | All blogs |
GET, PUT, DELETE /api/sites/{host} | One blog; PUT creates or replaces its settings |
GET /api/sites/{host}/posts | Its posts and pages, drafts included |
GET, PUT, DELETE /api/sites/{host}/posts/{slug} | One post; PUT creates or replaces it |
POST /api/sites/{host}/media | Uploads an image (the raw bytes, with its Content-Type) and answers with its address |
GET /api/health | {"ok": true, "version"} |
Posts are Markdown with tables, footnotes, task lists and heading ids (## Setup {#setup}). Raw HTML passes through, so only give the token to writers you trust.
Lanternlog has no web editor, comments, newsletters or themes beyond an accent color. Posts come in through the API, and anything that needs a browser is meant to live on your product's own site.
lanternlog.com runs on Lanternlog. Its pages are in site/, and site/publish.py publishes them through the API.
MIT