spc
August 6, 2020, 9:12pm
1
With version 0.73.0, alias no longer work for _index.md files. They still work for every other type of markdown file (including index.md files).
I’ve checked the documentation and the release notes. This version fixed aliases with a path in the baseURL, so I presume this change was intended, but I can’t obviously see anything to reflect a new way to redirect to list pages where there is an _index.md file.
Could someone point me in the right direction, please.
Many thanks
ju52
August 7, 2020, 2:34pm
2
I tryed it - it works!
… don’t worry about Geman texts
/post/_index.md
+++
title = "Beiträge"
description = "Hier finden Sie alle meine Beiträge"
aliases = [ "/blog/" ]
+++
it generates /public/blog/index.html with this content
<!doctype html>
<html lang=de>
<head>
<title>Page Redirection</title>
<link rel=canonical href=http://localhost:1313/post />
<meta name=robots content="noindex">
<meta charset=utf-8>
<meta http-equiv=refresh content="0; url=http://localhost:1313/post/">
<script>window.location.href = "http:\/\/localhost:1313\/post\/";</script>
</head>
<body>
Die aktuelle Webseite finden Sie <a href=http://localhost:1313/post />hier</a>!
</body>
</html>
I use layouts/alias.html for rendering - if you do, check it for errors!
my template:
<!DOCTYPE html>
<html {{ with site.Language.Lang }}lang="{{ . }}"{{ end }} >
<head>
<title>Page Redirection</title>
<link rel="canonical" href="{{ .Permalink }}"/>
<meta name="robots" content="noindex">
<meta charset="utf-8" />
<meta http-equiv="refresh" content="0; url={{ .Permalink }}" />
<script type="text/javascript">window.location.href = "{{ .Permalink }}";</script>
</head>
<body>
Die aktuelle Webseite finden Sie <a href="{{ .Permalink }}">hier</a>!
</body>
</html>
use the --debug --verboseLog and check this for warnings / errors
system
Closed
August 9, 2020, 5:49pm
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.