Externe Umleitung in Hugo

As a blogger today, I wanted to redirect URLs that point to a subdirectory to an external destination. In the blog post ‘Using Hugo as a redirect service’ by Daniel Terhorst-North I came across a very lean solution. To achieve this, the following file must be created in the theme folder: /layouts/redirect/single.html. The following source code must be added to the file: {{- template "_internal/alias.html" (dict "Permalink" .Params.target) -}} You can now create a file and define the redirect with the following four lines. The filename also determines the directory of the source URL: ...

December 17, 2023 · 1 min · 117 words

CSS Shadows

Writing shadows in CSS by hand is possible, but it’s a pain. There have been various tools for years to visually create nice-looking shadows. Another tool is from Philipp Brumm. Smooth Shadow For anyone who doesn’t know what I mean, a simple shadow in CSS can look like this: box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.02), 0 6.7px 5.3px rgba(0, 0, 0, 0.028), The text was automatically translated from German into English. The German quotations were also translated in sense. ...

January 17, 2020 · 1 min · 81 words