You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I"�(<p>TechDocs is Spotify’s homegrown docs-like-code solution built directly into Backstage. This means engineers write their documentation in Markdown files which live together with their code. In this post we will walk you through how to setup Backstage and Techdocs.</p>
2
+
3
+
<p><strong>Table of contents</strong></p>
4
+
5
+
<ul>
6
+
<li>Introduction.</li>
7
+
<li>Basic concepts and structure of backstage and techdocs.</li>
<p>Backstage is a platform for building developer portals.</p>
18
+
19
+
<p>Its main benefit is allowing you to ship high quality code fast.</p>
20
+
21
+
<p>The main features you get out of the box are</p>
22
+
23
+
<ul>
24
+
<li>Service catalog.</li>
25
+
<li>Software templates.</li>
26
+
<li>Plugins which allow you to extend backstage functionality.</li>
27
+
<li>Techdocs, which is the focus of this post.</li>
28
+
</ul>
29
+
30
+
<p>These features allow you to create standards and best practices across teams. It increases the speed of development. It creates a good developer experience for everyone who uses it. You centralise all your tools and info in one place.</p>
31
+
32
+
<p>In this post I will take you through the following</p>
33
+
34
+
<ul>
35
+
<li>Learn basic concepts and structure of backstage and techdocs</li>
36
+
<li>Install Backstage</li>
37
+
<li>Setup tech docs</li>
38
+
<li>Creating and publishing documentation.</li>
39
+
<li>All on local machine</li>
40
+
</ul>
41
+
42
+
<h2 id="basics-concepts-and-structures-of-backstage-and-techdocs"><strong>Basics concepts and structures of backstage and techdocs</strong></h2>
43
+
44
+
<p>The focus of this article is techdocs so i will go through the other main features at a high level.</p>
45
+
46
+
<ul>
47
+
<li>Service catalog. It keeps track of ownership and metadata for all the software in your ecosystem. it does this by putting metadata in YAML files stored together with your code. You process these files and then you can visualise the catalog in backstage. This will enable your teams to manage and maintain the software they own. it also makes the software discoverable.</li>
48
+
<li>Software templates - This feature allows you to create templates or skeletons of code. These templates are published to github.</li>
49
+
<li>Plugins - Allow you to integrate third part tools or any kind of infrastructure into backstage. They are open source and you can view a list <a href="https://backstage.io/plugins">here</a></li>
50
+
<li>Techdocs- yay, finally, why we are here. Techdocs is Spotify’s homegrown docs like code solution. it allows the user to store documentation to near code thus allowing it to be easily discovered.</li>
51
+
</ul>
52
+
53
+
<p>When you deploy backstage with Techdocs enabled you get a basic out of the box experience.</p>
54
+
55
+
<p>At its core it is MKDocs plugin and other MkDocs plugins and Python Markdown extensions which allows it to standardize the configuration of MkDocs used for TechDocs.</p>
56
+
57
+
<p>You can see the code <a href="https://github.com/backstage/mkdocs-techdocs-core">here</a></p>
58
+
59
+
<p>The other moving parts are</p>
60
+
61
+
<ul>
62
+
<li>The techdocs container which can be found on Docker-hub, It builds static content through MKDocs</li>
63
+
<li>The Techdocs backend plugin This is the backend part of the techdocs plugin.</li>
64
+
<li>The Techdocs CLI, Command line tool for managing techdocs sites in backstage</li>
65
+
<li>The Techdocs reader, it fetch’s remotes pages , run transformers against them and renders them in a shadow DOM</li>
66
+
<li>Transformers API is a function that takes in parameters from the reader component and returns a function which gets passed the dom of the fetched page.</li>
<p>When you open a techdocs sites a request is made the techdocs reader calls the techdocs-backend with the entity id and the path of the current page, the response contains the static content</p>
74
+
75
+
<p>The static content contains HTML and CSS, javascript is removed for security reasons</p>
76
+
77
+
<p>Transforms are then applied which modiy the generated static HTML files for a number of reasons like removing certain headers etc</p>
78
+
79
+
<p>For the following instructions we will use the local file storage but it is better to use cloud storage like S3.</p>
<p>Type in the owner, the Github repo you want to call it , ensure their is no Github repo that exists with the same name or the Templater will fail</p>
<p>You now have techdocs up and running on your machine, if you want to view the files manually they are located at the following location on you machine</p>
<p>In summary, we went through an introduction on backs stage, techdocs and how to publish techdocs locally and to cloud storage via s3. if you want to learn more about backstage i would recommend visiting <a href="https://backstage.io">https://backstage.io</a> or if you want to learn more about techdocs then <a href="https://backstage.io/docs/features/techdocs/techdocs-overview">https://backstage.io/docs/features/techdocs/techdocs-overview</a></p>
199
+
200
+
<p>If you like the idea of backstage but don’t want the inconvenience of managing backstage yourself then i would check out <a href="https://roadie.io">https://roadie.io</a>.</p>
Copy file name to clipboardExpand all lines: _posts/articles/2021-02-14-setting-up-techdocs-on-backstage.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,4 +207,4 @@ You will also see the content in the S3 bucket.
207
207
208
208
In summary, we went through an introduction on backs stage, techdocs and how to publish techdocs locally and to cloud storage via s3. if you want to learn more about backstage i would recommend visiting [https://backstage.io](https://backstage.io) or if you want to learn more about techdocs then [https://backstage.io/docs/features/techdocs/techdocs-overview](https://backstage.io/docs/features/techdocs/techdocs-overview)
209
209
210
-
If you like the idea of backstage but don't want the inconvenience of managing backstage yourself then i would check out Roadie.io.
210
+
If you like the idea of backstage but don't want the inconvenience of managing backstage yourself then i would check out [https://roadie.io](https://roadie.io).
0 commit comments