feature(techdocs): added an example component in techdocs-backend containing a documentation reference
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# example docs
|
||||
|
||||
This is a basic example of documentation.
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: backstage.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: documented-component
|
||||
description: A Service with TechDocs documentation
|
||||
annotations:
|
||||
spotify.com/techdocs-ref: 'dir:./'
|
||||
spec:
|
||||
type: service
|
||||
lifecycle: experimental
|
||||
owner: documented@example.com
|
||||
@@ -0,0 +1,7 @@
|
||||
site_name: 'example-docs'
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
|
||||
plugins:
|
||||
- techdocs-core
|
||||
@@ -17,7 +17,8 @@
|
||||
"test": "backstage-cli test",
|
||||
"prepack": "backstage-cli prepack",
|
||||
"postpack": "backstage-cli postpack",
|
||||
"clean": "backstage-cli clean"
|
||||
"clean": "backstage-cli clean",
|
||||
"mock-data": "./scripts/mock-data.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.1.1-alpha.15",
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
for URL in \
|
||||
'documented-component/documented-component.yaml' \
|
||||
; do \
|
||||
curl \
|
||||
--location \
|
||||
--request POST 'localhost:7000/catalog/locations' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw "{\"type\": \"file\", \"target\": \"$(pwd)/examples/${URL}\"}"
|
||||
echo
|
||||
done
|
||||
Reference in New Issue
Block a user