Skip to content

Commit e7c344a

Browse files
alexrashedthrau
andauthored
add more local dev information to README (#123)
Co-authored-by: Thomas Rausch <[email protected]>
1 parent cc82180 commit e7c344a

File tree

2 files changed

+44
-23
lines changed

2 files changed

+44
-23
lines changed

.github/workflows/markdown.links.config.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"ignorePatterns": [
3-
{
4-
"pattern": "https://kinesis.us-east-1.amazonaws.com/"
5-
},
3+
{
4+
"pattern": "https://kinesis.us-east-1.amazonaws.com/"
5+
},
66
{
77
"pattern": "http://(.*)localhost(.*)"
88
},
@@ -18,5 +18,5 @@
1818
{
1919
"pattern": "&quot;$"
2020
}
21-
]
21+
]
2222
}

README.md

+40-19
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,61 @@
1-
docs.localstack.cloud
1+
LocalStack Docs
22
=====================
33

4-
Repository for docs.localstack.cloud
4+
Repository for [docs.localstack.cloud](https://docs.localstack.cloud).
55

66

7-
get started
7+
Getting Started
88
-----------
99

10-
### clone repo
10+
### Basics
11+
LocalStack Docs is using the following technology stack:
12+
- [Hugo](https://gohugo.io) to generate the static site.
13+
- [Docsy](https://docsy.dev) as a theme for Hugo.
14+
- [GitHub Pages](https://pages.github.com/) to automatically deploy every commit on the `main` branch of this repository on [docs.localstack.cloud](https://docs.localstack.cloud).
1115

12-
clone the repoitory and init submodules recursively (`themes/docsy` is a submodule that again has submodules for vendored assets like fontawesome).
16+
17+
### Clone the repo
18+
Clone this repository and initialize the Git submodules recursively (`themes/docsy` is a submodule that again has submodules for vendored assets like fontawesome).
1319

1420
git clone --recurse-submodules --depth 1 [email protected]:localstack/docs.git
1521

16-
this performs a shallow clone, which leads to only the main branch being configured for your remote.
22+
This performs a shallow clone, which leads to only the main branch being configured for your remote.
1723
To be able to pull/push from/to all branches, please run:
1824

1925
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
2026

21-
or
27+
or:
2228

2329
git clone [email protected]:localstack/docs.git
2430
cd docs
2531
git submodule update --init --recursive
2632

27-
### install hugo
28-
29-
[install hugo](https://gohugo.io/getting-started/installing). Make sure to install the _extended version_.
33+
### Install Hugo
34+
LocalStack Docs is based on the [Hugo static site generator](https://gohugo.io).
3035

36+
In order to contribute to LocalStack Docs, you need to [install Hugo](https://gohugo.io/getting-started/installing) in order to verify your changes. Make sure to install the _extended_ version of Hugo.
3137

32-
### run locally
38+
### Run locally
39+
Once you have Hugo installed, you can start your local server with the following command:
3340

34-
npm install
35-
hugo server
41+
hugo serve
3642

37-
or run in developer mode with automatic reload
43+
or run in developer mode with automatic reload:
3844

39-
hugo server --watch=true --disableFastRender -D
45+
hugo serve --watch=true --disableFastRender -D
4046

41-
alternatively:
47+
Once the server is started, the locally served Docs are available at http://localhost:1313.
4248

43-
npm run dev
49+
### Writing content
50+
The whole site is generated with Hugo, a powerful static-site generator.
4451

52+
You can find an extensive documentation on how to use Hugo [in their docs](https://gohugo.io/documentation/), however most of the content is written in plain Markdown.
4553

54+
Make sure to follow the best practices below when contributing content.
4655

4756
## Best Practices
4857

49-
Please follow these best practices when writing documentation here:
58+
Please follow these best practices when writing documentation in this repository:
5059
- Use the custom `command` shortcode for all one-liner commands (also when their output is presented). Do not use it for bash scripts with comments. You can find a more detailed description here: https://github.com/localstack/docs/pull/55
5160
- Use the [`ref` or `relref` shortcode](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) when creating non-external links (but still use the markdown native image linking, ref doesn't work there).
5261
You can either use `ref` or `relref`, the point is to have compile time internal-link checks (which works for both).
@@ -67,4 +76,16 @@ Please follow these best practices when writing documentation here:
6776
If you want to resize the image, use the `figure` or `img` shortcode. For example:
6877
`{{< img src="cockpit-init-check.png" class="img-fluid shadow rounded" width="150px" >}}`
6978

70-
PS.: Feel free to add more best practices here (also give us a heads-up in [#sig-docs](https://localstack-cloud.slack.com/archives/C02FZH6UB2A)).
79+
PS.: Feel free to add more best practices here.
80+
81+
## Troubleshooting
82+
This section covers common issues when working with LocalStack Docs:
83+
### Missing shortcodes
84+
Example error:
85+
```
86+
Start building sites …
87+
hugo v0.88.1-5BC54738+extended linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio
88+
Error: Error building site: "/home/localstack/Repos/docs-test/content/en/get-started/_index.md:57:1": failed to extract shortcode: template for shortcode "alert" not found
89+
Built in 45 ms
90+
```
91+
Make sure to correctly clone and initialize the git submodules of this repo. For details see the section "[Clone the repo](#clone-the-repo)" above.

0 commit comments

Comments
 (0)