Aliases and _index files (v0.73 change)

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

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

That’s great! Thanks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.