From e9b93432abf5cd8ced4b6cc369de50bd729cd4fc Mon Sep 17 00:00:00 2001 From: Matthew Setter Date: Mon, 7 Jan 2019 14:35:19 +0100 Subject: [PATCH] Add Antora Playbook files and update docs documentation This commit adds two Antora Playbook files, so that the docs can be built, stand-alone, from the remote repository and from the local working copy. It also documents how to build the docs locally. --- docs/README.md | 29 +++++++++++++++++++++++++++++ site.local.yml | 18 ++++++++++++++++++ site.yml | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 docs/README.md create mode 100644 site.local.yml diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..956e6fee4c --- /dev/null +++ b/docs/README.md @@ -0,0 +1,29 @@ +# Building the Docs + +The desktop client documentation is not built directly; instead, it is built when [the administration, developer, and user manuals](https://github.com/owncloud/docs/) are made. + +However, if you would like to build a local copy of the desktop client documentation, to preview changes that you are making as you are making them, you can use the following command: + +``` +antora \ + --redirect-facility static \ + --stacktrace \ + site.local.yml +``` + +**Note** this command requires Antora’s command-line tools to be installed. +To learn more about how to install them, please refer to [that documentation in the docs repository](https://github.com/owncloud/docs/blob/master/docs/install-antora.md). + +## Previewing the Generated Docs + +Assuming that there are no build errors, the next thing to do is to view the result in your browser. +In case you have already installed a web server, you need to configure a virtual host (or similar) which points to the directory `public`, located in the root directory of the repository. +This directory contains the generated documentation. +Alternatively, use the [NPM Serve tool](https://www.npmjs.com/package/serve) or [PHP's built-in webserver](https://secure.php.net/manual/en/features.commandline.webserver.php). + +The following example starts *NPM's Serve* running in the background, using the `public` directory as its directory root, and listening on `http://localhost:5000` (if available): + +``` +serve public & +``` + diff --git a/site.local.yml b/site.local.yml new file mode 100644 index 0000000000..9948915aed --- /dev/null +++ b/site.local.yml @@ -0,0 +1,18 @@ +site: + title: ownCloud Desktop Client Documentation + +content: + sources: + - url: . + branches: HEAD + start_path: docs/ + +ui: + bundle: + url: https://minio.owncloud.com/documentation/ui-bundle.zip + output_dir: assets + +output: + clean: true + dir: public + diff --git a/site.yml b/site.yml index e3e9ac78aa..f41bf20523 100644 --- a/site.yml +++ b/site.yml @@ -3,7 +3,7 @@ site: content: sources: - - url: . + - url: https://github.com/owncloud/client.git branches: - master-antora start_path: docs/