Skip to content

Commit d1d82c5

Browse files
committed
update style page with information on when to use which references in the tabs
1 parent 1cf8a10 commit d1d82c5

File tree

4 files changed

+40
-48
lines changed

4 files changed

+40
-48
lines changed

website_and_docs/content/documentation/about/style.en.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ The Docsy code tabs look like this:
105105
To generate the above tabs, this is what you need to write.
106106
Note that the `tabpane` includes `langEqualsHeader=true`.
107107
This auto-formats the code in each tab to match the header name,
108-
but more importantly it ensures that all tabs on the page with a language
109-
are set to the same thing, so we always want to include it.
108+
and ensures that all tabs on the page with a language are set to the same thing.
110109

111110
{{</* tabpane langEqualsHeader=true */>}}
112111
{{</* tab header="Java" */>}}
@@ -129,7 +128,7 @@ are set to the same thing, so we always want to include it.
129128
{{</* /tab */>}}
130129
{{</* /tabpane */>}}
131130

132-
#### Reference Github Examples
131+
#### Reference GitHub Examples
133132

134133
To ensure that all code is kept up to date, our goal is to write the code in the repo where it
135134
can be executed when Selenium versions are updated to ensure that everything is correct.
@@ -138,19 +137,18 @@ All code examples to be in our
138137
[example directories](https://github.com/SeleniumHQ/seleniumhq.github.io/tree/dev/examples).
139138

140139
This code can be automatically displayed in the documentation using the `gh-codeblock` shortcode.
141-
The shortcode automatically generates its own html, so if any tab is using this shortcode,
142-
set `text=true` in the `tabpane`/`tab` to prevent the auto-formatting, and add `code=true` in any
143-
`tab` that still needs to get formatted with code.
144-
Either way, set `langEqualsHeader=true` to keep the language tabs synchronized throughout the page.
145-
Note that the `gh-codeblock` line can not be indented at all.
140+
The shortcode automatically generates its own html, so we do not want it to auto-format with the language header.
141+
If all tabs are using this shortcode, set `text=true` in the `tabpane` and remove `langEqualsHeader=true`.
142+
If only some tabs are using this shortcode, keep `langEqualsHeader=true` in the `tabpane` and add `text=true`
143+
to the `tab`. Note that the `gh-codeblock` line can not be indented at all.
146144

147145
One great thing about using `gh-codeblock` is that it adds a link to the full example.
148146
This means you don't have to include any additional context code, just the line(s) that
149147
are needed, and the user can navigate to the repo to see how to use it.
150148

151149
A basic comparison of code looks like:
152150

153-
{{</* tabpane text=true langEqualsHeader=true */>}}
151+
{{</* tabpane text=true */>}}
154152
{{</* tab header="Java" */>}}
155153
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" */>}}
156154
{{</* /tab */>}}
@@ -173,7 +171,7 @@ A basic comparison of code looks like:
173171

174172
Which looks like this:
175173

176-
{{< tabpane text=true langEqualsHeader=true >}}
174+
{{< tabpane text=true >}}
177175
{{< tab header="Java" >}}
178176
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" >}}
179177
{{< /tab >}}
@@ -200,7 +198,7 @@ If you want your example to include something other than code (default) or html
200198
you need to first set `text=true`,
201199
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:
202200

203-
{{</* tabpane text=true langEqualsHeader=true */>}}
201+
{{</* tabpane text=true */>}}
204202
{{%/* tab header="Java" */%}}
205203
1. Start the driver
206204
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" */>}}
@@ -214,7 +212,7 @@ then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with
214212

215213
This produces:
216214

217-
{{< tabpane text=true langEqualsHeader=true >}}
215+
{{< tabpane text=true >}}
218216
{{% tab header="Java" %}}
219217
1. Start the driver
220218
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}

website_and_docs/content/documentation/about/style.ja.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ The Docsy code tabs look like this:
104104
To generate the above tabs, this is what you need to write.
105105
Note that the `tabpane` includes `langEqualsHeader=true`.
106106
This auto-formats the code in each tab to match the header name,
107-
but more importantly it ensures that all tabs on the page with a language
108-
are set to the same thing, so we always want to include it.
107+
and ensures that all tabs on the page with a language are set to the same thing.
109108

110109
{{</* tabpane langEqualsHeader=true */>}}
111110
{{</* tab header="Java" */>}}
@@ -128,7 +127,7 @@ are set to the same thing, so we always want to include it.
128127
{{</* /tab */>}}
129128
{{</* /tabpane */>}}
130129

131-
#### Reference Github Examples
130+
#### Reference Gitub Examples
132131

133132
To ensure that all code is kept up to date, our goal is to write the code in the repo where it
134133
can be executed when Selenium versions are updated to ensure that everything is correct.
@@ -137,19 +136,18 @@ All code examples to be in our
137136
[example directories](https://github.com/SeleniumHQ/seleniumhq.github.io/tree/dev/examples).
138137

139138
This code can be automatically displayed in the documentation using the `gh-codeblock` shortcode.
140-
The shortcode automatically generates its own html, so if any tab is using this shortcode,
141-
set `text=true` in the `tabpane`/`tab` to prevent the auto-formatting, and add `code=true` in any
142-
`tab` that still needs to get formatted with code.
143-
Either way, set `langEqualsHeader=true` to keep the language tabs synchronized throughout the page.
144-
Note that the `gh-codeblock` line can not be indented at all.
139+
The shortcode automatically generates its own html, so we do not want it to auto-format with the language header.
140+
If all tabs are using this shortcode, set `text=true` in the `tabpane` and remove `langEqualsHeader=true`.
141+
If only some tabs are using this shortcode, keep `langEqualsHeader=true` in the `tabpane` and add `text=true`
142+
to the `tab`. Note that the `gh-codeblock` line can not be indented at all.
145143

146144
One great thing about using `gh-codeblock` is that it adds a link to the full example.
147145
This means you don't have to include any additional context code, just the line(s) that
148146
are needed, and the user can navigate to the repo to see how to use it.
149147

150148
A basic comparison of code looks like:
151149

152-
{{</* tabpane text=true langEqualsHeader=true */>}}
150+
{{</* tabpane text=true */>}}
153151
{{</* tab header="Java" */>}}
154152
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" */>}}
155153
{{</* /tab */>}}
@@ -172,7 +170,7 @@ A basic comparison of code looks like:
172170

173171
Which looks like this:
174172

175-
{{< tabpane text=true langEqualsHeader=true >}}
173+
{{< tabpane text=true >}}
176174
{{< tab header="Java" >}}
177175
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" >}}
178176
{{< /tab >}}
@@ -199,7 +197,7 @@ If you want your example to include something other than code (default) or html
199197
you need to first set `text=true`,
200198
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:
201199

202-
{{</* tabpane text=true langEqualsHeader=true */>}}
200+
{{</* tabpane text=true */>}}
203201
{{%/* tab header="Java" */%}}
204202
1. Start the driver
205203
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" */>}}
@@ -213,7 +211,7 @@ then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with
213211

214212
This produces:
215213

216-
{{< tabpane text=true langEqualsHeader=true >}}
214+
{{< tabpane text=true >}}
217215
{{% tab header="Java" %}}
218216
1. Start the driver
219217
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}

website_and_docs/content/documentation/about/style.pt-br.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ The Docsy code tabs look like this:
104104
To generate the above tabs, this is what you need to write.
105105
Note that the `tabpane` includes `langEqualsHeader=true`.
106106
This auto-formats the code in each tab to match the header name,
107-
but more importantly it ensures that all tabs on the page with a language
108-
are set to the same thing, so we always want to include it.
107+
and ensures that all tabs on the page with a language are set to the same thing.
109108

110109
{{</* tabpane langEqualsHeader=true */>}}
111110
{{</* tab header="Java" */>}}
@@ -128,7 +127,7 @@ are set to the same thing, so we always want to include it.
128127
{{</* /tab */>}}
129128
{{</* /tabpane */>}}
130129

131-
#### Reference Github Examples
130+
#### Reference GitHub Examples
132131

133132
To ensure that all code is kept up to date, our goal is to write the code in the repo where it
134133
can be executed when Selenium versions are updated to ensure that everything is correct.
@@ -137,19 +136,18 @@ All code examples to be in our
137136
[example directories](https://github.com/SeleniumHQ/seleniumhq.github.io/tree/dev/examples).
138137

139138
This code can be automatically displayed in the documentation using the `gh-codeblock` shortcode.
140-
The shortcode automatically generates its own html, so if any tab is using this shortcode,
141-
set `text=true` in the `tabpane`/`tab` to prevent the auto-formatting, and add `code=true` in any
142-
`tab` that still needs to get formatted with code.
143-
Either way, set `langEqualsHeader=true` to keep the language tabs synchronized throughout the page.
144-
Note that the `gh-codeblock` line can not be indented at all.
139+
The shortcode automatically generates its own html, so we do not want it to auto-format with the language header.
140+
If all tabs are using this shortcode, set `text=true` in the `tabpane` and remove `langEqualsHeader=true`.
141+
If only some tabs are using this shortcode, keep `langEqualsHeader=true` in the `tabpane` and add `text=true`
142+
to the `tab`. Note that the `gh-codeblock` line can not be indented at all.
145143

146144
One great thing about using `gh-codeblock` is that it adds a link to the full example.
147145
This means you don't have to include any additional context code, just the line(s) that
148146
are needed, and the user can navigate to the repo to see how to use it.
149147

150148
A basic comparison of code looks like:
151149

152-
{{</* tabpane text=true langEqualsHeader=true */>}}
150+
{{</* tabpane text=true */>}}
153151
{{</* tab header="Java" */>}}
154152
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" */>}}
155153
{{</* /tab */>}}
@@ -172,7 +170,7 @@ A basic comparison of code looks like:
172170

173171
Which looks like this:
174172

175-
{{< tabpane text=true langEqualsHeader=true >}}
173+
{{< tabpane text=true >}}
176174
{{< tab header="Java" >}}
177175
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" >}}
178176
{{< /tab >}}
@@ -199,7 +197,7 @@ If you want your example to include something other than code (default) or html
199197
you need to first set `text=true`,
200198
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:
201199

202-
{{</* tabpane text=true langEqualsHeader=true */>}}
200+
{{</* tabpane text=true */>}}
203201
{{%/* tab header="Java" */%}}
204202
1. Start the driver
205203
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" */>}}
@@ -213,7 +211,7 @@ then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with
213211

214212
This produces:
215213

216-
{{< tabpane text=true langEqualsHeader=true >}}
214+
{{< tabpane text=true >}}
217215
{{% tab header="Java" %}}
218216
1. Start the driver
219217
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}

website_and_docs/content/documentation/about/style.zh-cn.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ The Docsy code tabs look like this:
104104
To generate the above tabs, this is what you need to write.
105105
Note that the `tabpane` includes `langEqualsHeader=true`.
106106
This auto-formats the code in each tab to match the header name,
107-
but more importantly it ensures that all tabs on the page with a language
108-
are set to the same thing, so we always want to include it.
107+
and ensures that all tabs on the page with a language are set to the same thing.
109108

110109
{{</* tabpane langEqualsHeader=true */>}}
111110
{{</* tab header="Java" */>}}
@@ -128,7 +127,7 @@ are set to the same thing, so we always want to include it.
128127
{{</* /tab */>}}
129128
{{</* /tabpane */>}}
130129

131-
#### Reference Github Examples
130+
#### Reference GitHub Examples
132131

133132
To ensure that all code is kept up to date, our goal is to write the code in the repo where it
134133
can be executed when Selenium versions are updated to ensure that everything is correct.
@@ -137,19 +136,18 @@ All code examples to be in our
137136
[example directories](https://github.com/SeleniumHQ/seleniumhq.github.io/tree/dev/examples).
138137

139138
This code can be automatically displayed in the documentation using the `gh-codeblock` shortcode.
140-
The shortcode automatically generates its own html, so if any tab is using this shortcode,
141-
set `text=true` in the `tabpane`/`tab` to prevent the auto-formatting, and add `code=true` in any
142-
`tab` that still needs to get formatted with code.
143-
Either way, set `langEqualsHeader=true` to keep the language tabs synchronized throughout the page.
144-
Note that the `gh-codeblock` line can not be indented at all.
139+
The shortcode automatically generates its own html, so we do not want it to auto-format with the language header.
140+
If all tabs are using this shortcode, set `text=true` in the `tabpane` and remove `langEqualsHeader=true`.
141+
If only some tabs are using this shortcode, keep `langEqualsHeader=true` in the `tabpane` and add `text=true`
142+
to the `tab`. Note that the `gh-codeblock` line can not be indented at all.
145143

146144
One great thing about using `gh-codeblock` is that it adds a link to the full example.
147145
This means you don't have to include any additional context code, just the line(s) that
148146
are needed, and the user can navigate to the repo to see how to use it.
149147

150148
A basic comparison of code looks like:
151149

152-
{{</* tabpane text=true langEqualsHeader=true */>}}
150+
{{</* tabpane text=true */>}}
153151
{{</* tab header="Java" */>}}
154152
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" */>}}
155153
{{</* /tab */>}}
@@ -172,7 +170,7 @@ A basic comparison of code looks like:
172170

173171
Which looks like this:
174172

175-
{{< tabpane text=true langEqualsHeader=true >}}
173+
{{< tabpane text=true >}}
176174
{{< tab header="Java" >}}
177175
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" >}}
178176
{{< /tab >}}
@@ -199,7 +197,7 @@ If you want your example to include something other than code (default) or html
199197
you need to first set `text=true`,
200198
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:
201199

202-
{{</* tabpane text=true langEqualsHeader=true */>}}
200+
{{</* tabpane text=true */>}}
203201
{{%/* tab header="Java" */%}}
204202
1. Start the driver
205203
{{</* gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" */>}}
@@ -213,7 +211,7 @@ then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with
213211

214212
This produces:
215213

216-
{{< tabpane text=true langEqualsHeader=true >}}
214+
{{< tabpane text=true >}}
217215
{{% tab header="Java" %}}
218216
1. Start the driver
219217
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}

0 commit comments

Comments
 (0)