From b77a1d6bcb48b039a119086ce7c3d548b3232f72 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Thu, 3 Sep 2020 11:20:58 +0200 Subject: [PATCH] TechDocs: Add docs by default to react ssr template (#2261) * Add docs by default to react ssr template * Update plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/docs/index.md * Update plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/docs/index.md Co-authored-by: Himanshu Mishra Co-authored-by: Himanshu Mishra --- .../component-info.yaml | 1 + .../docs/index.md | 28 +++++++++++++++++++ .../{{cookiecutter.component_id}}/mkdocs.yml | 8 ++++++ 3 files changed, 37 insertions(+) create mode 100644 plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/docs/index.md create mode 100644 plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/mkdocs.yml diff --git a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml index 65a77d4a27..832b539ac6 100644 --- a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml +++ b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/component-info.yaml @@ -6,6 +6,7 @@ metadata: annotations: github.com/project-slug: {{cookiecutter.storePath}} backstage.io/github-actions-id: {{cookiecutter.storePath}} + backstage.io/techdocs-ref: github:https://github.com/{{cookiecutter.storePath}} spec: type: website lifecycle: experimental diff --git a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/docs/index.md b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/docs/index.md new file mode 100644 index 0000000000..2a0f572ff2 --- /dev/null +++ b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/docs/index.md @@ -0,0 +1,28 @@ +# {{ cookiecutter.component_id }} + +{{ cookiecutter.description }} + +## Getting started + +Start writing your documentation by adding more markdown (.md) files to this folder (/docs) or replace the content in this file. + +## Table of Contents + +The Table of Contents on the right is generated automatically based on the hierarchy +of headings. Only use one H1 (`#` in Markdown) per file. + +## Site navigation + +For new pages to appear in the left hand navigation you need edit the `mkdocs.yml` +file in root of your repo. The navigation can also link out to other sites. + +Alternatively, if there is no `nav` section in `mkdocs.yml`, a navigation section +will be created for you. However, you will not be able to use alternate titles for +pages, or include links to other sites. + +Note that MkDocs uses `mkdocs.yml`, not `mkdocs.yaml`, although both appear to work. +See also . + +## Support + +That's it. If you need support, reach out in [#docs-like-code](https://discord.com/channels/687207715902193673/714754240933003266) on Discord. diff --git a/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/mkdocs.yml b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/mkdocs.yml new file mode 100644 index 0000000000..0d10d11063 --- /dev/null +++ b/plugins/scaffolder-backend/sample-templates/react-ssr-template/{{cookiecutter.component_id}}/mkdocs.yml @@ -0,0 +1,8 @@ +site_name: {{cookiecutter.component_id}} +site_description: {{cookiecutter.description}} + +nav: + - Introduction: index.md + +plugins: + - techdocs-core