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

Ghost Bookmarklet

After switching from Grav to Ghost I have to tweak a few articles. To be able to quickly jump from the frontend to the backend, I wrote a super-simple bookmarklet. Just save the following code as a bookmark. javascript:window.location.href=window.location.href+'/edit'; After you click the bookmark, the browser will navigate to http://DEINEBLOG.URL/edit and, if you’re logged in, you can edit the article directly. The text was automatically translated from German into English. The German quotations were also translated in sense. ...

December 23, 2021 · 1 min · 78 words

Images are not displayed in WordPress

I recently had the problem that when I wrote a post from the iPhone or from Windows Live Writer, the image code was broken. I had written the following HTML code: <img src=”http://example.com/wp-content/uploads/2009/05/test.jpg” border=”0″ alt=”DSA00005.JPG” width=”431″ height=”284″ /> But the blog received the following: img src=”http://example.com/wp-content/uploads/2009/05/test.jpg” border=”0″ alt=”DSA00005.JPG” width=”431″ height=”284″ / So all < and > were removed. I searched through several German WordPress forums, but in the end I found the solution in the official English WordPress forum. ...

May 8, 2009 · 1 min · 161 words