Skip to content

Commit

Permalink
trying antora
Browse files Browse the repository at this point in the history
  • Loading branch information
jstaerk committed Feb 27, 2023
1 parent 2259139 commit 6372d8c
Show file tree
Hide file tree
Showing 8 changed files with 483 additions and 0 deletions.
373 changes: 373 additions & 0 deletions doc/antora/LICENSE

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions doc/antora/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
= Demo Documentation Component B
// URLs
:url-project: https://antora.org
:url-docs: https://docs.antora.org
:url-org: https://gitlab.com/antora
:url-group: {url-org}/demo
:url-demo-site: https://antora.gitlab.io/demo/docs-site
:url-site-readme: {url-group}/docs-site/blob/master/README.adoc
:url-opendevise: https://opendevise.com

Component B is an example of a documentation component.
It is used by the {url-demo-site}[Antora Demo site].
The playbook and instructions for the Demo site are located in the {url-site-readme}[Demo site playbook project].

== Resources

* {url-project}[Antora Project Site]
* {url-docs}[Antora Docs]
* {url-org}[Antora Repositories]

== Copyright and License

Copyright (C) 2017-present by OpenDevise Inc. and the individual contributors to Antora.

Use of this software is granted under the terms of the https://www.mozilla.org/en-US/MPL/2.0/[Mozilla Public License Version 2.0] (MPL-2.0).
See link:LICENSE[] to find the full license text.
21 changes: 21 additions & 0 deletions doc/antora/code/my_app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file represents "software".
# This file helps show that documentation files can be in the same repository as software.

rescue => ex
begin
context = %(asciidoctor: FAILED: #{attrs['docfile'] || '<stdin>'}: Failed to load AsciiDoc document)
if ex.respond_to? :exception
# The original message must be explicitely preserved when wrapping a Ruby exception
wrapped_ex = ex.exception %(#{context} - #{ex.message})
# JRuby automatically sets backtrace, but not MRI
wrapped_ex.set_backtrace ex.backtrace
else
# Likely a Java exception class
wrapped_ex = ex.class.new context, ex
wrapped_ex.stack_trace = ex.stack_trace
end
rescue
wrapped_ex = ex
end
raise wrapped_ex
end
7 changes: 7 additions & 0 deletions doc/antora/docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: component-b
title: Component B
version: 2.5
prerelease: -beta.1
nav:
- modules/ROOT/nav.adoc
- modules/module-one/nav.adoc
1 change: 1 addition & 0 deletions doc/antora/docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:index.adoc[]
33 changes: 33 additions & 0 deletions doc/antora/docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
= Welcome to Component B!
:navtitle: Welcome

This is the automatic start page for version *{page-component-display-version}* of Component B.

Component B is one of two documentation components in the Antora Demo.
The other docs component, Component A, can be accessed using the component selector menu (aka component drawer) at the bottom of the menu on the left side of the page.

== Page source

This page is sourced from the AsciiDoc file named [.path]_index.adoc_ that is located at [.path]_demo-component-b/docs/modules/ROOT/pages_.

=== Why is this the home page of Component B?

This page is automatically used as the start page of Component B because it is stored in the ROOT module and named [.path]_index.adoc_.

=== Why is this the home page of the Antora Demo site?

This page is used as the home page for the Antora Demo because it is assigned as the site `start_page` in the Demo site's playbook file [.path]_site.yml_.

== Cross reference syntax to target this page

To create a cross reference *to this page from another page in the ROOT module of Component B*, the xref syntax would be `\xref:index.adoc[]`.

To create a cross reference *to this page from a page in Module One of Component B*, the xref syntax would be `\xref:ROOT:index.adoc[]`.

=== Always target the latest version of this page

To create a cross reference *to the latest version of this page from a page in Component A*, the xref syntax would be `\xref:component-b::index.adoc[]`.

=== Target a specific version of this page

To create a cross reference *to version 1.0 of this page from a page in Component A*, the xref syntax would be `\xref:1.0@component-b::index.adoc[]`.
1 change: 1 addition & 0 deletions doc/antora/docs/modules/module-one/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:overview.adoc[]
21 changes: 21 additions & 0 deletions doc/antora/docs/modules/module-one/pages/overview.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
= Module One Overview

This is version *{page-component-display-version}* of Module One in Component B.

== Page source

This page is sourced from [.path]_demo-component-b/docs/modules/module-one/pages/overview.adoc_.

== Cross reference syntax to target this page

To create a cross reference *to this page from another page in Module One*, the xref syntax would be `\xref:overview.adoc[]`.

To create a cross reference *to this page from a page in the ROOT module of Component B*, the xref syntax would be `\xref:module-one:overview.adoc[]`.

=== Always target the latest version of this page

To create a cross reference *to the latest version of this page from a page in Component A*, the xref syntax would be `\xref:component-b:module-one:overview.adoc[]`.

=== Target a specific version of this page

To create a cross reference *to version 1.0 of this page from a page in Component A*, the xref syntax would be `\xref:1.0@component-b:module-one:overview.adoc[]`.

0 comments on commit 6372d8c

Please sign in to comment.