Skip to content

Commit

Permalink
Upgrade to Docsy 0 7 2 (#1529)
Browse files Browse the repository at this point in the history
* update to docsy 0.7.2

* do not persist these tabs

* remove unnecessary references to langEqualsHeader

* remove unnecessary text=true references in tabs

* update style page with information on when to use which references in the tabs
  • Loading branch information
titusfortner authored Nov 17, 2023
1 parent c54b69d commit 48f4361
Show file tree
Hide file tree
Showing 135 changed files with 775 additions and 812 deletions.
2 changes: 1 addition & 1 deletion website_and_docs/content/documentation/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ an interface to write instruction sets that can be run interchangeably in many
browsers. Once you've installed everything, only a few lines of code get you inside
a browser. You can find a more comprehensive example in [Writing your first Selenium script]({{< ref "first_script.md" >}})

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/hello/HelloSelenium.java" >}}
{{< /tab >}}
Expand Down
2 changes: 1 addition & 1 deletion website_and_docs/content/documentation/_index.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Seleniumの中核は[WebDriver]({{< ref "/webdriver.md" >}})であり、様々
インストラクションの一つです:


{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/hello/HelloSelenium.java" >}}
{{< /tab >}}
Expand Down
2 changes: 1 addition & 1 deletion website_and_docs/content/documentation/_index.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ uma interface para escrever conjuntos de instruções que podem ser executados a
navegadores. Aqui está uma das instruções mais simples que você pode fazer:


{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/hello/HelloSelenium.java" >}}
{{< /tab >}}
Expand Down
2 changes: 1 addition & 1 deletion website_and_docs/content/documentation/_index.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Selenium 的核心是 [WebDriver]({{< ref "/webdriver.md" >}}),这是一个编



{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/hello/HelloSelenium.java" >}}
{{< /tab >}}
Expand Down
22 changes: 10 additions & 12 deletions website_and_docs/content/documentation/about/style.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ The Docsy code tabs look like this:
To generate the above tabs, this is what you need to write.
Note that the `tabpane` includes `langEqualsHeader=true`.
This auto-formats the code in each tab to match the header name,
but more importantly it ensures that all tabs on the page with a language
are set to the same thing, so we always want to include it.
and ensures that all tabs on the page with a language are set to the same thing.

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

#### Reference Github Examples
#### Reference GitHub Examples

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

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

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

A basic comparison of code looks like:

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

Which looks like this:

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

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

This produces:

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}
Expand Down
22 changes: 10 additions & 12 deletions website_and_docs/content/documentation/about/style.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ The Docsy code tabs look like this:
To generate the above tabs, this is what you need to write.
Note that the `tabpane` includes `langEqualsHeader=true`.
This auto-formats the code in each tab to match the header name,
but more importantly it ensures that all tabs on the page with a language
are set to the same thing, so we always want to include it.
and ensures that all tabs on the page with a language are set to the same thing.

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

#### Reference Github Examples
#### Reference Gitub Examples

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

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

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

A basic comparison of code looks like:

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

Which looks like this:

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

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

This produces:

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}
Expand Down
22 changes: 10 additions & 12 deletions website_and_docs/content/documentation/about/style.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ The Docsy code tabs look like this:
To generate the above tabs, this is what you need to write.
Note that the `tabpane` includes `langEqualsHeader=true`.
This auto-formats the code in each tab to match the header name,
but more importantly it ensures that all tabs on the page with a language
are set to the same thing, so we always want to include it.
and ensures that all tabs on the page with a language are set to the same thing.

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

#### Reference Github Examples
#### Reference GitHub Examples

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

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

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

A basic comparison of code looks like:

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

Which looks like this:

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

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

This produces:

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}
Expand Down
22 changes: 10 additions & 12 deletions website_and_docs/content/documentation/about/style.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ The Docsy code tabs look like this:
To generate the above tabs, this is what you need to write.
Note that the `tabpane` includes `langEqualsHeader=true`.
This auto-formats the code in each tab to match the header name,
but more importantly it ensures that all tabs on the page with a language
are set to the same thing, so we always want to include it.
and ensures that all tabs on the page with a language are set to the same thing.

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

#### Reference Github Examples
#### Reference GitHub Examples

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

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

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

A basic comparison of code looks like:

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

Which looks like this:

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

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

This produces:

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L17" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lower level commands for you. These are all documented in
Pointer movements and Wheel scrolling allow the user to set a duration for the action, but sometimes you just need
to wait a beat between actions for things to work correctly.

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L21-L28" >}}
{{< /tab >}}
Expand Down Expand Up @@ -64,7 +64,7 @@ There is a special method to release all currently depressed keys and pointer bu
This method is implemented differently in each of the languages because
it does not get executed with the perform method.

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L46" >}}
{{< /tab >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lower level commands for you. These are all documented in
Pointer movements and Wheel scrolling allow the user to set a duration for the action, but sometimes you just need
to wait a beat between actions for things to work correctly.

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L21-L28" >}}
{{< /tab >}}
Expand Down Expand Up @@ -64,7 +64,7 @@ There is a special method to release all currently depressed keys and pointer bu
This method is implemented differently in each of the languages because
it does not get executed with the perform method.

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L46" >}}
{{< /tab >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Felizmente, provavelmente você não precisa aprender a usar os comandos de baix

Movimentos de ponteiro e rolagem da roda permitem que o usuário defina uma duração para a ação, mas às vezes você só precisa esperar um momento entre as ações para que as coisas funcionem corretamente.

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L21-L28" >}}
{{< /tab >}}
Expand Down Expand Up @@ -46,7 +46,7 @@ Um ponto importante a ser observado é que o driver lembra o estado de todos os

Existe um método especial para liberar todas as teclas pressionadas e botões do ponteiro atualmente pressionados. Esse método é implementado de maneira diferente em cada uma das linguagens porque não é executado com o método de execução (perform).

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L46" >}}
{{< /tab >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Selenium允许您构建分配给特定输入的独立操作命令,
但有时您只需要在操作之间等待一下,
即可正常工作.

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L21-L28" >}}
{{< /tab >}}
Expand Down Expand Up @@ -79,7 +79,7 @@ Selenium允许您构建分配给特定输入的独立操作命令,
此方法在每种语言中的实现方式不同,
因为它不会使用perform方法执行.

{{< tabpane text=true langEqualsHeader=true >}}
{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/actions_api/ActionsTest.java#L46" >}}
{{< /tab >}}
Expand Down
Loading

0 comments on commit 48f4361

Please sign in to comment.