Skip to content

Commit 4a2141d

Browse files
Update docs of Codeblock
1 parent ec1ae47 commit 4a2141d

3 files changed

Lines changed: 41 additions & 7 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "8.26.0",
44
"private": true,
55
"hexo": {
6-
"version": "7.3.0"
6+
"version": "8.1.1"
77
},
88
"description": "Elegant and powerful theme for Hexo.",
99
"scripts": {
@@ -40,4 +40,4 @@
4040
"devDependencies": {
4141
"markdownlint-cli": "0.45.0"
4242
}
43-
}
43+
}

source/docs/theme-settings/miscellaneous.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,14 @@ If Dark Mode is enabled, dark code highlighting themes will be available.
9898
<!-- tab <code>copy_button</code> -->
9999
NexT supports the copy-and-paste functionality of codeblock.
100100

101-
{% subtabs codeblock1 %}
102-
<!-- tab <code>enable</code> -->
103101
You can enable it by setting value `copy_button.enable` to `true` in {% label primary@NexT config file %}. By default NexT shows copy result of the copy-and-paste functionality.
104102

105103
```yml NexT config file
106104
codeblock:
107105
copy_button:
108106
enable: true
109107
```
110-
<!-- endtab -->
111-
<!-- tab <code>style</code> -->
108+
112109
With `style` option, you can change your copy button style.
113110
There are three style available currently: `default` (Just leave it empty), `flat` and `mac`.
114111

@@ -117,8 +114,43 @@ codeblock:
117114
copy_button:
118115
style: flat
119116
```
117+
120118
<!-- endtab -->
121-
{% endsubtabs %}
119+
120+
<!-- tab <code>fold</code> -->
121+
NexT supports the fold functionality of codeblock.
122+
123+
You can enable it by setting value `fold.enable` to `true` in {% label primary@NexT config file %}.
124+
125+
```yml NexT config file
126+
codeblock:
127+
# Fold code block
128+
fold:
129+
enable: true
130+
height: 500
131+
```
132+
133+
With `height` option, you can change the height (in px) of the code block.
134+
135+
```yml NexT config file
136+
codeblock:
137+
fold:
138+
enable: true
139+
height: 300
140+
```
141+
142+
<!-- endtab -->
143+
144+
<!-- tab <code>language</code> -->
145+
NexT supports the language functionality of codeblock.
146+
147+
You can enable it by setting value `language` to `true` in {% label primary@NexT config file %}.
148+
149+
```yml NexT config file
150+
codeblock:
151+
# Display language name
152+
language: true
153+
```
122154

123155
<!-- endtab -->
124156

source/docs/third-party-services/statistics-and-analytics.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ NexT will not send record to analytics service provider as long as the page's ho
1919
google_analytics:
2020
tracking_id: UA-XXXXXXXX-X
2121
only_pageview: false
22+
# only needed if you are using `only_pageview` mode, https://developers.google.com/analytics/devguides/collection/protocol/ga4
23+
measure_protocol_api_secret:
2224
```
2325
2426
3. When field `only_pageview` is set to true, NexT will only send `pageview` event to Google Analytics.

0 commit comments

Comments
 (0)