From 746e2e7d91751c95dcea801eaa7f2a2f8fa68d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Thu, 8 Jun 2023 10:57:00 +0200 Subject: [PATCH] docs: simplify relref migration and fix it for fragments --- exampleSite/content/basics/migration/_index.en.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index eb15554208..abcbf0a4a9 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -457,13 +457,7 @@ This document shows you what's new in the latest release. For a detailed list of In this case, you must apply one of two options: - 1. Start up a text editor with regular expression support for search and replace. Apply the following conversions in the given order on all `*.md` files. **This is the recommended choice**. - - | Type | Search | Replace by | - | ------------- | ---------------------------- | ---------- | - | Branch bundle | `(ref\s+"[^"]*)/_index\.md"` | `$1"` | - | Leaf bundle | `(ref\s+"[^"]*)/index\.md"` | `$1"` | - | Page | `(ref\s+"[^"]*)\.md"` | `$1"` | + 1. Start up a text editor with regular expression support for search and replace. Search for `(ref\s+"[^"]*?)(?:/_index|/index)?(?:\.md)?(#[^"]*?)?"` and replace it by `$1$2"` in all `*.md` files. **This is the recommended choice**. 2. Copy the old implementation files `theme/hugo-theme-relearn/layouts/shortcode/ref.html` and `theme/hugo-theme-relearn/layouts/shortcode/relref.html` to your own projects `layouts/shortcode/ref.html` and `layouts/shortcode/relref.html` respectively. **This is not recommended** as your project will still rely on non-standard behavior afterwards.