commit 6201e14a9e0c7a7b1603d6966b7fe7fe12e2ea40 Author: David Date: Wed Mar 17 02:29:08 2021 +0100 First commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f912638 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Generated static files +public diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..bae7af9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/charaka-hugo-theme"] + path = themes/charaka-hugo-theme + url = https://github.com/natarajmb/charaka-hugo-theme.git diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..44950b3 --- /dev/null +++ b/config.toml @@ -0,0 +1,31 @@ +baseurl = "https://phireh.fukurokuju.dev/blog" +defaultContentLanguage = "en" +theme = "charaka-hugo-theme" +defaultContentLanguageInSubdir = true + +[languages] +[languages.en] +languagedirection = "en" +LanguageName = "EN" # TODO : i18n with language names +title = "Phireh's blog" +weight = 2 + +[languages.es] +languagedirection = "es" +title = "El blog de Phireh" +LanguageName = "ES" +weight = 1 + + +[params] + +[params.highlight] + style = "zenburn" + +[[params.social]] + url = "about" + fa_icon = "fas fa-info" + +[[params.social]] + url = "https://github.com/Phireh" + fa_icon = "fab fa-github" diff --git a/content/about/_index.en.md b/content/about/_index.en.md new file mode 100644 index 0000000..d9a1705 --- /dev/null +++ b/content/about/_index.en.md @@ -0,0 +1,7 @@ ++++ +title = "About" +date = "2021-03-17" +menu = "main" ++++ + +Testing diff --git a/content/about/_index.es.md b/content/about/_index.es.md new file mode 100644 index 0000000..dad49e8 --- /dev/null +++ b/content/about/_index.es.md @@ -0,0 +1,7 @@ ++++ +title = "About" +date = "2021-03-17" +menu = "main" ++++ + +Testeando diff --git a/content/posts/test.es.md b/content/posts/test.es.md new file mode 100644 index 0000000..da94513 --- /dev/null +++ b/content/posts/test.es.md @@ -0,0 +1,6 @@ +--- +title: "Random post" +date: 2021-03-16 +draft: false +--- +This is a random test diff --git a/content/posts/test.md b/content/posts/test.md new file mode 100644 index 0000000..1e9db4f --- /dev/null +++ b/content/posts/test.md @@ -0,0 +1,6 @@ +--- +title: "Random post" +date: 2021-03-16 +draft: false +--- +# This is a random test diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..1c95f64 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,2 @@ +[lang_select_title] +other = "Language selector" diff --git a/i18n/es.toml b/i18n/es.toml new file mode 100644 index 0000000..8a32335 --- /dev/null +++ b/i18n/es.toml @@ -0,0 +1,2 @@ +[lang_select_title] +other = "Selección de idioma" diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..684c16c --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,35 @@ + +
+ {{ partial "header" . }} + {{ partial "nav" . }} +
+ {{ if .Site.RegularPages }} + {{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups }} +

{{ .Key }}

+ {{ range where .Pages "Section" "posts" }} +
+
+
{{ .Date.Format "Jan 2" }}
+
+
+

{{ .Title }}{{ if .Draft }} ::Draft{{ end }}

+
+ {{ .Summary | plainify | safeHTML | truncate 400 }} + {{ if .Truncated }} +
+ + + + +

more

+
+ {{ end }} +
+
+ {{ end }} + {{ end }} + {{ end }} +
+ {{ partial "pager" . }} + {{ partial "footer" . }} +
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..60e1f20 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,12 @@ +{{ partial "header" . }} +{{ partial "nav" . }} +
+

{{ .Date.Format "January 2, 2006" }}

+

{{ .Title }}

+
+ {{ .Content }} +
+
+{{ partial "jsshare" . }} +{{ partial "disqus" . }} +{{ partial "footer" . }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..d26ded6 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,34 @@ +
+ {{ partial "header" . }} + {{ partial "nav" . }} +
+ {{ if .Site.RegularPages }} + {{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups}} +

{{ .Key }}

+ {{ range where .Pages "Section" "posts" }} +
+
+
{{ .Date.Format "Jan 2" }}
+
+
+

{{ .Title }}{{ if .Draft }} ::Draft{{ end }}

+
+ {{ .Summary | plainify | safeHTML | truncate 400 }} + {{ if .Truncated }} +
+ + + + +

more

+
+ {{ end }} +
+
+ {{ end }} + {{ end }} + {{ end }} +
+ {{ partial "pager" . }} + {{ partial "footer" . }} +
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..20369f4 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,30 @@ + + + + + +{{ $scratch := newScratch }} +{{ $scratch.Set "baseURL" .Site.BaseURL }} + +{{ .Title }}{{ if eq .IsHome false }} | {{ .Site.Title }}{{ end }} + + + + + + +{{ with .Site.Params.highlight.style }} + + + + +{{ end }} + +{{ if eq "true" .Site.Params.share.enabled }} + + + +{{ end }} + +{{ .Scratch.Delete "baseURL" }} diff --git a/layouts/partials/language-switcher.html b/layouts/partials/language-switcher.html new file mode 100644 index 0000000..e13ff4f --- /dev/null +++ b/layouts/partials/language-switcher.html @@ -0,0 +1,14 @@ + diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..83668d1 --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,19 @@ +
+ +
diff --git a/layouts/section/about.html b/layouts/section/about.html new file mode 100644 index 0000000..821adf1 --- /dev/null +++ b/layouts/section/about.html @@ -0,0 +1,16 @@ +{{ partial "header" . }} +{{ partial "nav" . }} +
+

{{ .Date.Format "January 2, 2006" }}

+

{{ .Title }}

+
+ {{ .Content }} +
+

Frequent Tags

+ {{ range .Site.Taxonomies.tags.ByCount }} + {{ .Name }} ({{ .Count }})   + {{end}} +
+{{ partial "jsshare" . }} +{{ partial "disqus" . }} +{{ partial "footer" . }} diff --git a/themes/charaka-hugo-theme b/themes/charaka-hugo-theme new file mode 160000 index 0000000..021bc74 --- /dev/null +++ b/themes/charaka-hugo-theme @@ -0,0 +1 @@ +Subproject commit 021bc743417b24527ed7c757cbefb577605dd594