尚未偵測到更新。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