Skip to content

Commit 746e2e7

Browse files
committed
docs: simplify relref migration and fix it for fragments
1 parent 27d11a1 commit 746e2e7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

exampleSite/content/basics/migration/_index.en.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,7 @@ This document shows you what's new in the latest release. For a detailed list of
457457

458458
In this case, you must apply one of two options:
459459

460-
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**.
461-
462-
| Type | Search | Replace by |
463-
| ------------- | ---------------------------- | ---------- |
464-
| Branch bundle | `(ref\s+"[^"]*)/_index\.md"` | `$1"` |
465-
| Leaf bundle | `(ref\s+"[^"]*)/index\.md"` | `$1"` |
466-
| Page | `(ref\s+"[^"]*)\.md"` | `$1"` |
460+
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**.
467461

468462
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.
469463

0 commit comments

Comments
 (0)