Compare commits
12 commits
6bc1b2cecf
...
986a5c45ce
Author | SHA1 | Date | |
---|---|---|---|
![]() |
986a5c45ce | ||
![]() |
cabe184b26 | ||
![]() |
82f16001be | ||
![]() |
b72959de74 | ||
![]() |
8072886809 | ||
![]() |
275e3d27e4 | ||
![]() |
84acd10234 | ||
![]() |
2f20804952 | ||
![]() |
1070824023 | ||
![]() |
895e65c192 | ||
![]() |
a5f5dad59c | ||
![]() |
de47f656c7 |
21
README.md
21
README.md
|
@ -76,7 +76,7 @@ Inside the folder of your Hugo site run:
|
|||
```
|
||||
$ git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
|
||||
```
|
||||
For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo.
|
||||
For more information read the official [setup guide](//gohugo.io/getting-started/quick-start/) of Hugo.
|
||||
|
||||
|
||||
|
||||
|
@ -96,9 +96,16 @@ You may need to delete the line: `themesDir = "../.."`
|
|||
|
||||
To enable comments, add following to your config file:
|
||||
|
||||
- DISQUS: `disqusShortname = YOURSHORTNAME`
|
||||
- COMMENTO:
|
||||
- DISQUS:
|
||||
|
||||
```toml
|
||||
[services.disqus]
|
||||
shortname = 'YOURSHORTNAME'
|
||||
```
|
||||
|
||||
- COMMENTO:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
commentoEnable = true
|
||||
```
|
||||
|
@ -334,6 +341,14 @@ Dates of blog posts and single pages are rendered with the default date format c
|
|||
With hugo 0.87.0 and above, you can also use predefined layout, like `:date_full`, and it will output localized dates or times.
|
||||
See hugo's documentation of the [`time.Format` function](https://gohugo.io/functions/dateformat/) for more details.
|
||||
|
||||
### Using a canonical url
|
||||
|
||||
When you want to publish content that is already published on a different site. You need to reference a canonical url of the original content.
|
||||
By defining the `canonicalUrl` in the front matter definition the canonical url is set in the headers.
|
||||
|
||||
```
|
||||
canonicalUrl: https://mydomain.com/path-to-the-oringinal-content/
|
||||
```
|
||||
|
||||
### Nearly finished
|
||||
|
||||
|
|
|
@ -18,3 +18,23 @@
|
|||
.nested-links a{
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.menu-btn {
|
||||
display: none;
|
||||
color: white;
|
||||
font-size: 2em;
|
||||
}
|
||||
.nav-links {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.nav-links {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
}
|
||||
.menu-btn {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
|
49
i18n/cs.toml
Normal file
49
i18n/cs.toml
Normal file
|
@ -0,0 +1,49 @@
|
|||
[more]
|
||||
other = "Více"
|
||||
|
||||
[allTitle]
|
||||
other = "Všechny {{.Title }}"
|
||||
|
||||
[recentTitle]
|
||||
other = "Nejnovější {{.Title }}"
|
||||
|
||||
[readMore]
|
||||
other = "čti dále"
|
||||
|
||||
[by]
|
||||
other = "Autor"
|
||||
|
||||
[whatsInThis]
|
||||
other = "Co je v tomto {{ .Type }}"
|
||||
|
||||
[related]
|
||||
other = "Related"
|
||||
|
||||
[yourName]
|
||||
other = "Jméno"
|
||||
|
||||
[emailAddress]
|
||||
other = "Emailová adresa"
|
||||
|
||||
[message]
|
||||
other = "Zpráva"
|
||||
|
||||
[emailRequiredNote]
|
||||
other = "Emailová adresa je požadována."
|
||||
|
||||
[send]
|
||||
other = "Odeslat"
|
||||
|
||||
[taxonomyPageList]
|
||||
other = "Stránky obsahující taxonomický termín “{{ .Title }}”"
|
||||
|
||||
[readingTime]
|
||||
one = "Jedna minuta čtení"
|
||||
other = "{{ .Count }} minut čtení"
|
||||
|
||||
[wordCount]
|
||||
one = "Jedno slovo"
|
||||
other = "{{ .Count }} slov"
|
||||
|
||||
[pageTitle]
|
||||
other = "{{ .Name }} stránka"
|
|
@ -26,13 +26,13 @@ other = "Ditt navn"
|
|||
other = "E-postadresse"
|
||||
|
||||
[message]
|
||||
other = "beskjed"
|
||||
other = "Beskjed"
|
||||
|
||||
[emailRequiredNote]
|
||||
other = "E-postadresse er påkrevd"
|
||||
|
||||
[send]
|
||||
other = "Sende"
|
||||
other = "Send"
|
||||
|
||||
[taxonomyPageList]
|
||||
other = "Below you will find pages that utilize the taxonomy term “{{ .Title }}”"
|
||||
|
|
|
@ -16,6 +16,15 @@
|
|||
{{ else }}
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
{{ end }}
|
||||
{{ with .Params.author | default .Site.Params.author }}
|
||||
<meta name="author" content = "
|
||||
{{- if reflect.IsSlice . -}}
|
||||
{{ delimit . ", " | plainify }}
|
||||
{{- else -}}
|
||||
{{ . | plainify }}
|
||||
{{- end -}}
|
||||
">
|
||||
{{ end }}
|
||||
|
||||
{{ partial "site-style.html" . }}
|
||||
{{ partial "site-scripts.html" . }}
|
||||
|
@ -31,6 +40,12 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.canonicalUrl }}
|
||||
<link rel="canonical" href="{{ .Params.canonicalUrl }}">
|
||||
{{ else }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
{{ $section := .Site.GetPage "section" .Section }}
|
||||
<article class="flex-l flex-wrap justify-between mw8 center ph3">
|
||||
<header class="mt4 w-100">
|
||||
<aside class="instapaper_ignoref b helvetica tracked">
|
||||
<aside class="instapaper_ignoref b helvetica tracked ttu">
|
||||
{{/*
|
||||
CurrentSection allows us to use the section title instead of inferring from the folder.
|
||||
https://gohugo.io/variables/page/#section-variables-and-methods
|
||||
*/}}
|
||||
{{with .CurrentSection.Title }}{{. | upper }}{{end}}
|
||||
{{ .CurrentSection.Title }}
|
||||
</aside>
|
||||
{{ partial "social-share.html" . }}
|
||||
<h1 class="f1 athelas mt3 mb1">
|
||||
|
@ -51,7 +51,7 @@
|
|||
{{- .Content -}}
|
||||
{{- partial "tags.html" . -}}
|
||||
<div class="mt6 instapaper_ignoref">
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ if .Site.Config.Services.Disqus.Shortname }}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.commentoEnable }}
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
<div class="nested-links f5 lh-copy nested-copy-line-height">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
<a href="{{.RelPermalink}}" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">{{ $.Param "read_more_copy" | default (i18n "readMore") }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,17 +4,18 @@
|
|||
</article>
|
||||
{{/* Define a section to pull recent posts from. For Hugo 0.20 this will default to the section with the most number of pages. */}}
|
||||
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
||||
{{/* Create a variable with that section to use in multiple places. */}}
|
||||
{{ $section := where .Site.RegularPages "Section" "in" $mainSections }}
|
||||
|
||||
{{/* Check to see if the section is defined for ranging through it */}}
|
||||
{{range ($mainSections)}}
|
||||
{{/* Derive the section name */}}
|
||||
{{ $section_name := . }}
|
||||
{{/* Create a variable with that section to use in multiple places. */}}
|
||||
{{ $section := where $.Site.RegularPages "Section" "in" $section_name }}
|
||||
{{ $section_count := len $section }}
|
||||
{{ if ge $section_count 1 }}
|
||||
{{/* Derive the section name */}}
|
||||
{{ $section_name := index (.Site.Params.mainSections) 0 }}
|
||||
|
||||
<div class="pa3 pa4-ns w-100 w-70-ns center">
|
||||
{{/* Use $section_name to get the section title. Use "with" to only show it if it exists */}}
|
||||
{{ with .Site.GetPage "section" $section_name }}
|
||||
{{ with $.Site.GetPage "section" $section_name }}
|
||||
<h1 class="flex-none">
|
||||
{{ $.Param "recent_copy" | default (i18n "recentTitle" .) }}
|
||||
</h1>
|
||||
|
@ -44,7 +45,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{/* As above, Use $section_name to get the section title, and URL. Use "with" to only show it if it exists */}}
|
||||
{{ with .Site.GetPage "section" $section_name }}
|
||||
{{ with $.Site.GetPage "section" $section_name }}
|
||||
<a href="{{ .RelPermalink }}" class="link db f6 pa2 br3 bg-mid-gray white dim w4 tc">{{ i18n "allTitle" . }}</a>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
@ -53,3 +54,5 @@
|
|||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{end}}
|
||||
|
||||
|
|
|
@ -10,15 +10,39 @@
|
|||
<div class="flex-l items-center">
|
||||
{{ partial "i18nlist.html" . }}
|
||||
{{ if .Site.Menus.main }}
|
||||
<ul class="{{ cond (eq $.Site.Language.LanguageDirection "rtl") "pr0 ml3" "pl0 mr3" }}">
|
||||
<nav>
|
||||
<div class="menu-btn">
|
||||
<div class="dib">☰ Menu</div>
|
||||
</div>
|
||||
<div class="nav-links">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="list f5 f4-ns fw4 dib {{ cond (eq $.Site.Language.LanguageDirection "rtl") "pl3" "pr3" }}">
|
||||
<a class="hover-white no-underline white-90" href="{{ .URL }}" title="{{ i18n "pageTitle" . }}">
|
||||
<a class="link hover-white white-90 no-underline f5 f4-ns {{ cond (eq $.Site.Language.LanguageDirection "rtl") "pl3" "pr3" }} " href="{{ .URL }}" title="{{ i18n "pageTitle" . }}">
|
||||
{{ .Name }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<script>
|
||||
var navLinks = document.querySelector('.nav-links');
|
||||
document.querySelector('.menu-btn').addEventListener('click', function() {
|
||||
if (navLinks.style.display === 'none') {
|
||||
navLinks.style.display = 'flex';
|
||||
} else {
|
||||
navLinks.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
// Adjust menu when window is resized
|
||||
window.addEventListener('resize', function() {
|
||||
if (window.innerWidth > 600) {
|
||||
navLinks.style.display = 'flex';
|
||||
} else {
|
||||
navLinks.style.display = 'none';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
{{ partialCached "social-follow.html" . }}
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{ $url := printf "%s" .Permalink | absLangURL }}
|
||||
|
||||
{{ $facebook_href := printf "https://www.facebook.com/sharer.php?u=%s" $url }}
|
||||
{{ $twitter_href := printf "https://twitter.com/share?url=%s&text=%s" $url $title }}
|
||||
{{ $twitter_href := printf "https://twitter.com/intent/tweet?url=%s&text=%s" $url $title }}
|
||||
{{ with site.Social.twitter }}
|
||||
{{ $twitter_href = printf "%s&via=%s" $twitter_href . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -12,4 +12,5 @@
|
|||
<div class="nested-links f5 lh-copy nested-copy-line-height">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
<a href="{{.RelPermalink}}" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">{{ $.Param "read_more_copy" | default (i18n "readMore") }}</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue