Skip to content

Commit 5376885

Browse files
committed
docs: Add new util get-abs-url
1 parent 369d4b3 commit 5376885

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

hugo-modules/core/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[Hugo](https://gohugo.io/) templates and utilities that support [Contentful](https://www.contentful.com/) and/or [Storybook](https://storybook.js.org/) projects.
44

5-
- [wekit-core](#wekit-core)
5+
- [WEKit core](#wekit-core)
66
- [Utils](#utils)
77
- [asset](#asset)
88
- [svg/icon](#svgicon)
@@ -11,6 +11,7 @@
1111
- [console/error](#consoleerror)
1212
- [console/warn](#consolewarn)
1313
- [dump](#dump)
14+
- [get-abs-url](#get-abs-url)
1415
- [get-category-name](#get-category-name)
1516
- [get-data](#get-data)
1617
- [get-page](#get-page)
@@ -28,14 +29,15 @@
2829
- [Layouts](#layouts)
2930
- [storybook](#storybook)
3031
- [robots.txt](#robotstxt)
32+
- [Contributors](#contributors)
3133
- [Credits](#credits)
3234

3335
## Utils
3436

3537
### asset
3638

3739
Render Contentful asset. Uses data from [cssg-plugin-assets](https://github.com/jungvonmatt/contentful-ssg/tree/main/packages/cssg-plugin-assets) if available.
38-
Uses `svg/icon` when the inline options is set and we got an svg,
40+
Uses `svg/icon` when the inline options is set and we got an svg,
3941
*Template*
4042

4143
```
@@ -119,6 +121,16 @@ Dump variable as highlighted yaml.
119121
{{ partial "utils/dump" .context }}
120122
```
121123

124+
### get-abs-url
125+
126+
Returns an absolute URL with forced https prototol.
127+
128+
*Template*
129+
130+
```
131+
{{ partial "utils/get-abs-url" .url }}
132+
```
133+
122134
### get-category-name
123135

124136
Get category name by prefix of `content_type`.

0 commit comments

Comments
 (0)