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

docs: Add Docserv² AsciiDoc docs #279

Merged
4 commits merged into from
Jan 11, 2022
Merged
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
127 changes: 60 additions & 67 deletions config/docserv.ini → config/my-site.ini
Original file line number Diff line number Diff line change
@@ -1,99 +1,92 @@
[server]

# Where to host the REST API
host = localhost
port = 8080
# Loglevels
# 0: warning
# 1: info
# 2: debug
loglevel = 2
# The repo dir will be used to cache remote git repositories.
repo_dir = /mnt/docserv-repos/

# The repo dir will be used to cache remote Git repositories.
repo_dir = /home/docserv/docserv-repos/
# For building, the locally cached git repo will be cloned again.
# This prevents branch checkout collisions during builds and other
# problems. It is recommended to mount a sufficiently large RAM disk
# to the temp_repo_dir directory.
temp_repo_dir = /dev/shm/
# problems.
temp_repo_dir = /home/docserv/docserv-branches/

# A list of language codes that are recognized as valid.
valid_languages = en-us de-de fr-fr pt-br ja-jp zh-cn es-es it-it ko-kr hu-hu zh-tw cs-cz ar-ar pl-pl ru-ru
# The upper limit of threads is the number of logical CPU cores. Use
# the max_threads setting to reduce the number of threads.
max_threads = 8
# A list of language codes that are recognized as valid.
valid_languages = en-us de-de fr-fr pt-br ja-jp zh-cn es-es it-it ko-kr hu-hu zh-tw cs-cz ar-ar pl-pl ru-ru

# sections need to start with 'target_'
# Whether to enable error reports via mail
enable_mail = no
# Log levels: 0 - warning, 1 - info, 2 - debug
loglevel = 0


# target section names need to start with "target_"
[target_0]

# Name of the target to identify it in the documentation configuration.
name = internal
# If not active, documents for the target will not be built.
active = yes
# Internal builds (this means even documents marked "unpublished" will be linked)
internal = no

# Whether to enable syncing to target_path. If disabled, only the local content in backup_path is updated
enable_target_sync = no
# A URL to the publication path. Can be a local or ssh/scp URL.
target_path = ssh://docserv@localhost:/srv/www/htdocs/documentation
# A URL to the publication path. Can be a local or ssh/scp URL.
backup_path = /home/docserv/target-backup

# Directory where the document configuration in XML format resides.
config_dir = product-config/
# Directory for overview page templates.
template_dir = templates/
# Directory with files to copy to the server's root directory, such as
# robots.txt, .htaccess, or a favicon.
server_root_files = server-root-files-internal
# Default XSLT parameters file (file must contain parameters of the form
# parameter=value, separated by newlines).
default_xslt_params = xslt-params.txt

# Fragments allow using localized Server-Side Includes (SSIs) as part of the
# template -- they are optional, if `enable_ssi_fragments` is set to `no`, the
# parameter `fragment_dir` and `fragment_l10n_dir` are not required.
enable_ssi_fragments = no
fragment_dir = fragments/
fragment_l10n_dir = l10n/

# Relative root path of the Docserv² installation on the publication server
# Used for relative resource paths within the navigational HTML pages
server_base_path = /
# Beginning of the URL to use for <link rel=canonical/> tags, must omit
# server base path and generated path
canonical_url_domain = https://www.example.org

# Add the draft watermarks to the documents.
draft = yes
# Add remarks to the documents.
remarks = yes
# Add meta information (XML ID and source file name) to the documents.
meta = no
# Default XSLT parameters file (file must contain parameters of the form
# parameter='value', separated by newlines)
default_xslt_params = /etc/docserv/xslt-params.txt
# Directory for overview page templates.
template_dir = /etc/docserv/templates/
# Directory where the document configuration in XML format resides.
config_dir = /etc/docserv/config.d/
# A URL to the publication path. Can be a local or ssh/scp URL.
target_path = ssh://user@server:/srv/www/htdocs/documentation
# A URL to the publication path. Can be a local or ssh/scp URL.
backup_path = /mnt/internal-builds/
# Use a non-standard build container for this target (optional attribute).
#build_container = ...

# Languages that will appear in the web UI
languages = en-us
# Default language of the web UI
default_lang = en-us
# Whether to omit the default language's path component from links by default
omit_default_lang_path = no
# Internal builds (this means even documents marked "unpublished" will be linked)
internal = yes
# Document formats that should be contained in automatically generated zip files
zip_formats = pdf epub single-html
# Relative root path of the docserv2 installation on the publication server
# Used for relative resource paths within the navigational HTML pages
server_base_path = /
# Beginning of the URL to use for <link rel=canonical/> tags, must omit
# server base path and generated path
canonical_url_domain = https://www.example.org
# Directory with files to copy to the server's root directory, such as
# robots.txt, .htaccess, or a favicon.
server_root_files = /etc/docserv/server-root-files-internal
# Fragments allow using localized Server-Side Includes (SSIs) as part of the
# template -- they are optional, if `enable_ssi_fragments` is set to `no`, the
# parameter `fragment_dir` and `fragment_l10n_dir` are not required.
enable_ssi_fragments = yes
fragment_dir = /etc/docserv/fragment-internal
fragment_l10n_dir = /etc/docserv/fragment-l10n-internal

# Sections of the published site. Each section gets an own top-level
# navigation page. XML product configuration files can be assigned to a site
# section using the <product site-section="..."/> attribute. Each site section
# needs an HTML template file named template-[SITE_SECTION].html.
site_sections = main best-practices
# section using the `<product site-section="..."/>` attribute.
site_sections = main alternative
# The default site section is used as the top-level index.html page.
default_site_section = main

[target_1]
name = external
active = yes
draft = no
remarks = no
meta = no
default_xslt_params = /etc/docserv/xslt-params.txt
template_dir = /etc/docserv/templates/
config_dir = /etc/docserv/config.d/
target_path = ssh://user@pubserver:/srv/www/htdocs/documentation
backup_path = /mnt/external-builds/
languages = en-us de-de fr-fr pt-br ja-jp zh-cn es-es
default_lang = en-us
omit_default_lang_path = no
internal = no
# Document formats that should be added to automatically generated ZIP files.
zip_formats = pdf epub single-html
server_base_path = /
canonical_url_domain = https://www.example.org
server_root_files = /etc/docserv/server-root-files-external
enable_ssi_fragments = no
site_sections = main
default_site_section = main
49 changes: 49 additions & 0 deletions config/product-config/docserv2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>

<product productid="docserv2" schemaversion="6.0">
<name>Docserv²</name>
<acronym>Ds2</acronym>
<maintainers>
<contact>[email protected]</contact>
</maintainers>

<desc default="1" lang="en-us">
<p>
Docserv² is a tool to publish and semi-automatically update large-scale
documentation websites accommodating multiple products, product
versions, and localizations. It focuses on allowing publication of
DocBook/AsciiDoc content that is compatible with DAPS. However, it can
also accommodate links to other sources of documents.
</p>
</desc>

<docset setid="6" lifecycle="supported">
<version>6</version>

<builddocs>

<git remote="https://github.com/openSUSE/docserv"/>

<language default="1" lang="en-us">
<branch>main</branch>
<subdir>docs</subdir>

<deliverable remarks="0" draft="false" meta="0">
<dc>DC-docserv</dc>
<format html="1" single-html="0" pdf="1" epub="0"/>
</deliverable>
</language>

</builddocs>

<external>
<link linkid="change-log">
<language lang="en-us" default="1" title="Change log">
<url format="html" href="https://github.com/openSUSE/docserv/blob/main/CHANGELOG.md"/>
</language>
</link>
</external>

</docset>

</product>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
only works within the docserv Git repository. -->
<?xml-model href="../../share/validate-product-config/product-config-schema.rnc" type="application/relax-ng-compact-syntax"?>

<product productid="example_product" schemaversion="3.0" navigation="linked">
<product productid="example_product" enabled="0" schemaversion="6.0">
<!-- ID can be used for build commands, HTML IDs, etc. -->
<!-- lifecycle="unpublished"/"beta"/"supported"/"unsupported":
+ "unpublished": Don't build, don't mention on overview page
Expand Down Expand Up @@ -60,35 +60,35 @@
q, cite + class/id attributes -->
<p>
This product will lose control of you and help you live free.
SP is so glad to have you and your evil curls.
XP is so glad to have you and your evil curls.
</p>
</desc>

<desc default="0" lang="fr-fr">
<p>
Ce produit ne peut pas obtenir la contrôle de vous, mais le vous aidez
a vivir libre. SP est très heureux de vous avoir et d'avoir vos
a vivir libre. XP est très heureux de vous avoir et d'avoir vos
cheveux chevalier.
</p>
</desc>

<desc lang="de-de">
<p>
Dieses Produkt hat die Kontrolle über Sie bereits verloren und will
Ihnen helfen, lieber libre zu leben. SP ist verzückt, dass Sie ihm
Ihnen helfen, lieber libre zu leben. XP ist verzückt, dass Sie ihm
und seinen bösartigen Lockrufen gefolgt sind.
</p>
</desc>

<docset setid="2.0" lifecycle="supported" default="true">
<docset setid="2.0" lifecycle="supported">
<version>2.0</version>

<builddocs>

<git remote="https://github.com/example.org/doc-example"/>

<language default="1" lang="en-us">
<branch>develop</branch>
<branch>main</branch>

<!-- MAXIMALIST (<param>) COMPILATION (i.e. w/ <subdeliverables/>) DELIVERABLE EXAMPLE -->
<deliverable remarks="0" draft="false" meta="0">
Expand Down Expand Up @@ -119,19 +119,7 @@

</language>

<language lang="de-de" translation-type="negative-list">
<branch>maint/xp15</branch>
<subdir>sles/de</subdir>
<deliverable>
<dc>DC-example-all</dc>
<subdeliverable>book.user</subdeliverable>
</deliverable>
<deliverable>
<dc>DC-example-user</dc>
</deliverable>
</language>

<language lang="zh-cn" translation-type="positive-list">
<language lang="zh-cn" translation-type="list">
<branch>maint/xp15</branch>
<subdir>sles/zh-cn</subdir>
<deliverable>
Expand Down Expand Up @@ -192,7 +180,7 @@
<git remote="https://github.com/example.org/doc-example"/>

<language default="1" lang="en-us">
<branch>develop</branch>
<branch>main</branch>

<deliverable remarks="0" draft="false" meta="0">
<dc>DC-example-all</dc>
Expand Down Expand Up @@ -222,7 +210,12 @@
<external>
<link linkid="release-notes">
<language lang="en-us" default="1" title="Release Notes">
<url format="html" href="https://www.example.org/1"/>
<url format="html" href="https://www.example.org/1/"/>
<url format="pdf" href="https://www.example.org/1.pdf"/>
</language>
<language lang="de-de" default="0" title="Versionshinweise">
<url format="html" href="https://www.example.org/de-de/1/"/>
<url format="pdf" href="https://www.example.org/de-de/1.pdf"/>
</language>
</link>
<link>
Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions config/templates/template-product.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Docset template</title>
<script>
var basePath = '@{{#base_path#}}';
var templateExtension = '@{{#template_extension#}}';
var pageRole = 'product';
var pageLanguage = '@{{#ui_language#}}';
var omitPathComponent = '@{{#omit_path_component#}}';
var pageProduct = '@{{#product#}}';
var pageDocSet = '@{{#docset#}}';
</script>
<script src="@{{base_path}}docserv/res/docservui.js"></script>
</head>
<body>
<div id="docsetwrap" class="ds-page-wrap">
</div>
</body>
</html>
25 changes: 25 additions & 0 deletions config/templates/template-section-default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Site section template</title>
<script>
var basePath = '@{{#base_path#}}';
var templateExtension = '@{{#template_extension#}}';
var pageRole = '@{{#page_role#}}';
var sectionName = '@{{#section_name#}}';
var pageLanguage = '@{{#ui_language#}}';
var omitPathComponent = '@{{#omit_path_component#}}';
</script>
<script src="@{{base_path}}docserv/res/docservui.js"></script>
</head>
<body>
<div id="ds-section-select"></div>

<div class="ds-select-list" id="ds-product-select">
<div class="ds-select-instruction">Downloading data...</div>
</div>
<div class="ds-select-list" id="ds-version-select">
<div class="ds-select-instruction">Select a product</div>
</div>
</body>
</html>
13 changes: 0 additions & 13 deletions config/templates/template.html

This file was deleted.

22 changes: 0 additions & 22 deletions config/templates/translation.xml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/DC-docserv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MAIN=0-docserv-guide.adoc

HTML_CSS=docserv-style.css
ADOC_POST=yes
ADOC_TYPE=book
XSLTPARAM=--stringparam chunk.section.depth=0
Loading