Skip to content

Commit

Permalink
Removing custom tabpane and using Docsy's
Browse files Browse the repository at this point in the history
[deploy site]
  • Loading branch information
diemol committed Mar 2, 2023
1 parent c825c0b commit 2e303e9
Show file tree
Hide file tree
Showing 86 changed files with 717 additions and 840 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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/hello/HelloSelenium.java" >}}
{{< /tab >}}
Expand Down
12 changes: 6 additions & 6 deletions website_and_docs/content/documentation/about/style.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ All code examples to be in our

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 `code=false` in the `tabpane` to prevent the auto-formatting, and add `code=true` in any
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.
Expand All @@ -174,7 +174,7 @@ are needed, and the user can navigate to the repo to see how to use it.

A basic comparison of code looks like:

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

Which looks like this:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.java#L46-L47" >}}
{{< /tab >}}
Expand All @@ -221,10 +221,10 @@ Which looks like this:
### Using Markdown in a Tab

If you want your example to include something other than code (default) or html (from `gh-codeblock`),
you need to first set `code=false`,
you need to first set `text=true`,
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:

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

This produces:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.java#L17" >}}
Expand Down
22 changes: 11 additions & 11 deletions website_and_docs/content/documentation/about/style.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: "Style guide for Selenium documentation"
linkTitle: "Style"
weight: 6
requiresTranslation: true
description: >-
Conventions for contributions to the Selenium documentation and code examples
---
Expand Down Expand Up @@ -129,8 +128,9 @@ 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
and is also used to synchronize the tabs on the page.
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.

{{</* tabpane langEqualsHeader=true */>}}
{{</* tab header="Java" */>}}
Expand Down Expand Up @@ -163,9 +163,9 @@ All code examples to be in our

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 `code=false` in the `tabpane` 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.
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.

One great thing about using `gh-codeblock` is that it adds a link to the full example.
Expand All @@ -174,7 +174,7 @@ are needed, and the user can navigate to the repo to see how to use it.

A basic comparison of code looks like:

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

Which looks like this:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.java#L46-L47" >}}
{{< /tab >}}
Expand All @@ -221,10 +221,10 @@ Which looks like this:
### Using Markdown in a Tab

If you want your example to include something other than code (default) or html (from `gh-codeblock`),
you need to first set `code=false`,
you need to first set `text=true`,
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:

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

This produces:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.java#L17" >}}
Expand Down
22 changes: 11 additions & 11 deletions website_and_docs/content/documentation/about/style.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: "Style guide for Selenium documentation"
linkTitle: "Style"
weight: 6
requiresTranslation: true
description: >-
Conventions for contributions to the Selenium documentation and code examples
---
Expand Down Expand Up @@ -129,8 +128,9 @@ 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
and is also used to synchronize the tabs on the page.
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.

{{</* tabpane langEqualsHeader=true */>}}
{{</* tab header="Java" */>}}
Expand Down Expand Up @@ -163,9 +163,9 @@ All code examples to be in our

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 `code=false` in the `tabpane` 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.
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.

One great thing about using `gh-codeblock` is that it adds a link to the full example.
Expand All @@ -174,7 +174,7 @@ are needed, and the user can navigate to the repo to see how to use it.

A basic comparison of code looks like:

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

Which looks like this:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.java#L46-L47" >}}
{{< /tab >}}
Expand All @@ -221,10 +221,10 @@ Which looks like this:
### Using Markdown in a Tab

If you want your example to include something other than code (default) or html (from `gh-codeblock`),
you need to first set `code=false`,
you need to first set `text=true`,
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:

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

This produces:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.java#L17" >}}
Expand Down
22 changes: 11 additions & 11 deletions website_and_docs/content/documentation/about/style.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: "Style guide for Selenium documentation"
linkTitle: "Style"
weight: 6
requiresTranslation: true
description: >-
Conventions for contributions to the Selenium documentation and code examples
---
Expand Down Expand Up @@ -129,8 +128,9 @@ 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
and is also used to synchronize the tabs on the page.
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.

{{</* tabpane langEqualsHeader=true */>}}
{{</* tab header="Java" */>}}
Expand Down Expand Up @@ -163,9 +163,9 @@ All code examples to be in our

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 `code=false` in the `tabpane` 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.
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.

One great thing about using `gh-codeblock` is that it adds a link to the full example.
Expand All @@ -174,7 +174,7 @@ are needed, and the user can navigate to the repo to see how to use it.

A basic comparison of code looks like:

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

Which looks like this:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.java#L46-L47" >}}
{{< /tab >}}
Expand All @@ -221,10 +221,10 @@ Which looks like this:
### Using Markdown in a Tab

If you want your example to include something other than code (default) or html (from `gh-codeblock`),
you need to first set `code=false`,
you need to first set `text=true`,
then change the Hugo syntax for the `tab`to use `%` instead of `<` and `>` with curly braces:

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

This produces:

{{< tabpane code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScriptTest.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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 code=false langEqualsHeader=true >}}
{{< tabpane text=true langEqualsHeader=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 2e303e9

Please sign in to comment.