diff options
| author | 2026-03-31 00:54:20 +0700 | |
|---|---|---|
| committer | 2026-03-31 00:54:20 +0700 | |
| commit | abc9e2fc1e93fba0b274f31b95340c411a73dd6d (patch) | |
| tree | 3d0b70016ce8f160203629da07c1a8ae3edff8af /views/pages | |
| parent | 8d0385546b0a5f4f3b0832fce1b4c0a10fa0a927 (diff) | |
| parent | a8f566cbeb8358aca7fb4532d8b69c513ef197f3 (diff) | |
| download | web-0.13.0.tar.gz web-0.13.0.zip | |
v0.13.0 (#25)v0.13.0
- [feat: enable etag
middleware](https://github.com/SayaAndy/saya-today-web/commit/c7742b341a46360d16dd9035c046f004d0fe760c)
- feat: enable compress middleware
- feat: trim end slash of each request url (except for root)
- [feat: add linked
data](https://github.com/SayaAndy/saya-today-web/commit/a8f566cbeb8358aca7fb4532d8b69c513ef197f3)
- [feat: build
sitemap.xml](https://github.com/SayaAndy/saya-today-web/commit/7a40c01dd14f04787f5052d0c89e0d6fb9ce597f)
- [feat: generate
robots.txt](https://github.com/SayaAndy/saya-today-web/commit/be906e1cc4ec3e92bcb14ee08256b53f3a4b44e2)
- [feat: specify canonical hrefs for each
page](https://github.com/SayaAndy/saya-today-web/commit/a0ace41ad3b0f4661e98d8fa8ef254369cc80d1e)
- [feat: use semantic html tags for
pages](https://github.com/SayaAndy/saya-today-web/commit/2bcf8ee39555ea98be309b85547c797b0d172b84)
- feat: specify more meta properties for search engines
- fix: correct user and catalogue meta
- format: specify og property names in property field
- feat: user profile description
Diffstat (limited to 'views/pages')
| -rw-r--r-- | views/pages/blog-page.html | 10 | ||||
| -rw-r--r-- | views/pages/global-map.html | 8 | ||||
| -rw-r--r-- | views/pages/robots.txt | 5 | ||||
| -rw-r--r-- | views/pages/sitemap.xml | 10 |
4 files changed, 26 insertions, 7 deletions
diff --git a/views/pages/blog-page.html b/views/pages/blog-page.html index c81406f..3fc4526 100644 --- a/views/pages/blog-page.html +++ b/views/pages/blog-page.html @@ -1,12 +1,12 @@ {{ define "body" }} <div class="absolute w-full h-full inset-0 inset-shadow-[0_0_0.4rem_black] pointer-events-none z-20"></div> -<div class="relative bg-background-light flex flex-col px-8 py-4 overflow-y-auto"> - <p class="max-xs:block [@media(max-height:32rem)]:block hidden font-andika text-2xl font-bold italic text-main-hard tracking-[.0125rem] mb-1">{{ .Title }}</p> +<article class="relative bg-background-light flex flex-col px-8 py-4 overflow-y-auto"> + <h1 class="max-xs:block [@media(max-height:32rem)]:block hidden font-andika text-2xl font-bold italic text-main-hard tracking-[.0125rem] mb-1">{{ .Title }}</h1> <p class="block grow text-lg font-andika text-secondary"> <b>{{ .L.Metadata.Published }}</b>: - <span hx-get="/api/v1/tz" hx-vals='js:{timestamp: "{{ .PublishedDate }}", tz: clientTimeZone}' hx-target="this" hx-swap="innerHTML" hx-trigger="load"> + <time datetime="{{ .PublishedDate }}" hx-get="/api/v1/tz" hx-vals='js:{timestamp: "{{ .PublishedDate }}", tz: clientTimeZone}' hx-target="this" hx-swap="innerHTML" hx-trigger="load"> {{ .PublishedDate }} - </span> + </time> </p> <p class="block grow text-lg font-andika text-secondary"><b>{{ .L.Metadata.Action }}</b>: {{ .ActionDate }}</p> <p class="block grow text-md font-andika italic text-main-hard">{{ .ShortDescription }}</p> @@ -60,7 +60,7 @@ }); </script> {{- end }} -</div> +</article> {{ end }} {{ define "header" }} diff --git a/views/pages/global-map.html b/views/pages/global-map.html index 4b07bd2..604b52e 100644 --- a/views/pages/global-map.html +++ b/views/pages/global-map.html @@ -3,9 +3,13 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="og:title" content="{{ .L.GlobalMap.Header }}"> - <meta name="og:description" content="{{ .L.GlobalMap.Description }}"> + <meta name="description" content="{{ .L.GlobalMap.Description }}"> + <meta property="og:title" content="{{ .L.GlobalMap.Header }}"> + <meta property="og:description" content="{{ .L.GlobalMap.Description }}"> + <meta property="og:url" content="{{ .CanonicalEndpoint }}/{{ .Lang }}/map"> + <meta property="og:type" content="site"> <title>{{ .L.GlobalMap.Header }} // SAYA TODAY</title> + <link rel="canonical" href="{{ .CanonicalEndpoint }}/{{ .Lang }}/map"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"> {{ block "header" . }}{{ end }} <link href="/output.css" rel="stylesheet"> diff --git a/views/pages/robots.txt b/views/pages/robots.txt new file mode 100644 index 0000000..1e5bebb --- /dev/null +++ b/views/pages/robots.txt @@ -0,0 +1,5 @@ +User-agent: * +Allow: / +Disallow: /api/ + +Sitemap: {{ .CanonicalEndpoint }}/sitemap.xml
\ No newline at end of file diff --git a/views/pages/sitemap.xml b/views/pages/sitemap.xml new file mode 100644 index 0000000..1474a56 --- /dev/null +++ b/views/pages/sitemap.xml @@ -0,0 +1,10 @@ +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + {{- range .URLs }} + <url> + <loc>{{ $.CanonicalEndpoint }}{{ .Loc }}</loc> + <lastmod>{{ .LastModified.UTC.Format "2006-01-02T15:04:05Z" }}</lastmod> + <changefreq>{{ .ChangeFreq }}</changefreq> + <priority>{{ printf "%.1f" .Priority }}</priority> + </url> + {{- end }} +</urlset> |