Skip to content

Commit 6db7997

Browse files
committed
Document Page.Markup
1 parent e94e49d commit 6db7997

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: hugo.Context
3+
description: # TODO
4+
categories: []
5+
keywords: []
6+
params:
7+
functions_and_methods:
8+
aliases: []
9+
returnType: string
10+
signatures: [hugo.Context]
11+
---
12+
13+
<!-- TODO -->
14+
<!-- https://github.com/gohugoio/hugo/pull/12759 -->
15+
16+
## Contexts
17+
18+
<!-- TODO -->
19+
20+
MarkupScope
21+
: Something <!-- TODO -->
22+
23+
```go-html-template
24+
{{ hugo.Context.MarkupScope }} → xxxxxx
25+
```

content/en/methods/page/Markup.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Markup
3+
description: # TODO
4+
categories: []
5+
keywords: []
6+
params:
7+
functions_and_methods:
8+
returnType: # TODO
9+
signatures: [PAGE.Markup]
10+
---
11+
12+
<!-- TODO -->
13+
<!-- https://github.com/gohugoio/hugo/pull/12759 -->
14+
15+
<!-- JMM It is unclear to me if things like .Page.WordCount will be deprecated in favor of .Page.Markup.CountWords. Three levels (Page, Markup, Countwords) is a bit of a pain to document with the current docs theme. Several of the Markup methods required their own page.
16+
17+
So maybe make Markup a first-level method, noting that it's a method on Page. Then each method on Markup will have its own page.
18+
-->
19+
20+
## Methods
21+
22+
CountWords
23+
: (`int`) <!-- TODO -->
24+
25+
CountWordsFuzzy
26+
: (`int`) <!-- TODO -->
27+
28+
Fragments
29+
: (`tableofcontents.Fragments`) <!-- TODO -->
30+
31+
FragmentsHTML
32+
: (`template.HTML`) <!-- TODO -->
33+
34+
HasShortcode
35+
: (`bool`) <!-- TODO -->
36+
37+
Len
38+
: (`int`) <!-- TODO -->
39+
40+
Plain
41+
: (`string`) <!-- TODO -->
42+
43+
PlainWords
44+
: (`string array`) <!-- TODO -->
45+
46+
ReadingTime
47+
: (`int`) <!-- TODO -->
48+
49+
Render
50+
: (`any`) <!-- TODO -->
51+
52+
RenderShortcodes
53+
: (`template.HTM`) <!-- TODO -->
54+
55+
RenderString
56+
: (`template.HTM`) <!-- TODO -->
57+
58+
Summary
59+
: (`template.HTML`) <!-- TODO -->
60+
61+
## Example
62+
63+
<!-- TODO -->
64+
65+
```go-html-template
66+
{{ range .Pages }}
67+
{{ with .Markup }}
68+
{{ .Countwords }}
69+
{{ .Render }}
70+
{{ end }}
71+
{{ end }}
72+
```

0 commit comments

Comments
 (0)