mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
docs: simplify relref migration and fix it for fragments
This commit is contained in:
parent
27d11a1c72
commit
746e2e7d91
1 changed files with 1 additions and 7 deletions
|
@ -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:
|
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**.
|
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**.
|
||||||
|
|
||||||
| Type | Search | Replace by |
|
|
||||||
| ------------- | ---------------------------- | ---------- |
|
|
||||||
| Branch bundle | `(ref\s+"[^"]*)/_index\.md"` | `$1"` |
|
|
||||||
| Leaf bundle | `(ref\s+"[^"]*)/index\.md"` | `$1"` |
|
|
||||||
| Page | `(ref\s+"[^"]*)\.md"` | `$1"` |
|
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue