Skip to content

Commit

Permalink
📖 Use hugo/docsy for docs
Browse files Browse the repository at this point in the history
Fixes: #235
Fixes: #233
Fixes: #232
Fixes: #231
Fixes: #230
Fixes: #229
Fixes: #228
Fixes: #193
Fixes: #192

Signed-off-by: mudler <mudler@c3os.io>
  • Loading branch information
mudler committed Nov 13, 2022
1 parent 536801a commit 8db75cb
Show file tree
Hide file tree
Showing 115 changed files with 1,917 additions and 7,569 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ docs/dist
docs/.vscode
coverage.out
.DS_Store
/docs/bin/
/docs/public/
/docs/resources/
/docs/node_modules/
/docs/tech-doc-hugo

# editor and IDE paraphernalia
.idea
10 changes: 7 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "docs/themes/hugo-theme-learn"]
path = docs/themes/hugo-theme-learn
url = https://github.com/matcornic/hugo-theme-learn.git

[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/google/docsy
[submodule "docs/themes/docsy"]
path = docs/themes/docsy
url = https://github.com/google/docsy.git
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kairos.io
8 changes: 2 additions & 6 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
export HUGO_VERSION?=0.91.2
export HUGO_VERSION?=0.105.0
export HUGO_PLATFORM?=Linux-64bit

export ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
export ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

.DEFAULT_GOAL := build

.PHONY: build
build:
scripts/build.sh
cp -r dist/* public
ifneq (,$(wildcard ./CNAME))
cp -rf CNAME public/
endif

.PHONY: serve
serve:
Expand Down
50 changes: 15 additions & 35 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,25 @@
# Astro Starter Kit: Minimal
# :book: Kairos documentation

```
npm init astro -- --template minimal
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
The Kairos documentation uses [docsy](https://docsy.dev).

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## Test your changes

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:
After cloning the repo (with submodules), just run `make serve` to test the website locally.

```
/
├── public/
├── src/
│ └── pages/
│ └── index.astro
└── package.json
$> git clone --recurse-submodule https://github.com/kairos-io/kairos
$> cd kairos/docs
$> make serve
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.
If you have a local copy already checked out, sync the submodules:

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :--------------------- | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro --help` | Get help using the Astro CLI |
```
$> git submodule update --init --recursive --depth 1
```

## 👀 Want to learn more?
To run the website locally in other platforms, e.g. MacOS:

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
```
$> HUGO_PLATFORM=macOS-64bit make serve
```
Empty file added docs/assets/css/sections.css
Empty file.
21 changes: 21 additions & 0 deletions docs/assets/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions docs/assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Add styles or override variables from the theme here.
*/

$primary: #ee5007;
$secondary: #e1e5ee;
$enable-gradients: true;
$enable-rounded: false;
$enable-shadows: true;
$google_font_name: "Noto Sans";
$google_font_family: "Noto+Sans:0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700";
$td-enable-google-fonts: false;


a {
color: #009ffd
}

a:hover {
color: #03153a
}

// Disables text "Kairos" in the menu. Logo contains it already
.td-navbar .navbar-brand__name {
display: none;
}

11 changes: 0 additions & 11 deletions docs/astro.config.mjs

This file was deleted.

146 changes: 146 additions & 0 deletions docs/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
baseURL = "https://kairos.io"
title = "Kairos"

enableRobotsTXT = true

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["docsy"]

# Will give values to .Lastmod etc.
enableGitInfo = true

# Language settings
contentDir = "content/en"
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = false
# Useful when translating.
enableMissingTranslationPlaceholders = true

disableKinds = ["taxonomy", "taxonomyTerm"]

# Highlighting config
pygmentsCodeFences = true
pygmentsUseClasses = false
# Use the new Chroma Go highlighter in Hugo.
pygmentsUseClassic = false
#pygmentsOptions = "linenos=table"
# See https://help.farbox.com/pygments.html
pygmentsStyle = "tango"

# Configure how URLs look like per section.
[permalinks]
blog = "/:section/:year/:month/:day/:slug/"

## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
[blackfriday]
plainIDAnchors = true
hrefTargetBlank = true
angledQuotes = false
latexDashes = true

# Image processing configuration.
[imaging]
resampleFilter = "CatmullRom"
quality = 75
anchor = "smart"

[services]
[services.googleAnalytics]
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
id = "UA-00000000-0"

# Language configuration

[languages]
[languages.en]
title = "Kairos"
description = "The immutable edge Kubernetes"
languageName ="English"
# Weight used for sorting.
weight = 1

[[menu.main]]
name = "Contribution guidelines"
weight = 50
url = "https://github.com/kairos-io/kairos/contribute"
pre = "<i class='fab fa-github'></i>"
post = ""
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true

# Everything below this are Site Params

[params]
copyright = "Kairos authors"
privacy_policy = "https://policies.google.com/privacy"

# First one is picked as the Twitter card image if not set on page.
# images = ["images/project-illustration.png"]

# Menu title if your navbar has a versions selector to access old versions of your site.
# This menu appears only if you have at least one [params.versions] set.
version_menu = "Releases"

# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
github_repo = "https://github.com/kairos-io/kairos"
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
github_project_repo = "https://github.com/kairos-io/kairos"

# Specify a value here if your content directory is not in your repo's root directory
github_subdir = "docs"
github_branch = "master"
# Google Custom Search Engine ID. Remove or comment out to disable search.
#gcs_engine_id = "011737558837375720776:fsdu1nryfng"

# Enable Algolia DocSearch
algolia_docsearch = false

# Enable Lunr.js offline search
offlineSearch = true

# User interface configuration
[params.ui]
# Enable to show the side bar menu in its compact state.
sidebar_menu_compact = false
# Set to true to disable breadcrumb navigation.
breadcrumb_disable = true
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
sidebar_search_disable = false
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
navbar_logo = true
# Set to true to disable the About link in the site footer
footer_about_disable = false

# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
# add "hide_feedback: true" to the page's front matter.
[params.ui.feedback]
enable = true
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
yes = 'Awesome! Glad to hear it! Please <a href="https://github.com/kairos-io/kairos/issues/new">tell us how we can improve</a>.'
no = 'Oh snap! Sorry to hear that. Please <a href="https://github.com/kairos-io/kairos/issues/new">tell us how we can improve</a>.'

[params.links]
[[params.links.developer]]
name = "GitHub"
url = "https://github.com/kairos-io/kairos"
icon = "fab fa-github"
desc = "Development takes place here!"
[[params.links.user]]
name = "Matrix"
url = "https://matrix.to/#/#kairos-io:matrix.org"
icon = "fa fa-message"
desc = "Join us on Matrix!"
[[params.links.user]]
name = "Github discussions"
url = "https://github.com/kairos-io/kairos/discussions"
icon = "fa fa-comments"
desc = "Questions?"
[[params.links.user]]
name = "Office hours calendar"
url = "https://calendar.google.com/calendar/embed?src=c_6d65f26502a5a67c9570bb4c16b622e38d609430bce6ce7fc1d8064f2df09c11%40group.calendar.google.com&ctz=Europe%2FRome"
icon = "fa fa-calendar"
desc = "Join us in our Office hours!"
6 changes: 6 additions & 0 deletions docs/content/en/community/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Community
menu:
main:
weight: 40
---
8 changes: 8 additions & 0 deletions docs/content/en/docs/Advanced/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Advanced"
linkTitle: "Advanced"
weight: 5
description: >
Advanced settings
---

Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
---
layout: "../../layouts/docs/Layout.astro"
title: "Configuring a node after install"
index: 3
title: "Pushing configuration to a node after installation"
linkTitle: "After install"
weight: 1
description: >
---

import Info from "../../components/Info.astro";

# Configuration after installation

Kairos configuration mechanism is based on the `cloud-config `file given during installation, however, it's possible to extend the configuration by providing additional cloud-configs in either `/oem` or `/usr/local/cloud-config`.

By default, `kairos` reads in lexicographic order YAML cloud-config files in the directories above, indeed, after installation you should be able to see the configuration generated by the interactive-installer as `/oem/99_custom.yaml` in the system.
Expand Down Expand Up @@ -43,11 +40,11 @@ To install [system-upgrade-controller](https://github.com/rancher/system-upgrade
kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.9.1/system-upgrade-controller.yaml
```

<Info>
{{% alert title="Note" %}}

Several roll-out strategies can be used with `system-upgrade-controller` which are not illustrated here in this example. For instance, it can be specified in the number of hosts which are running the upgrades, filtering by labels, and more. [Refer to the project documentation](https://github.com/rancher/system-upgrade-controller) on how to create efficient strategies to roll plans on the nodes. In the example above, the plans are applied to every host of the cluster, one-by-one in sequence.

</Info>
{{% /alert %}}

The following pushes a new cloud config over the `/oem` directory and reboots the node:

Expand Down
Loading

0 comments on commit 8db75cb

Please sign in to comment.