diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cf28c55cb3..7cef5afce0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,6 +11,5 @@ /plugins/techdocs @backstage/techdocs-core /plugins/techdocs-backend @backstage/techdocs-core /packages/techdocs-cli @backstage/techdocs-core -/packages/techdocs-container @backstage/techdocs-core /.github/workflows/techdocs.yml @backstage/techdocs-core /.changeset/cost-insights-* @backstage/silver-lining diff --git a/.github/workflows/techdocs.yml b/.github/workflows/techdocs.yml deleted file mode 100644 index 9b5ea50217..0000000000 --- a/.github/workflows/techdocs.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: TechDocs - -on: - pull_request: - paths: - - '.github/workflows/techdocs.yml' - - 'packages/techdocs-container/**' - - 'packages/techdocs-cli/**' - - 'plugins/techdocs/**' - - 'plugins/techdocs-backend/**' - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - python-version: [3.7] - - env: - TECHDOCS_CORE_PATH: ./packages/techdocs-container/techdocs-core - - name: Python ${{ matrix.node-version }} on ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - # Build Docker Image - - name: Build Docker image - uses: docker/build-push-action@v1.1.0 - with: - path: packages/techdocs-container - push: false diff --git a/docs/features/techdocs/FAQ.md b/docs/features/techdocs/FAQ.md index 257d6e6f7a..de424778cb 100644 --- a/docs/features/techdocs/FAQ.md +++ b/docs/features/techdocs/FAQ.md @@ -17,9 +17,8 @@ This page answers frequently asked questions about [TechDocs](README.md). TechDocs is using [MkDocs](https://www.mkdocs.org/) to build project documentation under the hood. Documentation built with the -[techdocs-container](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/README.md) -is using the MkDocs -[Material Theme](https://github.com/squidfunk/mkdocs-material). +[techdocs-container](https://github.com/backstage/techdocs-container) is using +the MkDocs [Material Theme](https://github.com/squidfunk/mkdocs-material). #### What is the mkdocs-techdocs-core plugin? diff --git a/docs/features/techdocs/README.md b/docs/features/techdocs/README.md index a16776868a..f1cf637997 100644 --- a/docs/features/techdocs/README.md +++ b/docs/features/techdocs/README.md @@ -109,8 +109,8 @@ migrate Spotify's existing TechDocs features to open source. | ------------------------------------------- | -------------------------------------------------------- | | Frontend | [`@backstage/plugin-techdocs`][techdocs/frontend] | | Backend | [`@backstage/plugin-techdocs-backend`][techdocs/backend] | -| Docker Container (for generating doc sites) | [`packages/techdocs-container`][techdocs/container] | -| CLI (for local development) | [`packages/techdocs-cli`][techdocs/cli] | +| Docker Container (for generating doc sites) | [`techdocs-container`][techdocs/container] | +| CLI (for local development) | [`@techdocs/cli`][techdocs/cli] | [getting started]: getting-started.md [concepts]: concepts.md @@ -120,7 +120,5 @@ migrate Spotify's existing TechDocs features to open source. https://github.com/backstage/backstage/blob/master/plugins/techdocs [techdocs/backend]: https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend -[techdocs/container]: - https://github.com/backstage/backstage/blob/master/packages/techdocs-container -[techdocs/cli]: - https://github.com/backstage/backstage/blob/master/packages/techdocs-cli +[techdocs/container]: https://github.com/backstage/techdocs-container +[techdocs/cli]: https://github.com/backstage/techdocs-cli diff --git a/docs/features/techdocs/concepts.md b/docs/features/techdocs/concepts.md index ed1fc2220c..c614965ab9 100644 --- a/docs/features/techdocs/concepts.md +++ b/docs/features/techdocs/concepts.md @@ -23,7 +23,7 @@ The TechDocs container is a Docker container available at pages, including stylesheets and scripts from Python flavored Markdown, through MkDocs. -[TechDocs Container](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/README.md) +[TechDocs Container](https://github.com/backstage/techdocs-container) ### TechDocs publisher diff --git a/docs/support/project-structure.md b/docs/support/project-structure.md index 9bf143e0f2..034fba4cb8 100644 --- a/docs/support/project-structure.md +++ b/docs/support/project-structure.md @@ -168,12 +168,6 @@ are separated out into their own folder, see further down. package. The Backstage Storybook is found [here](https://backstage.io/storybook) -- [`techdocs-cli/`](https://github.com/backstage/backstage/tree/master/packages/techdocs-cli) - - Used for verifying TechDocs locally. - -- [`techdocs-container/`](https://github.com/backstage/backstage/tree/master/packages/techdocs-container) - - Used by the `techdocs-cli` - - [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core) - [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils) diff --git a/microsite/blog/2020-09-08-announcing-tech-docs.md b/microsite/blog/2020-09-08-announcing-tech-docs.md index ecf678a5bd..ceab17d7be 100644 --- a/microsite/blog/2020-09-08-announcing-tech-docs.md +++ b/microsite/blog/2020-09-08-announcing-tech-docs.md @@ -23,7 +23,7 @@ But this is just one way to do it. Today we’re most excited for what the open If you go to [GitHub](https://github.com/backstage/backstage/tree/master/plugins) now, you’ll find everything you need to start collaborating with us to build out the docs-like-code Backstage plugin — we’ll call it TechDocs in the open as well. -You’ll find the code in [techdocs](https://github.com/backstage/backstage/tree/master/plugins/techdocs) (frontend) and [techdocs-backend](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend). (There are also two separate packages [techdocs-cli](https://github.com/backstage/backstage/tree/master/packages/techdocs-cli) and [techdocs-container](https://github.com/backstage/backstage/tree/master/packages/techdocs-container).) +You’ll find the code in [techdocs](https://github.com/backstage/backstage/tree/master/plugins/techdocs) (frontend) and [techdocs-backend](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend). (There are also two separate packages [techdocs-cli](https://github.com/backstage/techdocs-cli) and [techdocs-container](https://github.com/backstage/techdocs-container).) You’ll find issues to work on in the [issues queue](https://github.com/backstage/backstage/issues?q=is%3Aissue+is%3Aopen+label%3A%22docs-like-code%22+label%3A%22help+wanted%22), typically starting with TechDocs: and labeled with docs-like-code, some labeled good first issue. Feel free to add your own issues, of course. diff --git a/packages/techdocs-container/Dockerfile b/packages/techdocs-container/Dockerfile deleted file mode 100644 index c30db043cd..0000000000 --- a/packages/techdocs-container/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2020 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM python:3.8-alpine - - -RUN apk update && apk --no-cache add gcc musl-dev openjdk11-jdk curl graphviz ttf-dejavu fontconfig - -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 -RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.11 - -# Create script to call plantuml.jar from a location in path - -RUN echo $'#!/bin/sh\n\njava -jar '/opt/plantuml.jar' ${@}' >> /usr/local/bin/plantuml -RUN chmod 755 /usr/local/bin/plantuml - -ENTRYPOINT [ "mkdocs" ] diff --git a/packages/techdocs-container/README.md b/packages/techdocs-container/README.md deleted file mode 100644 index 53a518fa97..0000000000 --- a/packages/techdocs-container/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# techdocs-container - -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). - -## Getting Started - -Using the TechDocs CLI, we can invoke the latest version of `techdocs-container` via Docker Hub: - -```bash -npx techdocs-cli serve -``` - -## Local Development - -```bash -docker build . -t mkdocs:local-dev - -docker run -w /content -v $(pwd)/mock-docs:/content -p 8000:8000 -it mkdocs:local-dev serve -a 0.0.0.0:8000 -``` - -Then open up `http://localhost:8000` on your local machine. - -## Publishing - -This container is published on DockerHub - https://hub.docker.com/r/spotify/techdocs - -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. - -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. - -Note: We recommend using a specific version of the container instead of `latest` release for stability and avoiding unexpected changes. diff --git a/packages/techdocs-container/bin/scripts/plantuml b/packages/techdocs-container/bin/scripts/plantuml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/techdocs-container/mock-docs/.gitignore b/packages/techdocs-container/mock-docs/.gitignore deleted file mode 100644 index 45ddf0ae39..0000000000 --- a/packages/techdocs-container/mock-docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -site/ diff --git a/packages/techdocs-container/mock-docs/docs/index.md b/packages/techdocs-container/mock-docs/docs/index.md deleted file mode 100644 index 94a53acfa3..0000000000 --- a/packages/techdocs-container/mock-docs/docs/index.md +++ /dev/null @@ -1,99 +0,0 @@ -## 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. - -# The attack plan - -{% dot attack_plan.svg - digraph G { - rankdir=LR - Earth [peripheries=2] - Mars - Earth -> Mars - } -%} - -```graphviz dot attack_plan.svg -digraph G { - rankdir=LR - Earth [peripheries=2] - Mars - Earth -> Mars -} -``` - -# PlantUML Samples - -```plantuml classes="uml myDiagram" alt="Diagram placeholder" title="My diagram" -@startuml - Goofy -> MickeyMouse: calls - Goofy <-- MickeyMouse: responds -@enduml -``` - -:bulb: - -=== "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(); - } -``` - -```javascript -import { test } from 'something'; - -const addThingToThing = (a, b) a + b; -``` - - -*[MOCDOC]: Mock Documentation diff --git a/packages/techdocs-container/mock-docs/mkdocs.yml b/packages/techdocs-container/mock-docs/mkdocs.yml deleted file mode 100644 index d769fddfcf..0000000000 --- a/packages/techdocs-container/mock-docs/mkdocs.yml +++ /dev/null @@ -1,9 +0,0 @@ -site_name: 'mock-docs' -site_description: 'mock-docs site description' - -nav: - - Home: index.md - - SubDocs: '!include ./sub-docs/mkdocs.yml' - -plugins: - - techdocs-core diff --git a/packages/techdocs-container/mock-docs/sub-docs/docs/index.md b/packages/techdocs-container/mock-docs/sub-docs/docs/index.md deleted file mode 100644 index 65c6644ef8..0000000000 --- a/packages/techdocs-container/mock-docs/sub-docs/docs/index.md +++ /dev/null @@ -1 +0,0 @@ -### 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-container/mock-docs/sub-docs/mkdocs.yml b/packages/techdocs-container/mock-docs/sub-docs/mkdocs.yml deleted file mode 100644 index 4490ddbefa..0000000000 --- a/packages/techdocs-container/mock-docs/sub-docs/mkdocs.yml +++ /dev/null @@ -1,4 +0,0 @@ -site_name: subdocs - -nav: - - Home 2: 'index.md'