-
-
Notifications
You must be signed in to change notification settings - Fork 79k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: backport layouts updates from the main branch
- Loading branch information
Showing
9 changed files
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{{- relref . ((printf "docs/%s%s" $.Site.Params.docs_version (.Get 0)) | relURL) -}} | ||
{{- relref . ((path.Join "docs" $.Site.Params.docs_version (.Get 0)) | relURL) -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
{{- /* | ||
Usage: `example [args]` | ||
Usage: `example args` | ||
|
||
`args` are optional and can be one of the following: | ||
id: the `div`'s id - default: "" | ||
class: any extra class(es) to be added to the `div` - default "" | ||
show_preview: if the preview should be output in the HTML - default: `true` | ||
show_markup: if the markup should be output in the HTML - default: `true` | ||
`args` are all optional and can be one of the following: | ||
* id: the `div`'s id - default: "" | ||
* class: any extra class(es) to be added to the `div` - default: "" | ||
* show_preview: if the preview should be output in the HTML - default: `true` | ||
* show_markup: if the markup should be output in the HTML - default: `true` | ||
*/ -}} | ||
|
||
{{- $id := .Get "id" -}} | ||
{{- $class := .Get "class" -}} | ||
{{- $lang := .Get "lang" | default "html" -}} | ||
{{- $show_preview := .Get "show_preview" | default true -}} | ||
{{- $show_markup := .Get "show_markup" | default true -}} | ||
{{- $input := .Inner -}} | ||
|
||
{{- if eq $show_preview true -}} | ||
<div{{ with .Get "id" }} id="{{ . }}"{{ end }} class="bd-example{{ with .Get "class" }} {{ . }}{{ end }}"> | ||
<div{{ with $id }} id="{{ . }}"{{ end }} class="bd-example{{ with $class }} {{ . }}{{ end }}"> | ||
{{- $input -}} | ||
</div> | ||
{{- end -}} | ||
|
||
{{- if eq $show_markup true -}} | ||
{{- $content := replaceRE `<svg class="bd\-placeholder\-img(?:\-lg)?(?: *?bd\-placeholder\-img\-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}} | ||
{{- $content := replaceRE `<svg class="bd-placeholder-img(?:-lg)?(?: *?bd-placeholder-img-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}} | ||
{{- $content = replaceRE ` (class=" *?")` "" $content -}} | ||
{{- highlight (trim $content "\n") $lang "" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{{- /* | ||
Output the current year | ||
*/ -}} | ||
{{- /* Outputs the current year */ -}} | ||
|
||
{{- now.Format "2006" -}} |