From 869c47f32d40e9abbe8c28a42930dc49a1bbee21 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Thu, 9 Jun 2022 16:27:56 +0200 Subject: [PATCH 1/2] Refactor `docs/antora.yml` template --- moduleroot/docs/antora.yml.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/moduleroot/docs/antora.yml.erb b/moduleroot/docs/antora.yml.erb index 150e8b0..4574f81 100644 --- a/moduleroot/docs/antora.yml.erb +++ b/moduleroot/docs/antora.yml.erb @@ -1,11 +1,13 @@ # # File managed by ModuleSync - Do Not Edit # -# The name and title can be customized in `.sync.yml` with `'docs/antora.yml'.title`, `'docs/antora.yml'.name` +# The title can be customized in `.sync.yml` with `:global.componentName` +# The name is generated from the component's GitHub repository name, with the +# `component-` prefix removed. # -name: <%= @configs['name'] %> -title: <%= @configs['title'] %> +name: <%= @metadata[:module_name].delete_prefix('component-') %> +title: <%= @configs['componentName'] %> version: <%= @configs['version'] %> start_page: ROOT:index.adoc nav: From 93890aac3b1d65deb83222ce10c881be9ac1c4d1 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Thu, 9 Jun 2022 16:28:19 +0200 Subject: [PATCH 2/2] Manage component `README.md` --- moduleroot/README.md.erb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 moduleroot/README.md.erb diff --git a/moduleroot/README.md.erb b/moduleroot/README.md.erb new file mode 100644 index 0000000..6858142 --- /dev/null +++ b/moduleroot/README.md.erb @@ -0,0 +1,27 @@ +# Commodore Component: <%= @configs['componentName'] %> + +This is a [Commodore][commodore] Component for <%= @configs['componentName'] %>. + +This repository is part of Project Syn. +For documentation on Project Syn and this component, see https://syn.tools. + +## Documentation + +The rendered documentation for this component is available on the [Commodore Components Hub](https://hub.syn.tools/<%= @metadata[:module_name].delete_prefix('component-') %>). + +Documentation for this component is written using [Asciidoc][asciidoc] and [Antora][antora]. +It is located in the [docs/](docs) folder. +The [Divio documentation structure](https://documentation.divio.com/) is used to organize its content. + +Run the `make docs-serve` command in the root of the project, and then browse to http://localhost:2020 to see a preview of the current state of the documentation. + +After writing the documentation, please use the `make docs-vale` command and correct any warnings raised by the tool. + +## Contributing and license + +This library is licensed under [BSD-3-Clause](LICENSE). +For information about how to contribute see [CONTRIBUTING](CONTRIBUTING.md). + +[commodore]: https://syn.tools/commodore/ +[asciidoc]: https://asciidoctor.org/ +[antora]: https://antora.org/