Adiciona configuração basica do Hugo

This commit is contained in:
Hugo Peixoto 2023-07-18 23:26:43 +01:00
parent f37d7e2cce
commit d9a036d2b9
6 changed files with 111 additions and 0 deletions

6
archetypes/default.md Normal file
View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

11
config.toml Normal file
View File

@ -0,0 +1,11 @@
baseURL = 'http://example.org/'
languageCode = 'pt-pt'
defaultContentLanguage = "pt"
title = "DRM Portugal"
[markup.goldmark.renderer]
unsafe= true
[permalinks]
[permalinks.page]
artigos = "/:year/:month/:day/:filename"

View File

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<style>
body { max-width: 600px; margin: 0 auto; }
img { max-width: 100%; }
blockquote { clear: both; }
hr { clear: both; }
</style>
</head>
<body>
<header>
<a href="/"><img src="/img/logo.png" alt="DRM PT" /></a>
</header>
<nav>
<a href="/">Início</a>
<a href="/o-que-e-drm/">O que é DRM</a>
<a href="/como-descobrir-drm/">Como descobrir DRM</a>
<a href="/combater-o-drm/">Combater o DRM</a>
<a href="/faq/">Perguntas Frequentes</a>
<a href="/imprensa/">Imprensa</a>
<a href="/contactos/">Contactos</a>
</nav>
<main>
{{ block "main" . }}
{{ end }}
</main>
<aside>
<section aria-labelled-by="artigos-recentes">
<h2 id="artigos-recentes">Artigos recentes</h2>
</section>
<section aria-labelled-by="links">
<h2 id="links">Links</h2>
</section>
<section aria-labelled-by="comentarios-recentes">
<h2 id="comentarios-recentes">Comentários Recentes</h2>
</section>
<section aria-labelled-by="arquivo">
<h2 id="arquivo">Arquivo</h2>
</section>
<section aria-labelled-by="categorias">
<h2 id="categorias">Categorias</h2>
</section>
<section aria-labelled-by="meta">
<h2 id="meta">Meta</h2>
</section>
</aside>
<footer>
CC-BY 2023 DRM Portugal
</footer>
</body>
</html>

View File

@ -0,0 +1,6 @@
{{ define "main" }}
lista:
{{ range .Pages }}
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
{{ end }}
{{ end }}

View File

@ -0,0 +1,30 @@
{{ define "title" }}
{{ .Title }} | {{ .Site.Title }}
{{ end }}
{{ define "main" }}
<h1>{{ .Title }}</h1>
<img src="./capa.jpg" alt="{{ .Params.coverdescription }}" title="{{ .Params.coverdescription }}" />
<img src="./capa.png" alt="{{ .Params.coverdescription }}" title="{{ .Params.coverdescription }}" />
<img src="./capa.gif" alt="{{ .Params.coverdescription }}" title="{{ .Params.coverdescription }}" />
{{ .Content }}
{{ if (eq .Section "artigos") }}
<hr>
<p>
Publicado por {{ .Params.author }}
//
{{ if .Params.categories }}
{{ range $index, $name := .Params.categories }}
{{ $name }}{{ if ne (add $index 1) (len $.Params.categories) }}, {{ end }}
{{ end }}
{{ else }}
Sem categoria
{{ end }}
//
<a href="{{ .Permalink }}">{{ time.Format "02 de January, 2006" .Date }}</a>
</p>
{{ end }}
{{ end }}

BIN
static/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB