Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugo docs #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Buoy
buoy
*.yml
*.yaml

7 changes: 6 additions & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Architecture
---
title: "Architecture"
date: 2022-01-20T10:57:50-05:00
draft: true
weight: 1
---
**This document describes the high-level architecture of this project**

If you want to familiarize yourself with the code base and *generally* how it works, this is a good place to be.
Expand Down
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Contributing
---
title: "Contributing"
date: 2022-01-20T10:57:45-05:00
draft: false
weight: 2
---

## Fork and Pull Request Proccess

Expand Down
Empty file added docs/.hugo_build.lock
Empty file.
6 changes: 6 additions & 0 deletions docs/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

115 changes: 115 additions & 0 deletions docs/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
baseURL = "https://example.com"

languageCode = "en-us"
DefaultContentLanguage = "en"
title = "Buoy Documentation"
theme = "techdoc"

hasCJKLanguage = true
metaDataFormat = "yaml"

defaultContentLanguage = "en"
defaultContentLanguageInSubdir= false
enableMissingTranslationPlaceholders = false

[params]

# Source Code repository section
description = "A Mesh VPN that some friends and I made"
github_repository = "https://github.com/prairir/Buoy"
version = "0.9.7"

# Documentation repository section
# documentation repository (set edit link to documentation repository)
github_doc_repository = "https://github.com/prairir/Buoy"
github_doc_repository_path = ""

# Analytic section
google_analytics_id = "" # Your Google Analytics tracking id
tag_manager_container_id = "" # Your Google Tag Manager container id
google_site_verification = "" # Your Google Site Verification for Search Console

# Open Graph and Twitter Cards settings section
# Open Graph settings for each page are set on the front matter.
# See https://gohugo.io/templates/internal/#open-graph
# See https://gohugo.io/templates/internal/#twitter-cards
title = "Buoy"
images = ["images/logo.png"] # Open graph images are placed in `static/images`

# Theme settings section
# Theme color
# See color value reference https://developer.mozilla.org/en-US/docs/Web/CSS/color
custom_font_color = ""
custom_background_color = ""

# Documentation Menu section
# Menu style settings
menu_style = "open-menu" # "open-menu" or "slide-menu" or "" blank is as no sidebar

# Date format
dateformat = "" # default "2 Jan 2006"
# See the format reference https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference

# path name excluded from documentation menu
menu_exclusion = [
"archives",
"archive",
"blog",
"entry",
"post",
"posts",
]

# Algolia site search section
# See https://www.algolia.com/doc/
algolia_search_enable = true
algolia_indexName = "hugo-demo-techdoc"
algolia_appId = "7W4SAN4PLK"
algolia_apiKey = "cbf12a63ff72d9c5dc0c10c195cf9128" # Search-Only API Key

# Global menu section
# See https://gohugo.io/content-management/menus/
[menu]
[[menu.main]]
name = "Home"
url = "/"
weight = 1


# Markup configure section
# See https://gohugo.io/getting-started/configuration-markup/
[markup]
defaultMarkdownHandler = "goldmark"
[markup.goldmark.renderer]
unsafe= true
[markup.tableOfContents]
startLevel = 2
endLevel = 6
ordered = false

[outputs]
home = ["HTML", "RSS", "Algolia"]

# Algolia Search configure section
[outputFormats.Algolia]
baseName = "algolia"
mediaType = "application/json"
isPlainText = true
notAlternative = true

[params.algolia]
vars = [
"title",
"summary",
"content",
"date",
"publishdate",
"description",
"permalink",
"keywords",
"lastmod",
]
params = [
"tags",
"categories",
]
90 changes: 90 additions & 0 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
title: ""
date: 2022-01-21T16:21:24-05:00
draft: true
---
# Buoy

**WARNING: these instructions work best on a unix based system**

![logo](./logo.png)

We are using [water](https://github.com/songgao/water) because its really good.

## Configuration

Buoy uses YAML as the configuration langauge.

You can use `--config` to specify a configuration file. If you do not specify a location, it will look for `/etc/buoy/buoy.yaml`

All the configuration options can be specified with flags. You still need to point to a configuration file even if you specify with only flags.

We provide an example configuration called `buoy.example.yaml`

## Logging

By default, it logs to `/var/log/buoy.log`. It uses structured logging so it may be a bit unreadable.

To have nicer CLI output, use the `--log-cli` or `-l` flags

Both of these logging solutions are thread safe so you will drop any logs

## Building

To build, run

```sh
earthly +build
```

This will create a binary called `buoy`

## Run

Run with sudo permissions. It needs to create and manage network interfaces to run.

```sh
sudo ./buoy
```

run with printing

```sh
sudo ./buoy --log-cli
```

run with specified config

```sh
sudo ./buoy --config="buoy.yaml"
```

## Testing

We run all our tests inside earthly. This creates reproducible tests which are system agnostic.

To run all tests, run

```sh
earthly --allow-privileged +test
```

We need privileged container because some tests require it. Like the test `TestTunNew` requires a privileged container.

## Terminology

Buoy has a cool sea theme so we are gonna stick to it.

**NOTE: This will be in the format of `<what we call it> - <term name>`**

- fleet - network
- sonar - distrubted peer discovery protocol
- shanty - cmd

## Contributing

You can read all about contributing to this project in `CONTRIBUTING.md`

## Architecture

You can read about it in `ARCHITECTURE.md`
1 change: 1 addition & 0 deletions docs/content/architecture/_index.md
11 changes: 11 additions & 0 deletions docs/content/blog/hello_world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Hello_world"
date: 2017-10-17T14:00:45Z
draft: false
---

aaaaaa

vvvv

aaa
11 changes: 11 additions & 0 deletions docs/content/blog/hello_world1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Hello_world1"
date: 2017-11-17T14:00:45Z
draft: false
---

aaaaaa

vvvv

aaa
11 changes: 11 additions & 0 deletions docs/content/blog/hello_world2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Hello_world2"
date: 2017-12-17T14:00:45Z
draft: false
---

aaaaaa

vvvv

aaa
1 change: 1 addition & 0 deletions docs/content/contributing/_index.md
11 changes: 11 additions & 0 deletions docs/content/entry/hello_world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Hello_world"
date: 2017-10-17T14:00:45Z
draft: false
---

aaaaaa

vvvv

aaa
11 changes: 11 additions & 0 deletions docs/content/entry/hello_world1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Hello_world1"
date: 2017-11-17T14:00:45Z
draft: false
---

aaaaaa

vvvv

aaa
11 changes: 11 additions & 0 deletions docs/content/entry/hello_world2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Hello_world2"
date: 2017-12-17T14:00:45Z
draft: false
---

aaaaaa

vvvv

aaa
8 changes: 8 additions & 0 deletions docs/content/hello_world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Hello world!"
date: 2017-10-17T14:00:45Z
draft: false
weight: 11
---

Hello world!
12 changes: 12 additions & 0 deletions docs/content/posts/hello_world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Hello_world"
date: 2017-10-17T14:00:45Z
draft: false
weight: 11
---

aaaaaa

vvvv

aaa
6 changes: 6 additions & 0 deletions docs/content/posts/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Test"
date: 2022-01-20T11:08:13-05:00
draft: true
---

Binary file added docs/static/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/images/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/images/pexels-photo-196666.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/themes/techdoc/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2

[*.{html,js,json,yml,xml,toml}]
indent_style = space

[*.md]
trim_trailing_whitespace = false
Loading