From 77a13948c15ec3b67b72596fb90a0605a15369a7 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Fri, 18 Feb 2022 14:40:32 +0100 Subject: [PATCH] add example docs Signed-off-by: Emma Indal --- .../techdocs-cli/src/example-docs/.gitignore | 1 + .../src/example-docs/docs/index.md | 93 +++++++++++++++++++ .../techdocs-cli/src/example-docs/mkdocs.yml | 10 ++ .../plugins/plugin-a/docs/index.md | 4 + .../example-docs/plugins/plugin-a/mkdocs.yml | 5 + .../plugins/plugin-b/docs/index.md | 4 + .../example-docs/plugins/plugin-b/mkdocs.yml | 5 + .../src/example-docs/sub-docs/docs/index.md | 1 + .../src/example-docs/sub-docs/mkdocs.yml | 4 + 9 files changed, 127 insertions(+) create mode 100644 packages/techdocs-cli/src/example-docs/.gitignore create mode 100644 packages/techdocs-cli/src/example-docs/docs/index.md create mode 100644 packages/techdocs-cli/src/example-docs/mkdocs.yml create mode 100644 packages/techdocs-cli/src/example-docs/plugins/plugin-a/docs/index.md create mode 100644 packages/techdocs-cli/src/example-docs/plugins/plugin-a/mkdocs.yml create mode 100644 packages/techdocs-cli/src/example-docs/plugins/plugin-b/docs/index.md create mode 100644 packages/techdocs-cli/src/example-docs/plugins/plugin-b/mkdocs.yml create mode 100644 packages/techdocs-cli/src/example-docs/sub-docs/docs/index.md create mode 100644 packages/techdocs-cli/src/example-docs/sub-docs/mkdocs.yml diff --git a/packages/techdocs-cli/src/example-docs/.gitignore b/packages/techdocs-cli/src/example-docs/.gitignore new file mode 100644 index 0000000000..45ddf0ae39 --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/.gitignore @@ -0,0 +1 @@ +site/ diff --git a/packages/techdocs-cli/src/example-docs/docs/index.md b/packages/techdocs-cli/src/example-docs/docs/index.md new file mode 100644 index 0000000000..20fed8bc63 --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/docs/index.md @@ -0,0 +1,93 @@ +## hello mock docs + +!!! test +Testing something + +Abbreviations: +Some text about MOCDOC + +This is a paragraph. +{: #test_id .test_class } + +Apple +: Pomaceous fruit of plants of the genus Malus in +the family Rosaceae. + +```javascript +import { test } from 'something'; + +const addThingToThing = (a, b) a + b; +``` + +- [abc](#abc) +- [xyz](#xyz) + +## abc + +This is a b c. + +## xyz + +This is x y z. + +# Emojis + +:bulb: :smile: + +# Code blocks + +```javascript +import { test } from 'something'; + +const addThingToThing = (a, b) a + b; +``` + +# Grouped Code blocks + +=== "JavaScript" + + ```javascript + import { test } from 'something'; + + const addThingToThing = (a, b) a + b; + ``` + +=== "Java" + + ```java + public void function() { + test(); + } + ``` + +```java tab="java" + public void function() { + test(); + } +``` + +```java tab="java 2" + public void function() { + test(); + } +``` + +# MDX truly sane lists + +- attributes + +- customer + - first_name + - test + - family_name + - email +- person + - first_name + - family_name + - birth_date +- subscription_id + +- request + + +*[MOCDOC]: Mock Documentation diff --git a/packages/techdocs-cli/src/example-docs/mkdocs.yml b/packages/techdocs-cli/src/example-docs/mkdocs.yml new file mode 100644 index 0000000000..9c9406f6e6 --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/mkdocs.yml @@ -0,0 +1,10 @@ +site_name: docs-test-fixture +site_description: Documentation site test fixture + +nav: + - Home: index.md + - SubDocs: '!include ./sub-docs/mkdocs.yml' + - Plugins: '*include ./plugins/*/mkdocs.yml' + +plugins: + - techdocs-core diff --git a/packages/techdocs-cli/src/example-docs/plugins/plugin-a/docs/index.md b/packages/techdocs-cli/src/example-docs/plugins/plugin-a/docs/index.md new file mode 100644 index 0000000000..bd8bc3a4ea --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/plugins/plugin-a/docs/index.md @@ -0,0 +1,4 @@ +# Plugin A + +This is a description of Plugin A. This file exists to prove that glob'd +includes using the `*include` syntax work as expected. diff --git a/packages/techdocs-cli/src/example-docs/plugins/plugin-a/mkdocs.yml b/packages/techdocs-cli/src/example-docs/plugins/plugin-a/mkdocs.yml new file mode 100644 index 0000000000..66407d5391 --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/plugins/plugin-a/mkdocs.yml @@ -0,0 +1,5 @@ +site_name: Plugin A +site_description: A description of Plugin A + +nav: + - Introduction: index.md diff --git a/packages/techdocs-cli/src/example-docs/plugins/plugin-b/docs/index.md b/packages/techdocs-cli/src/example-docs/plugins/plugin-b/docs/index.md new file mode 100644 index 0000000000..93e545252f --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/plugins/plugin-b/docs/index.md @@ -0,0 +1,4 @@ +# Plugin B + +This is a description of Plugin B. This file exists to prove that glob'd +includes using the `*include` syntax work as expected. diff --git a/packages/techdocs-cli/src/example-docs/plugins/plugin-b/mkdocs.yml b/packages/techdocs-cli/src/example-docs/plugins/plugin-b/mkdocs.yml new file mode 100644 index 0000000000..81580c33af --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/plugins/plugin-b/mkdocs.yml @@ -0,0 +1,5 @@ +site_name: Plugin B +site_description: A description of Plugin B + +nav: + - Introduction: index.md diff --git a/packages/techdocs-cli/src/example-docs/sub-docs/docs/index.md b/packages/techdocs-cli/src/example-docs/sub-docs/docs/index.md new file mode 100644 index 0000000000..65c6644ef8 --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/sub-docs/docs/index.md @@ -0,0 +1 @@ +### This is an md file in another docs folder using the [MkDocs Monorepo Plugin](https://github.com/spotify/mkdocs-monorepo-plugin) diff --git a/packages/techdocs-cli/src/example-docs/sub-docs/mkdocs.yml b/packages/techdocs-cli/src/example-docs/sub-docs/mkdocs.yml new file mode 100644 index 0000000000..4490ddbefa --- /dev/null +++ b/packages/techdocs-cli/src/example-docs/sub-docs/mkdocs.yml @@ -0,0 +1,4 @@ +site_name: subdocs + +nav: + - Home 2: 'index.md'