Skip to content

Commit fb3a050

Browse files
committed
Initialize repository by moving content from backstage/backstage
1 parent b26495a commit fb3a050

File tree

8 files changed

+172
-1
lines changed

8 files changed

+172
-1
lines changed

Dockerfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2020 Spotify AB
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM python:3.8-alpine
16+
17+
18+
RUN apk update && apk --no-cache add gcc musl-dev openjdk11-jdk curl graphviz ttf-dejavu fontconfig
19+
20+
RUN curl -o plantuml.jar -L http://sourceforge.net/projects/plantuml/files/plantuml.1.2020.16.jar/download && echo "c789ace48347c43073232b1458badc5810c01fe8 plantuml.jar" | sha1sum -c - && mv plantuml.jar /opt/plantuml.jar
21+
RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.11
22+
23+
# Create script to call plantuml.jar from a location in path
24+
25+
RUN echo $'#!/bin/sh\n\njava -jar '/opt/plantuml.jar' ${@}' >> /usr/local/bin/plantuml
26+
RUN chmod 755 /usr/local/bin/plantuml
27+
28+
ENTRYPOINT [ "mkdocs" ]

README.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
11
# techdocs-container
2-
Docker container that powers the generation of TechDocs static sites
2+
3+
This is the Docker container that powers the creation of static documentation sites that are supported by [TechDocs](https://github.com/backstage/backstage/blob/master/plugins/techdocs).
4+
5+
## Getting Started
6+
7+
Using the TechDocs CLI, we can invoke the latest version of `techdocs-container` via Docker Hub:
8+
9+
```bash
10+
npx techdocs-cli serve
11+
```
12+
13+
## Local Development
14+
15+
```bash
16+
docker build . -t mkdocs:local-dev
17+
18+
docker run -w /content -v $(pwd)/mock-docs:/content -p 8000:8000 -it mkdocs:local-dev serve -a 0.0.0.0:8000
19+
```
20+
21+
Then open up `http://localhost:8000` on your local machine.
22+
23+
## Publishing
24+
25+
This container is published on DockerHub - https://hub.docker.com/r/spotify/techdocs
26+
27+
The publishing is configured by [Automated Builds](https://hub.docker.com/repository/docker/spotify/techdocs/builds/edit) feature on Docker Hub which is triggered from GitHub (on new commits and releases). @backstage/techdocs-core team has access to the settings.
28+
29+
The `latest` tag on Docker Hub points to the recent commits in the `master` branch. The [version tags](https://hub.docker.com/r/spotify/techdocs/tags) (e.g. v0.1.1-alpha.24) point to the GitHub tags created from [releases](https://github.com/backstage/backstage/releases) of this GitHub repository.
30+
31+
Note: We recommend using a specific version of the container instead of `latest` release for stability and avoiding unexpected changes.

bin/scripts/plantuml

Whitespace-only changes.

mock-docs/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
site/

mock-docs/docs/index.md

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
## hello mock docs
2+
3+
!!! test
4+
Testing something
5+
6+
Abbreviations:
7+
Some text about MOCDOC
8+
9+
This is a paragraph.
10+
{: #test_id .test_class }
11+
12+
Apple
13+
: Pomaceous fruit of plants of the genus Malus in
14+
the family Rosaceae.
15+
16+
```javascript
17+
import { test } from 'something';
18+
19+
const addThingToThing = (a, b) a + b;
20+
```
21+
22+
- [abc](#abc)
23+
- [xyz](#xyz)
24+
25+
## abc
26+
27+
This is a b c.
28+
29+
## xyz
30+
31+
This is x y z.
32+
33+
# The attack plan
34+
35+
{% dot attack_plan.svg
36+
digraph G {
37+
rankdir=LR
38+
Earth [peripheries=2]
39+
Mars
40+
Earth -> Mars
41+
}
42+
%}
43+
44+
```graphviz dot attack_plan.svg
45+
digraph G {
46+
rankdir=LR
47+
Earth [peripheries=2]
48+
Mars
49+
Earth -> Mars
50+
}
51+
```
52+
53+
# PlantUML Samples
54+
55+
```plantuml classes="uml myDiagram" alt="Diagram placeholder" title="My diagram"
56+
@startuml
57+
Goofy -> MickeyMouse: calls
58+
Goofy <-- MickeyMouse: responds
59+
@enduml
60+
```
61+
62+
:bulb:
63+
64+
=== "JavaScript"
65+
66+
```javascript
67+
import { test } from 'something';
68+
69+
const addThingToThing = (a, b) a + b;
70+
```
71+
72+
=== "Java"
73+
74+
```java
75+
public void function() {
76+
test();
77+
}
78+
```
79+
80+
```java tab="java"
81+
public void function() {
82+
test();
83+
}
84+
```
85+
86+
```java tab="java 2"
87+
public void function() {
88+
test();
89+
}
90+
```
91+
92+
```javascript
93+
import { test } from 'something';
94+
95+
const addThingToThing = (a, b) a + b;
96+
```
97+
98+
<!-- prettier-ignore -->
99+
*[MOCDOC]: Mock Documentation

mock-docs/mkdocs.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
site_name: 'mock-docs'
2+
site_description: 'mock-docs site description'
3+
4+
nav:
5+
- Home: index.md
6+
- SubDocs: '!include ./sub-docs/mkdocs.yml'
7+
8+
plugins:
9+
- techdocs-core

mock-docs/sub-docs/docs/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
### This is an md file in another docs folder using the [MkDocs Monorepo Plugin](https://github.com/spotify/mkdocs-monorepo-plugin)

mock-docs/sub-docs/mkdocs.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
site_name: subdocs
2+
3+
nav:
4+
- Home 2: 'index.md'

0 commit comments

Comments
 (0)