Skip to content

Commit e56f8ed

Browse files
committed
feat: Bootstrap docusaurus
1 parent a51b210 commit e56f8ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+16606
-1
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

+33-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
# docs
1+
# Golioth Docs
2+
3+
This website is built using [Docusaurus 2](https://v2.docusaurus.io/).
4+
5+
## Installation
6+
7+
```console
8+
npm install
9+
```
10+
11+
## Local Development
12+
13+
```console
14+
npm start
15+
```
16+
17+
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```console
22+
npm build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
```console
30+
GIT_USER=<Your GitHub username> USE_SSH=true npm deploy
31+
```
32+
33+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

blog/2021-02-04-welcome.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
slug: welcome
3+
title: Welcome
4+
author: Alvaro Viebrantz
5+
author_title: Founding Engineer @ Golioth
6+
author_url: https://github.com/alvarowolfx
7+
author_image_url: https://avatars.githubusercontent.com/u/1615543?s=460&u=1cd344ceba4fd67df01cd199bfad097e100196c6&v=4
8+
tags: [hello]
9+
---
10+
11+
Hello World.

docs/doc1.md

+202
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
id: doc1
3+
title: Style Guide
4+
sidebar_label: Style Guide
5+
---
6+
7+
You can write content using [GitHub-flavored Markdown syntax](https://github.github.com/gfm/).
8+
9+
## Markdown Syntax
10+
11+
To serve as an example page when styling markdown based Docusaurus sites.
12+
13+
## Headers
14+
15+
# H1 - Create the best documentation
16+
17+
## H2 - Create the best documentation
18+
19+
### H3 - Create the best documentation
20+
21+
#### H4 - Create the best documentation
22+
23+
##### H5 - Create the best documentation
24+
25+
###### H6 - Create the best documentation
26+
27+
---
28+
29+
## Emphasis
30+
31+
Emphasis, aka italics, with _asterisks_ or _underscores_.
32+
33+
Strong emphasis, aka bold, with **asterisks** or **underscores**.
34+
35+
Combined emphasis with **asterisks and _underscores_**.
36+
37+
Strikethrough uses two tildes. ~~Scratch this.~~
38+
39+
---
40+
41+
## Lists
42+
43+
1. First ordered list item
44+
1. Another item
45+
- Unordered sub-list.
46+
1. Actual numbers don't matter, just that it's a number
47+
1. Ordered sub-list
48+
1. And another item.
49+
50+
- Unordered list can use asterisks
51+
52+
* Or minuses
53+
54+
- Or pluses
55+
56+
---
57+
58+
## Links
59+
60+
[I'm an inline-style link](https://www.google.com/)
61+
62+
[I'm an inline-style link with title](https://www.google.com/ "Google's Homepage")
63+
64+
[I'm a reference-style link][arbitrary case-insensitive reference text]
65+
66+
[You can use numbers for reference-style link definitions][1]
67+
68+
Or leave it empty and use the [link text itself].
69+
70+
URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com/ or <http://www.example.com/> and sometimes example.com (but not on GitHub, for example).
71+
72+
Some text to show that the reference links can follow later.
73+
74+
[arbitrary case-insensitive reference text]: https://www.mozilla.org/
75+
[1]: http://slashdot.org/
76+
[link text itself]: http://www.reddit.com/
77+
78+
---
79+
80+
## Images
81+
82+
Here's our logo (hover to see the title text):
83+
84+
Inline-style: ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
85+
86+
Reference-style: ![alt text][logo]
87+
88+
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
89+
90+
Images from any folder can be used by providing path to file. Path should be relative to markdown file.
91+
92+
![img](../static/img/logo.png)
93+
94+
---
95+
96+
## Code
97+
98+
```javascript
99+
var s = "JavaScript syntax highlighting";
100+
alert(s);
101+
```
102+
103+
```python
104+
s = "Python syntax highlighting"
105+
print(s)
106+
```
107+
108+
```
109+
No language indicated, so no syntax highlighting.
110+
But let's throw in a <b>tag</b>.
111+
```
112+
113+
```js {2}
114+
function highlightMe() {
115+
console.log("This line can be highlighted!");
116+
}
117+
```
118+
119+
---
120+
121+
## Tables
122+
123+
Colons can be used to align columns.
124+
125+
| Tables | Are | Cool |
126+
| ------------- | :-----------: | -----: |
127+
| col 3 is | right-aligned | \$1600 |
128+
| col 2 is | centered | \$12 |
129+
| zebra stripes | are neat | \$1 |
130+
131+
There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
132+
133+
| Markdown | Less | Pretty |
134+
| -------- | --------- | ---------- |
135+
| _Still_ | `renders` | **nicely** |
136+
| 1 | 2 | 3 |
137+
138+
---
139+
140+
## Blockquotes
141+
142+
> Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.
143+
144+
Quote break.
145+
146+
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote.
147+
148+
---
149+
150+
## Inline HTML
151+
152+
<dl>
153+
<dt>Definition list</dt>
154+
<dd>Is something people use sometimes.</dd>
155+
156+
<dt>Markdown in HTML</dt>
157+
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
158+
</dl>
159+
160+
---
161+
162+
## Line Breaks
163+
164+
Here's a line for us to start with.
165+
166+
This line is separated from the one above by two newlines, so it will be a _separate paragraph_.
167+
168+
This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the _same paragraph_.
169+
170+
---
171+
172+
## Admonitions
173+
174+
:::note
175+
176+
This is a note
177+
178+
:::
179+
180+
:::tip
181+
182+
This is a tip
183+
184+
:::
185+
186+
:::important
187+
188+
This is important
189+
190+
:::
191+
192+
:::caution
193+
194+
This is a caution
195+
196+
:::
197+
198+
:::warning
199+
200+
This is a warning
201+
202+
:::

docs/doc2.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: doc2
3+
title: Document Number 2
4+
---
5+
6+
This is a link to [another document.](doc3.md) This is a link to an [external page.](http://www.example.com/)

docs/doc3.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
id: doc3
3+
title: This is Document Number 3
4+
---
5+
6+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum. Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus. Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
7+
8+
Duis et egestas libero, imperdiet faucibus ipsum. Sed posuere eget urna vel feugiat. Vivamus a arcu sagittis, fermentum urna dapibus, congue lectus. Fusce vulputate porttitor nisl, ac cursus elit volutpat vitae. Nullam vitae ipsum egestas, convallis quam non, porta nibh. Morbi gravida erat nec neque bibendum, eu pellentesque velit posuere. Fusce aliquam erat eu massa eleifend tristique.
9+
10+
Sed consequat sollicitudin ipsum eget tempus. Integer a aliquet velit. In justo nibh, pellentesque non suscipit eget, gravida vel lacus. Donec odio ante, malesuada in massa quis, pharetra tristique ligula. Donec eros est, tristique eget finibus quis, semper non nisl. Vivamus et elit nec enim ornare placerat. Sed posuere odio a elit cursus sagittis.
11+
12+
Phasellus feugiat purus eu tortor ultrices finibus. Ut libero nibh, lobortis et libero nec, dapibus posuere eros. Sed sagittis euismod justo at consectetur. Nulla finibus libero placerat, cursus sapien at, eleifend ligula. Vivamus elit nisl, hendrerit ac nibh eu, ultrices tempus dui. Nam tellus neque, commodo non rhoncus eu, gravida in risus. Nullam id iaculis tortor.
13+
14+
Nullam at odio in sem varius tempor sit amet vel lorem. Etiam eu hendrerit nisl. Fusce nibh mauris, vulputate sit amet ex vitae, congue rhoncus nisl. Sed eget tellus purus. Nullam tempus commodo erat ut tristique. Cras accumsan massa sit amet justo consequat eleifend. Integer scelerisque vitae tellus id consectetur.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
id: getting-started
3+
title: Getting Started
4+
slug: /
5+
---
6+
7+
import TOCInline from '@theme/TOCInline';
8+
9+
<TOCInline toc={toc} />
10+
11+
- [Installing](/docs/installing)

docs/getting-started/installing.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
id: installing
3+
title: Installing
4+
---
5+
6+
### Download Pre-built CLIs
7+
8+
You can download the latest tools on the [Github Releases Page](https://github.com/golioth/golioth/releases). Binaries are available for Linux, macOS and Windows.
9+
10+
### Building some source (Maintainers Only)
11+
12+
You need [Go](https://golang.org) installed on your system. We recommend using Go 1.15 to build from source.
13+
14+
Clone the [golioth](https://github.com/golioth/golioth) repository from Github.
15+
16+
Them run the command `make install` on the root folder to install the `goliothd`, [goliothctl](/docs/goliothctl/goliothctl) and [gurl](/docs/gurl/gurl) command line tools.

docs/goliothctl/goliothctl.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
id: goliothctl
3+
date: 2021-02-05T11:04:45-04:00
4+
title: "goliothctl"
5+
slug: goliothctl
6+
sidebar_label: goliothctl
7+
url: /docs/goliothctl/goliothctl/
8+
hide_title: true
9+
---
10+
## goliothctl
11+
12+
goliothctl is a golioth API cli
13+
14+
### Synopsis
15+
16+
You can access golioth API through this cli.
17+
```jsx live
18+
function Clock(props) {
19+
const [date, setDate] = useState(new Date());
20+
useEffect(() => {
21+
var timerID = setInterval(() => tick(), 1000);
22+
23+
return function cleanup() {
24+
clearInterval(timerID);
25+
};
26+
});
27+
28+
function tick() {
29+
setDate(new Date());
30+
}
31+
32+
return (
33+
<div>
34+
<h2>It is {date.toLocaleTimeString()}.</h2>
35+
</div>
36+
);
37+
}
38+
```
39+
40+
```
41+
goliothctl [flags]
42+
```
43+
44+
### Options
45+
46+
```
47+
--apiUrl string golioth api server url (default "https://api.golioth.dev")
48+
--config string config file (default is $HOME/golioth/.goliothctl.yaml)
49+
-h, --help help for goliothctl
50+
--projectId string golioth project id
51+
```
52+
53+
### SEE ALSO
54+
55+
* [goliothctl config](/docs/goliothctl/goliothctl_config/) - Set global goliothctl config
56+
* [goliothctl device](/docs/goliothctl/goliothctl_device/) - Access device information
57+
* [goliothctl login](/docs/goliothctl/goliothctl_login/) - Authenticate with golioth system
58+
* [goliothctl logout](/docs/goliothctl/goliothctl_logout/) - Remove credentials from local config
59+
* [goliothctl project](/docs/goliothctl/goliothctl_project/) - Access project information
60+
* [goliothctl provision](/docs/goliothctl/goliothctl_provision/) - Provision devices and credentials
61+
* [goliothctl updates](/docs/goliothctl/goliothctl_updates/) - Send/Trigger device updates
62+

0 commit comments

Comments
 (0)