Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asciidoc attributes examples for bookbag #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions test/aro_headers.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
:source-highlighter: highlight.js
:highlightjs-languages: adoc
:markup-in-source: verbatim,quotes


=== No ARO Deployment

:aro_console: %aro_console%
ifeval::["{aro_console}" != "%aro_console%"]
:aro_deployed: true
endif::[]
:preconfigure_aad: %preconfigure_aad%
ifeval::["{preconfigure_aad}" != "%preconfigure_aad%"]
:aad_preconfigured: true
endif::[]

[source,adoc]
----
:aro_console: %aro_console%
\ifeval::["{aro_console}" != "%aro_console%"]
:aro_deployed: true
\endif::[]
:preconfigure_aad: %preconfigure_aad%
\ifeval::["{preconfigure_aad}" != "%preconfigure_aad%"]
\:aad_preconfigured: true
\endif::[]

\ifdef::aro_deployed[]
You only see this if ARO is deployed.
\endif::[]

\ifndef::aro_deployed[]
You only see this if ARO is NOT deployed.
\endif::[]
----

ifdef::aro_deployed[]
You only see this if ARO is deployed.
endif::[]

ifndef::aro_deployed[]
You only see this if ARO is NOT deployed.
endif::[]

=== ARO deployed, no AAD

:aro_console: "http://example.com:6443"
ifeval::["{aro_console}" != "%aro_console%"]
:aro_deployed: true
endif::[]
:preconfigure_aad: %preconfigure_aad%
ifeval::["{preconfigure_aad}" != "%preconfigure_aad%"]
:aad_preconfigured: true
endif::[]

[source,adoc]
----
:aro_console: "http://example.com:6443"
\ifeval::["{aro_console}" != "%aro_console%"]
:aro_deployed: true
\endif::[]
:preconfigure_aad: %preconfigure_aad%
\ifeval::["{preconfigure_aad}" != "%preconfigure_aad%"]
:aad_preconfigured: true
\endif::[]

\ifdef::aro_deployed[]
ARO is deployed here: {aro_console}, AAD is
\ifndef::aad_preconfigured[]
NOT
\endif::aad_preconfigured[]
configured.
\endif::aro_deployed[]
----

ifdef::aro_deployed[]
ARO is deployed here: {aro_console}, AAD is
ifndef::aad_preconfigured[]
NOT
endif::aad_preconfigured[]
configured.
endif::aro_deployed[]

=== ARO deployed, yes AAD

:aro_console: "http://example.com:6443"
ifeval::["{aro_console}" != "%aro_console%"]
:aro_deployed: true
endif::[]
:preconfigure_aad: true
ifeval::["{preconfigure_aad}" != "%preconfigure_aad%"]
:aad_preconfigured: true
endif::[]

[source,adoc]
----
:aro_console: "http://example.com:6443"
\ifeval::["{aro_console}" != "%aro_console%"]
:aro_deployed: true
\endif::[]
:preconfigure_aad: true
\ifeval::["{preconfigure_aad}" != "%preconfigure_aad%"]
:aad_preconfigured: true
\endif::[]

\ifdef::aro_deployed[]
ARO is deployed here: {aro_console}, AAD is
\ifndef::aad_preconfigured[]
NOT
\endif::aad_preconfigured[]
configured.
\endif::aro_deployed[]
----

ifdef::aro_deployed[]
ARO is deployed here: {aro_console}, AAD is
ifndef::aad_preconfigured[]
NOT
endif::aad_preconfigured[]
configured.
endif::aro_deployed[]

=== Single Line Examples

[source,adoc]
----
Remember, AsciiDoc ignores single linebreaks.
\ifdef::aro_deployed[You can access your ARO console here: {aro_console}]

\ifdef::aad_preconfigured[AAD is Preconfigured]
----

Remember, AsciiDoc ignores single linebreaks.
ifdef::aro_deployed[You can access your ARO console here: {aro_console}]

ifdef::aad_preconfigured[AAD is Preconfigured]
71 changes: 71 additions & 0 deletions test/rosa_header.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
:source-highlighter: highlight.js
:highlightjs-languages: adoc
:markup-in-source: verbatim,quotes


=== No ROSA Deployment

:rosa_console_url: %rosa_console_url%
ifeval::["{rosa_console_url}" != "%rosa_console_url%"]
:rosa_deployed: true
endif::[]

[source,adoc]
----
:rosa_console_url: %rosa_console_url%
\ifeval::["{rosa_console_url}" != "%rosa_console_url%"]
:rosa_deployed: true
\endif::[]

\ifdef::rosa_deployed[]
You only see this if ROSA is deployed.
\endif::[]

\ifndef::rosa_deployed[]
You only see this if ROSA is NOT deployed.
\endif::[]
----

ifdef::rosa_deployed[]
You only see this if ROSA is deployed.
endif::[]

ifndef::rosa_deployed[]
You only see this if ROSA is NOT deployed.
endif::[]

=== ROSA deployed

:rosa_console_url: "http://example.com:6443"
ifeval::["{rosa_console_url}" != "%rosa_console_url%"]
:rosa_deployed: true
endif::[]

[source,adoc]
----
:rosa_console_url: "http://example.com:6443"
\ifeval::["{rosa_console_url}" != "%rosa_console_url%"]
:rosa_deployed: true
\endif::[]

\ifdef::rosa_deployed[]
ROSA is deployed here: {rosa_console_url}
\endif::rosa_deployed[]
----

ifdef::rosa_deployed[]
ROSA is deployed here: {rosa_console_url}
endif::rosa_deployed[]

=== Single Line Examples

[source,adoc]
----
Remember, AsciiDoc ignores single linebreaks.
\ifdef::rosa_deployed[You can access your ROSA console here: {rosa_console_url}]

\ifdef::aad_preconfigured[AAD is Preconfigured]
----

Remember, AsciiDoc ignores single linebreaks.
ifdef::rosa_deployed[You can access your ROSA console here: {rosa_console_url}]