First commit
This commit is contained in:
commit
6201e14a9e
18 changed files with 233 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Generated static files
|
||||||
|
public
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "themes/charaka-hugo-theme"]
|
||||||
|
path = themes/charaka-hugo-theme
|
||||||
|
url = https://github.com/natarajmb/charaka-hugo-theme.git
|
||||||
6
archetypes/default.md
Normal file
6
archetypes/default.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|
|
||||||
31
config.toml
Normal file
31
config.toml
Normal file
|
|
@ -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"
|
||||||
7
content/about/_index.en.md
Normal file
7
content/about/_index.en.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
+++
|
||||||
|
title = "About"
|
||||||
|
date = "2021-03-17"
|
||||||
|
menu = "main"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Testing
|
||||||
7
content/about/_index.es.md
Normal file
7
content/about/_index.es.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
+++
|
||||||
|
title = "About"
|
||||||
|
date = "2021-03-17"
|
||||||
|
menu = "main"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Testeando
|
||||||
6
content/posts/test.es.md
Normal file
6
content/posts/test.es.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Random post"
|
||||||
|
date: 2021-03-16
|
||||||
|
draft: false
|
||||||
|
---
|
||||||
|
This is a random test
|
||||||
6
content/posts/test.md
Normal file
6
content/posts/test.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Random post"
|
||||||
|
date: 2021-03-16
|
||||||
|
draft: false
|
||||||
|
---
|
||||||
|
# This is a random test
|
||||||
2
i18n/en.toml
Normal file
2
i18n/en.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[lang_select_title]
|
||||||
|
other = "Language selector"
|
||||||
2
i18n/es.toml
Normal file
2
i18n/es.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[lang_select_title]
|
||||||
|
other = "Selección de idioma"
|
||||||
35
layouts/_default/list.html
Normal file
35
layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<!-- same as index.html for tags listing -->
|
||||||
|
<div class="container">
|
||||||
|
{{ partial "header" . }}
|
||||||
|
{{ partial "nav" . }}
|
||||||
|
<main class="container">
|
||||||
|
{{ if .Site.RegularPages }}
|
||||||
|
{{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups }}
|
||||||
|
<h1 class="title is-3">{{ .Key }}</h1>
|
||||||
|
{{ range where .Pages "Section" "posts" }}
|
||||||
|
<article class="columns">
|
||||||
|
<div class="column is-2">
|
||||||
|
<h6 class="is-inline" style="white-space: nowrap">{{ .Date.Format "Jan 2" }}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<h2 class="subtitle is-inline is-size-4-mobile is-size-3-desktop"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
|
||||||
|
<div class="content is-hidden-mobile">
|
||||||
|
{{ .Summary | plainify | safeHTML | truncate 400 }}
|
||||||
|
{{ if .Truncated }}
|
||||||
|
<br>
|
||||||
|
<a class="button is-marginless is-paddingless" href="{{ .Permalink }}">
|
||||||
|
<span class="icon-link is-small" style="line-height: 100%">
|
||||||
|
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
<p style="padding:0 5px"></p>more</p>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</main>
|
||||||
|
{{ partial "pager" . }}
|
||||||
|
{{ partial "footer" . }}
|
||||||
|
</div>
|
||||||
12
layouts/_default/single.html
Normal file
12
layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{ partial "header" . }}
|
||||||
|
{{ partial "nav" . }}
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
|
||||||
|
<h1 class="subtitle is-size-4-mobile is-size-3-desktop">{{ .Title }}</h1>
|
||||||
|
<div class="content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ partial "jsshare" . }}
|
||||||
|
{{ partial "disqus" . }}
|
||||||
|
{{ partial "footer" . }}
|
||||||
34
layouts/index.html
Normal file
34
layouts/index.html
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
<div class="container">
|
||||||
|
{{ partial "header" . }}
|
||||||
|
{{ partial "nav" . }}
|
||||||
|
<main class="container">
|
||||||
|
{{ if .Site.RegularPages }}
|
||||||
|
{{ range (.Paginate (.Site.RegularPages.GroupByDate "2006")).PageGroups}}
|
||||||
|
<h1 class="title is-3">{{ .Key }}</h1>
|
||||||
|
{{ range where .Pages "Section" "posts" }}
|
||||||
|
<article class="columns">
|
||||||
|
<div class="column is-2">
|
||||||
|
<h6 class="is-inline" style="white-space: nowrap">{{ .Date.Format "Jan 2" }}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<h2 class="subtitle is-inline is-size-4-mobile is-size-3-desktop"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
|
||||||
|
<div class="content is-hidden-mobile">
|
||||||
|
{{ .Summary | plainify | safeHTML | truncate 400 }}
|
||||||
|
{{ if .Truncated }}
|
||||||
|
<br>
|
||||||
|
<a class="button is-marginless is-paddingless" href="{{ .Permalink }}">
|
||||||
|
<span class="icon-link is-small" style="line-height: 100%">
|
||||||
|
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
<p style="padding:0 5px"></p>more</p>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</main>
|
||||||
|
{{ partial "pager" . }}
|
||||||
|
{{ partial "footer" . }}
|
||||||
|
</div>
|
||||||
30
layouts/partials/header.html
Normal file
30
layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html{{ with .Site.LanguageCode }} lang="{{ . }}"{{ end }}>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
{{ $scratch := newScratch }}
|
||||||
|
{{ $scratch.Set "baseURL" .Site.BaseURL }}
|
||||||
|
|
||||||
|
<title>{{ .Title }}{{ if eq .IsHome false }} | {{ .Site.Title }}{{ end }}</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ $scratch.Get "baseURL" }}/css/styles.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"
|
||||||
|
integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
{{ with .Site.Params.highlight.style }}
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ . }}.min.css" crossorigin="anonymous" />
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
<script src="{{ $scratch.Get "baseURL" }}/js/highlight.js"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if eq "true" .Site.Params.share.enabled }}
|
||||||
|
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.jssocials/1.4.0/jssocials-theme-minima.css" />
|
||||||
|
<script type="text/javascript" src="{{ $scratch.Get "baseURL" }}/js/jssocials.js"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ .Scratch.Delete "baseURL" }}
|
||||||
14
layouts/partials/language-switcher.html
Normal file
14
layouts/partials/language-switcher.html
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<nav class="language-selector layout__language-selector">
|
||||||
|
|
||||||
|
{{ if .IsTranslated -}}
|
||||||
|
{{ range .Translations }}
|
||||||
|
<a rel="alternate" href="{{ .RelPermalink }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .Language.LanguageName }}</a>
|
||||||
|
{{ end -}}
|
||||||
|
{{ else -}}
|
||||||
|
{{ range .Site.Languages -}}
|
||||||
|
{{ if ne $.Site.Language.Lang .Lang }}
|
||||||
|
<a rel="alternate" href="{{ .Lang | relURL }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .LanguageName }}</a>
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
||||||
|
</nav>
|
||||||
19
layouts/partials/nav.html
Normal file
19
layouts/partials/nav.html
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<div class="container">
|
||||||
|
<nav class="navbar level">
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a class="nav-item" href="{{ .Site.BaseURL }}"><h1 class="title is-3">{{ .Site.Title }}</h1></a>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-menu has-text-centered is-active">
|
||||||
|
<div class="navbar-end is-centered">
|
||||||
|
{{ range .Site.Params.social }}
|
||||||
|
<a href="{{ .url | absLangURL }}" rel="me">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="{{ .fa_icon }}"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ partial "language-switcher.html" . }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
16
layouts/section/about.html
Normal file
16
layouts/section/about.html
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{{ partial "header" . }}
|
||||||
|
{{ partial "nav" . }}
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
|
||||||
|
<h2 class="subtitle is-size-4-mobile is-size-3-desktop">{{ .Title }}</h1>
|
||||||
|
<div class="content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
<h2 class="subtitle is-size-5-mobile is-size-4-desktop">Frequent Tags</h2>
|
||||||
|
{{ range .Site.Taxonomies.tags.ByCount }}
|
||||||
|
<a href="/tags/{{ .Name | urlize }}"> {{ .Name }} ({{ .Count }}) </a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{ partial "jsshare" . }}
|
||||||
|
{{ partial "disqus" . }}
|
||||||
|
{{ partial "footer" . }}
|
||||||
1
themes/charaka-hugo-theme
Submodule
1
themes/charaka-hugo-theme
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 021bc743417b24527ed7c757cbefb577605dd594
|
||||||
Loading…
Add table
Add a link
Reference in a new issue