Upload files to "layouts/_default"

This commit is contained in:
bacalhau 2025-03-19 22:53:34 +00:00
parent b78e9442a5
commit 5a2fc4bbe4
4 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language }}">
<head>
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
<link rel="canonical" href="{{ .Site.BaseURL }}">
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
<link rel='stylesheet' type='text/css' href='/style.css'>
{{ with .Site.Params.favicon }}<link rel="icon" href="{{ . }}">{{ end }}
<meta name="description" content="based website | made in portugal">
{{ if isset .Params "tags" }}<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">
<meta charset="utf-8">
</head>
<body>
<main>
<header><h1 id="tag_{{ .Site.Title }}">{{ .Site.Title }}</h1></header>
{{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end }}
<article>
<hr class="rounded">
<h1 id="tag_{{ .Title }} " class="pagetitle">{{ .Title }}</h1>
{{ block "main" . }}
{{ .Content }}
{{ end }}
{{ if .Param "taglist" }}{{ partial "taglist.html" . }}{{ end }}
<hr class="rounded">
{{ if .Param "nextprev" }}{{ partial "nextprev.html" . }}{{ end }}
</article>
</main>
{{ block "footer" . }}
<footer>
<a href="https://donate.based.pt">donate</a>
</footer>
{{ end }}
</body>
</html>

View File

@ -0,0 +1,23 @@
{{ define "title" -}}
{{ .Title | title }}
{{- end }}
{{ define "main" -}}
{{ .Content }}
{{ if not .IsHome }}
<ul>
{{- range .Pages }}
<li>
{{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "02 Jan 2006" }}</time> &ndash; {{ end -}}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- if .Param "authorsinlist" }}
{{ with .Params.authors }}
by
{{ delimit . ", " " and " }}
{{ end }}
{{ end -}}
</li>
{{- end }}
</ul>
{{ end }}
{{- end }}

31
layouts/_default/rss.xml Normal file
View File

@ -0,0 +1,31 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<image>
<url>{{.Site.Params.favicon }}</url>
<title>{{ .Site.Title }}</title>
<link>{{ .Permalink }}/</link>
</image>
<channel>
<title>{{ .Site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range .Site.RegularPages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{- .Content | html -}}</description>
</item>
{{ end }}
</channel>
</rss>

View File

@ -0,0 +1,3 @@
{{ define "title" -}}
{{ .Title }}
{{- end }}