updated for microformats2
This commit is contained in:
parent
88236da4b8
commit
11a09e6c3c
6
archetypes/articles.md
Normal file
6
archetypes/articles.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
type: "articles"
|
||||
draft: true
|
||||
---
|
5
archetypes/notes.md
Normal file
5
archetypes/notes.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: ""
|
||||
date: {{ .Date }}
|
||||
type: "notes"
|
||||
---
|
6
archetypes/photos.md
Normal file
6
archetypes/photos.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: ""
|
||||
date: {{ .Date }}
|
||||
type: "photos"
|
||||
image: "" # Add the path to your image here
|
||||
---
|
0
exampleSite/TODO
Normal file
0
exampleSite/TODO
Normal file
@ -1,20 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
{{ partial "head.html" . }}
|
||||
{{ partial "meta.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
</header>
|
||||
<body class="h-card">
|
||||
{{ partial "header.html" . }}
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
<footer>
|
||||
© {{ now.Year }} <a href="{{ .Site.Params.author.url }}">{{ .Site.Params.author.name }}</a>
|
||||
</footer>
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,10 +1,11 @@
|
||||
{{ define "main" }}
|
||||
<section>
|
||||
<h2>Posts</h2>
|
||||
<section class="h-feed">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
<li class="h-entry">
|
||||
<a href="{{ .RelPermalink }}" class="p-name u-url">{{ .Title }}</a>
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
@ -1,6 +1,9 @@
|
||||
{{ define "main" }}
|
||||
<article>
|
||||
<h2>{{ .Title }}</h2>
|
||||
<div>{{ .Content }}</div>
|
||||
<article class="h-entry">
|
||||
<h1 class="p-name">{{ .Title }}</h1>
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
13
layouts/articles/list.html
Normal file
13
layouts/articles/list.html
Normal file
@ -0,0 +1,13 @@
|
||||
{{ define "main" }}
|
||||
<section class="h-feed">
|
||||
<h2>Articles</h2>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li class="h-entry">
|
||||
<a href="{{ .RelPermalink }}" class="p-name u-url">{{ .Title }}</a>
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
9
layouts/articles/single.html
Normal file
9
layouts/articles/single.html
Normal file
@ -0,0 +1,9 @@
|
||||
{{ define "main" }}
|
||||
<article class="h-entry">
|
||||
<h1 class="p-name">{{ .Title }}</h1>
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
13
layouts/notes/list.html
Normal file
13
layouts/notes/list.html
Normal file
@ -0,0 +1,13 @@
|
||||
{{ define "main" }}
|
||||
<section class="h-feed">
|
||||
<h2>Notes</h2>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li class="h-entry">
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
<div class="e-content">{{ .Content }}</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
8
layouts/notes/single.html
Normal file
8
layouts/notes/single.html
Normal file
@ -0,0 +1,8 @@
|
||||
{{ define "main" }}
|
||||
<article class="h-entry">
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
7
layouts/partials/footer.html
Normal file
7
layouts/partials/footer.html
Normal file
@ -0,0 +1,7 @@
|
||||
<footer>
|
||||
<p>
|
||||
© {{ now.Year }}
|
||||
<span class="p-author h-card">{{ .Site.Params.author.name }}</span>
|
||||
</p>
|
||||
<p>Powered by Hugo and the IndieWeb.</p>
|
||||
</footer>
|
5
layouts/partials/head.html
Normal file
5
layouts/partials/head.html
Normal file
@ -0,0 +1,5 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<link rel="me" href="{{ .Site.Params.indieweb.me_url }}" />
|
8
layouts/partials/header.html
Normal file
8
layouts/partials/header.html
Normal file
@ -0,0 +1,8 @@
|
||||
<header>
|
||||
<nav>
|
||||
<a class="u-url p-name" href="/">{{ .Site.Title }}</a>
|
||||
<a href="/notes">Notes</a>
|
||||
<a href="/articles">Articles</a>
|
||||
<a href="/photos">Photos</a>
|
||||
</nav>
|
||||
</header>
|
6
layouts/partials/meta.html
Normal file
6
layouts/partials/meta.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- Webmention -->
|
||||
<link rel="webmention" href="{{ .Site.Params.webmention.endpoint }}" />
|
||||
<link rel="pingback" href="{{ .Site.Params.webmention.pingback }}" />
|
||||
|
||||
<!-- Micropub -->
|
||||
<link rel="micropub" href="{{ .Site.Params.micropub.endpoint }}" />
|
14
layouts/photos/list.html
Normal file
14
layouts/photos/list.html
Normal file
@ -0,0 +1,14 @@
|
||||
{{ define "main" }}
|
||||
<section class="h-feed">
|
||||
<h2>Photos</h2>
|
||||
<div class="photo-grid">
|
||||
{{ range .Pages }}
|
||||
<figure class="h-entry">
|
||||
<img src="{{ .Params.image }}" alt="{{ .Title }}" class="u-photo">
|
||||
<figcaption class="p-name">{{ .Title }}</figcaption>
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
</figure>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
10
layouts/photos/single.html
Normal file
10
layouts/photos/single.html
Normal file
@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<article class="h-entry">
|
||||
<h1 class="p-name">{{ .Title }}</h1>
|
||||
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
<img src="{{ .Params.image }}" alt="{{ .Title }}" class="u-photo">
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
Loading…
x
Reference in New Issue
Block a user