Αυτό το commit περιλαμβάνεται σε:
infl00p 2021-10-07 16:23:07 +03:00
γονέας 7d2c8bc09b
commit d8e0521851
8 αρχεία άλλαξαν με 362 προσθήκες και 20 διαγραφές

@ -15,9 +15,17 @@ protocol = "gemini://"
permalinkable = true
path = "gemini/"
[outputFormats.gopher]
mediaType = "text/plain"
baseName = "gophermap"
isPlainText = true
protocol = "gopher://"
path = "gopher/"
noUgly = false
[outputs]
home = [ "HTML", "RSS", "GEMINI" ]
page = [ "HTML", "GEMINI" ]
home = [ "HTML", "RSS", "GEMINI", "gopher"]
page = [ "HTML", "GEMINI", "gopher"]
[taxonomies]
draseis = "draseis"

Το diff αρχείων καταστέλλεται επειδή μία ή περισσότερες γραμμές είναι πολύ μεγάλες

8
layouts/_default/list.gopher.txt Κανονικό αρχείο

@ -0,0 +1,8 @@
!{{ .Title }}
{{ .RawContent }}
{{ range .Pages.ByPublishDate.Reverse }}
0{{ .Title }} {{ replace .RelPermalink "/gopher" "" 1}} hellug.gr 70
{{ end }}

@ -1,16 +1,15 @@
# {{ .Title }}{{ $scratch := newScratch }}
{{ $content := .RawContent | plainify -}}
{{ $content := .RawContent -}}
{{ $content := $content | replaceRE `</tr>` "\n" -}}
{{ $content := $content | replaceRE `<br/??>` "\n" -}}
{{ $content := $content | replaceRE `<br??/??>` "\n" -}}
{{ $content := $content | replaceRE `<a .*href="(.+?)".*>(.+?)</a>` "[$2]($1)" -}}
{{ $content := $content | plainify -}}
{{ $content := $content | replaceRE `#### ` "### " -}}
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
{{ $content := $content | replaceRE `\n(\d+). (.+?)` "\n* $2" -}}
{{ $content := $content | replaceRE `\[\^(.+?)\]:?` "" -}}
{{ $content := $content | replaceRE `<br/??>` "\n" -}}
{{ $content := $content | replaceRE `<a .*href="(.+?)".*>(.+?)</a>` "[$2]($1)" -}}
{{ $content := $content | replaceRE `\sgemini://(\S*)` " [gemini://$1](gemini://$1)" -}}
{{ $content := $content | replaceRE `{{ < audio "(.+?)" >}}` "=> https://www.hellug.gr/$1 Embedded Audio link - $1" -}}
{{ $content := $content | replaceRE `{{ < video "(.+?)" >}}` "=> https://www.hellug.gr/$1 Embedded Video link - $1" -}}
{{ $content := $content | replaceRE `{{ < youtube (.+?) >}}` "=> https://www.youtube.com/watch?v=$1 YouTube Video link to $1" -}}
{{ $content := $content | replaceRE `{{ < vimeo (.+?) >}}` "=> https://vimeo.com/$1 Vimeo Video link to $1" -}}
{{ $content := $content | replaceRE "([^`])<.*?>([^`])" "$1$2" -}}
{{ $content := $content | replaceRE `\n\n!\[.*\]\((.+?) \"(.+?)\"\)` "\n\n=> $1 Image: $2" -}}
{{ $content := $content | replaceRE `\n\n!\[.*]\((.+?)\)` "\n\n=> $1 Embedded Image: $1" -}}

@ -1,20 +1,19 @@
# {{ .Title }}{{ $scratch := newScratch }}
{{ $content := .RawContent | plainify -}}
{{ $content := .RawContent -}}
{{ $content := $content | replaceRE "<br/??>" "\n" -}}
{{ $content := $content | replaceRE "<br??/??>" "\n" -}}
{{ $content := $content | replaceRE "<tr>" "\n" -}}
{{ $content := $content | replaceRE `<a .*href="(.+?)".*>(.+?)</a>` "[$2]($1)" -}}
{{ $content := $content | plainify -}}
{{ $content := $content | replaceRE `#### ` "### " -}}
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
{{ $content := $content | replaceRE `\n(\d+). (.+?)` "\n* $2" -}}
{{ $content := $content | replaceRE `\[\^(.+?)\]:?` "" -}}
{{ $content := $content | replaceRE `<br/??>` "\n" -}}
{{ $content := $content | replaceRE `<a .*href="(.+?)".*>(.+?)</a>` "[$2]($1)" -}}
{{ $content := $content | replaceRE `\sgemini://(\S*)` " [gemini://$1](gemini://$1)" -}}
{{ $content := $content | replaceRE `{{ < audio "(.+?)" >}}` "=> https://www.hellug.gr/$1 Embedded Audio link - $1" -}}
{{ $content := $content | replaceRE `{{ < video "(.+?)" >}}` "=> https://www.hellug.gr/$1 Embedded Video link - $1" -}}
{{ $content := $content | replaceRE `{{ < youtube (.+?) >}}` "=> https://www.youtube.com/watch?v=$1 YouTube Video link to $1" -}}
{{ $content := $content | replaceRE `{{ < vimeo (.+?) >}}` "=> https://vimeo.com/$1 Vimeo Video link to $1" -}}
{{ $content := $content | replaceRE "([^`])<.*?>([^`])" "$1$2" -}}
{{ $content := $content | replaceRE `([^"])<.*?>([^"])` "$1$2" -}}
{{ $content := $content | replaceRE `\n\n!\[.*\]\((.+?) \"(.+?)\"\)` "\n\n=> $1 Image: $2" -}}
{{ $content := $content | replaceRE `\n\n!\[.*]\((.+?)\)` "\n\n=> $1 Embedded Image: $1" -}}
{{ $links := findRE `\n=> ` $content }}{{ $scratch.Set "ref" (add (len $links) 1) }}
{{ $links := findRE "\n=> " $content }}{{ $scratch.Set "ref" (add (len $links) 1) }}
{{ $refs := findRE `\[.+?\]\(.+?\)` $content }}
{{ $scratch.Set "content" $content }}{{ range $refs }}{{ $ref := $scratch.Get "ref" }}{{ $contentInLoop := $scratch.Get "content" }}{{ $url := (printf "%s #%d" . $ref) }}{{ $contentInLoop := replace $contentInLoop . $url -}}{{ $scratch.Set "content" $contentInLoop }}{{ $scratch.Set "ref" (add $ref 1) }}{{ end }}{{ $content := $scratch.Get "content" | replaceRE `\[(.+?)\]\((.+?)\) #(\d+)` "$1 [$3]" -}}
{{ $content | safeHTML }}

4
layouts/_default/single.gopher.txt Κανονικό αρχείο

@ -0,0 +1,4 @@
# {{ .Title }}
{{ .Date.Format (.Site.Params.dateform | default "January 2006") }}
{{ .RawContent }}

@ -26,6 +26,6 @@ This is the Gemini Capsule of the Hellenic Linux User Group.
## Νέα Άρθρα - New Posts
{{ $counter := 0 }}{{ $pages := .Site.RegularPages }}{{ $recentpostlimit := (sub now.Unix 2592000 ) }}{{ range first 5 $pages }}{{ $counter = add $counter 1 }}{{ if eq $counter 1 }}=> {{ replace .URL "/gemini" "" 1}} {{ .Title }}
{{ $counter := 0 }}{{ $pages := .Site.RegularPages }}{{ $recentpostlimit := (sub now.Unix 2592000 ) }}{{ range first 15 $pages }}{{ $counter = add $counter 1 }}{{ if eq $counter 1 }}=> {{ replace .URL "/gemini" "" 1}} {{ .Title }}
{{ else }}=> {{ replace .URL "/gemini" "" 1}} {{ .Title }}
{{ end }}{{ end }}

29
layouts/index.gopher.txt Κανονικό αρχείο

@ -0,0 +1,29 @@
Hellenic Linux User Group
Καλως Ήλθατε
Η Ένωση Ελλήνων Χρηστών και Φίλων του Λίνουξ σας καλωσορίζει στη
κάψουλα της στη σφαίρα του προτοκόλλου Gemini.
Welcome
This is the Gemini Capsule of the Hellenic Linux User Group.
Σύνδεσμοι - Links:
https://www.hellug.gr Hellug WebSite
https://forum.hellug.gr Hellug Forum
https://wiki.hellug.gr Hellug Wiki
https://dev.hellug.gr Hellug Git Repositoris
Σελίδες:
{{ $currentPage := . }}{{ range .Site.Menus.main }}{{ if .HasChildren }}
{{ .Name }}
{{ range .Children }}
0{{ .Name }} {{ replace .URL "/gopher" "" 1}} hellug.gr 70
{{ end }}
{{ else }}
{{ .Name }}
{{ end }}{{ end }}
Νέα Άρθρα - New Posts:
{{ range first 15 .Site.RegularPages }}
0{{ .Title }} {{ replace .RelPermalink "/gopher" "" 1}} hellug.gr 70
{{ end }}