File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed
layouts/_partials/docs/links Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -136,8 +136,9 @@ enableGitInfo = true
136136 # /!\ This is an experimental feature, might be removed or changed at any time
137137 # (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
138138 # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
139- # Theme will print warning if page referenced in markdown does not exists.
140- BookPortableLinks = true
139+ # Theme will print warning or error if page referenced in markdown does not exists.
140+ # Possible values are false | 'warning' | 'error'
141+ BookPortableLinks = ' warning'
141142
142143 # /!\ This is an experimental feature, might be removed or changed at any time
143144 # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
Original file line number Diff line number Diff line change @@ -120,8 +120,9 @@ params:
120120 # /!\ This is an experimental feature, might be removed or changed at any time
121121 # (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
122122 # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
123- # Theme will print warning if page referenced in markdown does not exists.
124- BookPortableLinks : true
123+ # Theme will print warning or error if page referenced in markdown does not exists.
124+ # Possible values are false | 'warning' | 'error'
125+ BookPortableLinks : ' warning'
125126
126127 # /!\ This is an experimental feature, might be removed or changed at any time
127128 # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
Original file line number Diff line number Diff line change 1313 {{- else with (resources.Get $path) -}}
1414 {{- $destination = .RelPermalink -}}
1515 {{- else -}}
16- {{- warnf "Image reference '%s' not found in '%s'" .Destination .Page.Permalink -}}
16+ {{- $mode := .Page.Site.Params.BookPortableLinks -}}
17+ {{- $message := printf "Image reference '%s' not found in '%s'" .Destination .Page.RelPermalink -}}
18+ {{- if eq $mode "warning" -}}
19+ {{- warnf $message -}}
20+ {{- else if eq $mode "error" -}}
21+ {{- errorf $message -}}
22+ {{- end -}}
1723 {{- end -}}
1824
1925 {{- with $url.RawQuery -}}
Original file line number Diff line number Diff line change 1616 {{- else with (resources.Get $path) -}}
1717 {{- $destination = .RelPermalink -}}
1818 {{- else -}}
19- {{- warnf "Reference '%s' not found in '%s'" .Destination .Page.RelPermalink -}}
19+ {{- $mode := .Page.Site.Params.BookPortableLinks -}}
20+ {{- $message := printf "Image reference '%s' not found in '%s'" .Destination .Page.RelPermalink -}}
21+ {{- if eq $mode "warning" -}}
22+ {{- warnf $message -}}
23+ {{- else if eq $mode "error" -}}
24+ {{- errorf $message -}}
25+ {{- end -}}
2026 {{- end -}}
2127
2228 {{- with $url.RawQuery -}}
You can’t perform that action at this time.
0 commit comments