docs(readme,landing): introduce the desktop app (#201)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-08-05 00:21:15 +08:00
committed by GitHub
parent e0f6b122c8
commit 1cf0e4d9bc
21 changed files with 342 additions and 17 deletions
+3 -5
View File
@@ -16,7 +16,7 @@
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { absoluteUrl, blogRoutes } from "./site-routes.mjs";
import { absoluteUrl, blogRoutes, pageRoutes } from "./site-routes.mjs";
const dist = join(dirname(fileURLToPath(import.meta.url)), "..", "dist");
const shell = readFileSync(join(dist, "index.html"), "utf8");
@@ -43,7 +43,7 @@ function shellFor(route) {
.replace(OG_URL, `<meta property="og:url" content="${url}" />`);
}
const routes = blogRoutes();
const routes = [...pageRoutes(), ...blogRoutes()];
for (const { route } of routes) {
const dir = join(dist, route);
mkdirSync(dir, { recursive: true });
@@ -52,6 +52,4 @@ for (const { route } of routes) {
writeFileSync(join(dist, "404.html"), shell.replace(CANONICAL, ""));
writeFileSync(join(dist, ".nojekyll"), "");
console.log(
`[postbuild] wrote ${routes.length} blog route shells, dist/404.html and dist/.nojekyll`,
);
console.log(`[postbuild] wrote ${routes.length} route shells, dist/404.html and dist/.nojekyll`);
+7
View File
@@ -59,6 +59,13 @@ function newestDate(dir, slug) {
* that actually answers 200 — the one canonical tags and the sitemap should name.
* The home page is excluded; Vite's own index.html already sits at the dist root.
*/
/** Non-blog landing SPA pages (currently the desktop download page). */
export function pageRoutes() {
return [{ route: "/download/" }];
}
/** Blog routes, one per post plus the list page. */
export function blogRoutes() {
return [
{ route: "/blog/" },