diff --git a/clean-build.sh b/clean-build.sh new file mode 100755 index 0000000000000000000000000000000000000000..43733492e34ede27aee9d62c6d7613a18feed0a8 --- /dev/null +++ b/clean-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +find public/news -name "index.html" -exec rename --all "index.html" "status.html" {} \; +find public/projects -name "index.html" -exec rename --all "index.html" "status.html" {} \; +find public/resource -name "index.html" -exec rename --all "index.html" "status.html" {} \; diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index ba3f25d0217e6ec5f77c4fd271bc19db62aee6f2..07ee29a1a030ef22bcc09fc2a1a09895a7ab9475 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -8,15 +8,21 @@ DefaultContentLanguage = "en" defaultContentLanguageInSubdir = false enableRobotsTXT = true +uglyURLs=false [services.rss] limit = 50 # [permalinks] +# news = "/:section/:slug/" +# projects = "/:section/:slug/" +# resource = "/:section/:slug/" +# '/' = "/:section/:slug/" # [permalinks.page] # news = "/:section/:slug/" # projects = "/:section/:slug/" # resource = "/:section/:slug/" +# '/' = "/:section/:slug/" [taxonimies] tag = "tags" @@ -44,8 +50,14 @@ notAlternative = true baseName = "manifest" [outputFormats.ACTIVITY_STATUS] mediaType = "application/activity+json" -notAlternative = true +notAlternative = false baseName = "status" +#[outputFormats.HTML_STATUS] +#mediaType = "text/html" +#notAlternative = true +#baseName = "index" +#permalinkable=false +#noUgly=true [outputs] home = ["HTML", "RSS", "ACTIVITY", "ACTIVITY_OUTBOX", "MANIFEST"] diff --git a/package.json b/package.json index f0d13c709f845d57fbce4c49cd20c68071e43ada..80968d92103035a1d99f28bdc0c69d7b74fcd117 100644 --- a/package.json +++ b/package.json @@ -28,5 +28,8 @@ "@types/multiparty": "^0.0.34", "typescript": "^5.2.2" }, - "type": "module" + "type": "module", + "scripts": { + "vercel-build": "sh clean-build.sh" + } } diff --git a/vercel.json b/vercel.json index ed8fd1b024f2c339b5fd5d3e253e8c786161b7b8..a32ad9d28f6e76e5f2e079a9551ad1ae23871164 100644 --- a/vercel.json +++ b/vercel.json @@ -20,17 +20,6 @@ } ], "rewrites": [ - { - "source": "/news/(.*)/", - "has": [ - { - "type": "header", - "key": "Accept", - "value": "application/activity+json" - } - ], - "destination": "/news/$1/status.ajson" - }, { "source": "/(.+)/$", "destination": "/$1/index.html" @@ -71,6 +60,28 @@ "source": "/send-note", "destination": "/api/activitypub/sendNote.js" }, + { + "source": "/:pathSection/:pathPage/", + "has": [ + { + "type": "header", + "key": "Accept", + "value": "application/activity+json" + } + ], + "destination": "/:pathSection/pathPage/status.ajson" + }, + { + "source": "/:pathSection/:pathPage/", + "missing": [ + { + "type": "header", + "key": "Accept", + "value": "application/activity+json" + } + ], + "destination": "/:pathSection/pathPage/status.html" + }, { "source": "/:pathSection/:pathPage/activity", "destination": "/:pathSection/:pathPage/activity.ajson"