Browse Source

Basic Gemini configurations

master
FollieHiyuki 2 months ago
parent
commit
f2d86792b4
Signed by: FollieHiyuki GPG Key ID: 813CF484F4993419
  1. 5
      .gitignore
  2. 6
      GEMINI/archetypes/default.md
  3. 35
      GEMINI/config.yaml
  4. 12
      GEMINI/content/posts/test.md
  5. 44
      GEMINI/layouts/_default/rss.xml
  6. 17
      GEMINI/layouts/_default/single.gmi
  7. 29
      GEMINI/layouts/index.gmi
  8. 10
      README.md
  9. 0
      WWW/archetypes/default.md
  10. 0
      WWW/assets/css/base.tpl.css
  11. 0
      WWW/assets/css/homepage.css
  12. 0
      WWW/assets/xml/base.tpl.xml
  13. 0
      WWW/config.yaml
  14. 0
      WWW/content/about/index.md
  15. 0
      WWW/content/homepage.md
  16. 0
      WWW/content/posts/_index.md
  17. 0
      WWW/content/posts/test-post.md
  18. 0
      WWW/content/tags/_index.md
  19. 0
      WWW/layouts/404.html
  20. 0
      WWW/layouts/_default/baseof.html
  21. 0
      WWW/layouts/_default/home.html
  22. 0
      WWW/layouts/_default/list.html
  23. 3
      WWW/layouts/_default/rss.xml
  24. 0
      WWW/layouts/_default/single.html
  25. 0
      WWW/layouts/_default/terms.html
  26. 0
      WWW/layouts/partials/assets.html
  27. 0
      WWW/layouts/partials/banner.html
  28. 0
      WWW/layouts/partials/footer.html
  29. 0
      WWW/layouts/partials/heading.html
  30. 0
      WWW/layouts/partials/link.html
  31. 0
      WWW/layouts/partials/load_site_assets.html
  32. 0
      WWW/layouts/partials/meta.html
  33. 0
      WWW/layouts/partials/tags.html
  34. 0
      WWW/layouts/partials/title.html
  35. 0
      WWW/layouts/shortcodes/homepage.html

5
.gitignore

@ -1,2 +1,3 @@
static/
public/
*/static/
*/public/
*/resources/

6
GEMINI/archetypes/default.md

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

35
GEMINI/config.yaml

@ -0,0 +1,35 @@
baseURL : https://folliehiyuki.com
languageCode : en-us
title : folliehiyuki
uglyurls: true
disablePathToLower: true
ignoreErrors: error-disable-taxonomy
disableKinds:
- taxonomy
# rssLimit: 10
mediaTypes:
text/gemini:
suffixes:
- "gmi"
outputFormats:
GEMINI:
name: GEMINI
isPlainText: true
isHTML: false
mediaType: text/gemini
protocol: "gemini://"
permalinkable: true
path: "/"
GEMRSS:
name: GEMRSS
isHTML: false
mediaType: application/rss+xml
protocol: "gemini://"
path: "/"
outputs:
section: ["GEMRSS"]
home: ["GEMINI"]
page: ["GEMINI"]

12
GEMINI/content/posts/test.md

@ -0,0 +1,12 @@
---
title: "Test"
date: 2021-05-01T03:28:11+03:00
draft: true
---
## A heading
This is a test post.
=> https://drewdevault.com Drew Devault's site
=> gemini://drewdevault.com And his capsule

44
GEMINI/layouts/_default/rss.xml

@ -0,0 +1,44 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>FollieHiyuki's Gemini capsule</title>
<link>gemini://folliehiyuki.com</link>
<description>FollieHiyuki's Gemini capsule</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 $pages }}
{{- if .OutputFormats.Get "GEMINI" -}}
<item>
<title>{{ .Title }}</title>
{{ with .OutputFormats.Get "GEMINI" }}
<link>{{replace .Permalink "/" "" 1}}</link>
{{ end }}
<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}}
{{ with .OutputFormats.Get "GEMINI" }}
<guid>{{replace .Permalink "/" "" 1}}</guid>
{{ end }}
</item>
{{- end -}}
{{ end }}
</channel>
</rss>

17
GEMINI/layouts/_default/single.gmi

@ -0,0 +1,17 @@
# {{$.Title | safeHTML}}
{{ .RawContent }}
```Cute bunnies
(\ /) (\_/) (\-/) (\(\ (\_/) /)/)
( . .) (0_0) (='.'=) (=':'=) (>.<) ( ^.^)
C(")(") C(")(") (")-(")O (,(")(") (")_(") C(")(")
```
“{{$.Title | safeHTML}}” was published on {{.Date.Format "January 2, 2006"}}.
=> / Go home{{ with .OutputFormats.Get "html" }}
=> {{.Permalink}} View “{{$.Title | safeHTML}}” on the WWW
{{- end }}
The content for the capsule is licensed under CC BY-NC-SA. It's code is under MIT.

29
GEMINI/layouts/index.gmi

@ -0,0 +1,29 @@
```ASCII art to look cool
__________ _______________ ______ ______ ______ _____
___ ____/________ /__ /__(_)_______ / / /__(_)____ _____ ____ /____(_)
__ /_ _ __ \_ /__ /__ /_ _ \_ /_/ /__ /__ / / / / / /_ //_/_ /
_ __/ / /_/ / / _ / _ / / __/ __ / _ / _ /_/ // /_/ /_ ,< _ /
/_/ \____//_/ /_/ /_/ \___//_/ /_/ /_/ _\__, / \__,_/ /_/|_| /_/
/____/
```
# FollieHiyuki's gemini capsule
Contact: folliekazetani@protonmail.com
# Other places where I also exist
=> https://folliehiyuki.com My blog on the WWW
=> https://git.disroot.org/FollieHiyuki My git repos
# Get notified
=> /gemimi.xml RSS feed
# Blog posts
{{ range (where .Site.RegularPages "Section" "posts") }}
{{- if .OutputFormats.Get "GEMINI" }}
=> {{replace .Permalink "/posts" "" 1}} {{.Date.Format "2006-01-02"}}: {{.Title | safeHTML}}{{ end }}
{{ end }}
The content for the capsule is licensed under CC BY-NC-SA. It's code is under MIT.

10
README.md

@ -2,6 +2,14 @@
Me ranting about random things + no Javascript junk (っ◔◡◔)っ
Uses [hugo](https://gohugo.io/) static site generator and is based on [hugo-flex](https://github.com/de-souza/hugo-flex) theme.
Powered by [hugo](https://gohugo.io/) static site generator.
### 🌟 Credits
- The website's theme is based on [hugo-flex](https://github.com/de-souza/hugo-flex).
- Configuration for Gemini is taken from [@Drew Devault](https://git.sr.ht/~sircmpwn/drewdevault.com) and [@sylvaindurand](https://sylvaindurand.org/gemini-and-hugo/).
### 📋 Licenses
The code that powers this blog uses [MIT](https://opensource.org/licenses/MIT) license. The articles and other contents on the website are licensed under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0).

0
archetypes/default.md → WWW/archetypes/default.md

0
assets/css/base.tpl.css → WWW/assets/css/base.tpl.css

0
assets/css/homepage.css → WWW/assets/css/homepage.css

0
assets/xml/base.tpl.xml → WWW/assets/xml/base.tpl.xml

0
config.yaml → WWW/config.yaml

0
content/about/index.md → WWW/content/about/index.md

0
content/homepage.md → WWW/content/homepage.md

0
content/posts/_index.md → WWW/content/posts/_index.md

0
content/posts/test-post.md → WWW/content/posts/test-post.md

0
content/tags/_index.md → WWW/content/tags/_index.md

0
layouts/404.html → WWW/layouts/404.html

0
layouts/_default/baseof.html → WWW/layouts/_default/baseof.html

0
layouts/_default/home.html → WWW/layouts/_default/home.html

0
layouts/_default/list.html → WWW/layouts/_default/list.html

3
layouts/_default/rss.xml → WWW/layouts/_default/rss.xml

@ -11,7 +11,8 @@
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</description>
{{ with site.LanguageCode }}<language>{{ . }}</language>{{ end }}{{ with site.Author.email }}
<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 }}{{ with .Date | default nil }}

0
layouts/_default/single.html → WWW/layouts/_default/single.html

0
layouts/_default/terms.html → WWW/layouts/_default/terms.html

0
layouts/partials/assets.html → WWW/layouts/partials/assets.html

0
layouts/partials/banner.html → WWW/layouts/partials/banner.html

0
layouts/partials/footer.html → WWW/layouts/partials/footer.html

0
layouts/partials/heading.html → WWW/layouts/partials/heading.html

0
layouts/partials/link.html → WWW/layouts/partials/link.html

0
layouts/partials/load_site_assets.html → WWW/layouts/partials/load_site_assets.html

0
layouts/partials/meta.html → WWW/layouts/partials/meta.html

0
layouts/partials/tags.html → WWW/layouts/partials/tags.html

0
layouts/partials/title.html → WWW/layouts/partials/title.html

0
layouts/shortcodes/homepage.html → WWW/layouts/shortcodes/homepage.html

Loading…
Cancel
Save