Compare commits

..

11 commits

Author SHA1 Message Date
Ramiro Morales 33fbda0e9d
Fix render breakage introduced in #665 (#685)
A bare bones setup of two pages and two posts gets broken because of a
template change missed in #665

Fatal error message in readable form:
```
ERROR render:
failed to render pages:
render of "home" failed: "/themes/ananke/layouts/index.html:48:23":
execute of template failed:
template:
index.html:48:23:
executing "main" at <.Site.GetPage>: can't evaluate field Site in type string
```

Steps to reproduce:

```shell
hugo new site quickstart
cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo "theme = 'ananke'" >> hugo.toml
echo -e "+++\ntitle='Home'\n+++\n\nMain page" > content/_index.md
echo Foo. > content/page1.md
echo Bar > content/page2.md
mkdir -p content/post
echo "First post." > content/post/post1.md
echo "Second post." > content/post/post2.md
hugo server
Watching for changes in .../quickstart/{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in .../quickstart/hugo.toml, ...quickstart/themes/ananke/config.yaml
Start building sites …
hugo v0.125.3-474c4c02212cf97712c6fbf4159c68822ea6e078+extended darwin/amd64 BuildDate=2024-04-22T17:18:35Z VendorInfo=brew

Built in 67 ms
Error: error building site: render: failed to render pages: render of "home" failed: ".../quickstart/themes/ananke/layouts/index.html:48:23": execute of template failed: template: index.html:48:23: executing "main" at <.Site.GetPage>: can't evaluate field Site in type string
```
2024-05-03 13:43:35 -04:00
Blackeye f34c219436
Contribution: fix hard-coded link to section #664 (#665)
* allow_multiple_mainsection

* removed comment

---------

Co-authored-by: Blackeye <>
2024-04-18 11:26:30 -04:00
Johannes Arnold 0d068637cc
Include authors meta tag (#634) 2024-04-18 11:23:24 -04:00
Joe Mooring 91df000ca8
Access Disqus shortname from canonical location (#660) 2023-11-22 11:05:23 -05:00
mathew bd759431a9
Add missing "read more" link to summary.html (#658)
* Add missing "read more" link to summary.html

* Fix layouts/post/summary to add read more link
2023-11-21 15:08:47 -05:00
mathew 64dc2b6dea
Fix capitalization of single header for a11y (#657)
Thank you!
2023-11-21 15:06:16 -05:00
Joris Conijn 221a0d8817
feat: add canonical url support (#650)
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.
2023-11-21 14:41:58 -05:00
stigh 4ea29d886c
fix: in Norwegian translation use imperative form 'Send', consistent capitalization of 'Beskjed' (#639) 2023-11-21 14:36:10 -05:00
Petr Vála 9276a90cfa
localization: Create Czech (cs) localization (#626) 2023-11-21 14:30:49 -05:00
Melroy van den Berg 9808cf6cf0
Update setup guide link (#618) 2023-11-21 14:25:45 -05:00
Melroy van den Berg c086834f0e
Change to /intent/tweet (#652)
Change from /share to /intent/tweet.
2023-09-19 11:47:32 -04:00
2 changed files with 7 additions and 51 deletions

View file

@ -18,23 +18,3 @@
.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;
}
}

View file

@ -10,39 +10,15 @@
<div class="flex-l items-center">
{{ partial "i18nlist.html" . }}
{{ if .Site.Menus.main }}
<nav>
<div class="menu-btn">
<div class="dib">☰ Menu</div>
</div>
<div class="nav-links">
<ul class="{{ cond (eq $.Site.Language.LanguageDirection "rtl") "pr0 ml3" "pl0 mr3" }}">
{{ range .Site.Menus.main }}
<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" . }}">
<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" . }}">
{{ .Name }}
</a>
</li>
{{ end }}
</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>
</ul>
{{ end }}
{{ partialCached "social-follow.html" . }}
</div>