Skip to content

Commit

Permalink
Move to docusaurus
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Dubenko <oldubenko@microsoft.com>
  • Loading branch information
sniok committed Jun 24, 2024
1 parent 0f14b6d commit da8ac81
Show file tree
Hide file tree
Showing 724 changed files with 45,437 additions and 30,472 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/azure-static-web-apps-white-bush-0475e2d03.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- main
schedule:
# Run at 00:01 daily so it picks up any docs changes and updates the news stripe
- cron: '01 0 * * *'
- cron: "01 0 * * *"

workflow_dispatch:
# For manual dispatch
Expand All @@ -23,19 +23,7 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.15.4'
id: go
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.89.0'
extended: true
- name: Build website
run: |
make

- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
Expand All @@ -45,9 +33,8 @@ jobs:
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "public" # App source code path
api_location: "" # Api source code path - optional
skip_app_build: true
app_location: "/" # App source code path
output_location: "build" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand All @@ -60,4 +47,4 @@ jobs:
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WHITE_BUSH_0475E2D03 }}
action: "close"
action: "close"
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
109 changes: 21 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,41 @@
# Headlamp Website
# Website

Headlamp's website is built with [Hugo](https://gohugo.io/).
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Installing Hugo

You should install Hugo Extended instead of the regular Hugo version.

So download [Hugo Extended](https://github.com/gohugoio/hugo/releases)
from the releases page, and/or follow
[these instructions](https://gohugo.io/getting-started/installing/)
in order to install it.

## Adding content

Currently, you'll need to edit the text files under `content` in this repo to modify the site.

### Blog content

In order to add content for the blog you can use the `hugo new` command. The format is as follow.

`hugo new blog/YEAR-MONTH-DAY-example-content/index.md`

The following command will create a new blog post with the [front matter](https://gohugo.io/content-management/front-matter/) defined in the default [archetype](https://gohugo.io/content-management/archetypes/) from the `./archetype` directory.

The default front matter almost always needs to be modified to a category and tags. Here's an example.
### Installation

```
---
title: "Example Content"
date: 2018-10-26T03:51:27+02:00
draft: true
tags:
- tag1
- tag1
categories:
- Announcement
---
$ yarn
```

*TODO: Add more content sections (events, job postings, etc.)*

## Testing

You should always test your changes locally before creating a pull request. Once you do createi a branch or a pull request, we use Netlify to create previes of the changes so that reviewers and yourself can easily review the changes.

### Testing locally

To test locally run the following command.
### Local Development

`make run`

The above command will run a server with the the site available at `http://localhost:1313`. It will also watch for any changes made to the site and regenerate and reload the site when changes are detected. In addition, it disables some caching that can sometimes have confusing results.

### Testing Pull requests

Each pull request will run some checks and create a new preview of the changes that can be access by clicking on the Github pull request status section.

### Testing documentation locally

If you are working on documentation and would like to see the changes
be reflected in a local run of the website, then you need to generate a
module to import the docs and run the website locally with it.

You can use the `tools/preview_docs.sh` script for conveniently generating
an import module, e.g.:
```
$ yarn start
```

`./tools/preview_docs.sh ../headlamp/docs new_latest`
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

(this creates a `tmp_modules.yaml`)
### Build

and then start the local server again with `make run`.
```
$ yarn build
```

You can then view the changes in the `new_latest` version of the docs by accessing the site at the server.
ex. `http://localhost:1313/docs/new_latest`.
This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Changing the published documentation
### Deployment

The documentation is set under `params.docs` in [config.yaml](./config.yaml) and
should look similar to:
Using SSH:

```
github_edit_url: https://github.com/kinvolk/headlamp/edit/main/docs/
issues_url: https://github.com/kinvolk/kinvolk/issues/new?labels=kind/docs
external_docs:
- repo: https://github.com/kinvolk/headlamp.git
name: "latest"
branch: "main"
dir: "docs"
$ USE_SSH=true yarn deploy
```

If you want to add a new version of the documentation, this can be done by adding a new entry to external_docs:
Not using SSH:

```
external_docs:
- repo: https://github.com/kinvolk/headlamp.git
name: "latest"
branch: "main"
dir: "docs"
- repo: https://github.com/kinvolk/headlamp.git
name: "old"
branch: "tag-1.2.3"
dir: "docs"
$ GIT_USER=<Your GitHub username> yarn deploy
```

This will pull the docs that were versioned by the `tag-1.2.3` and place them under a version called `old`.

By default, the first version in the list of `external_docs` is considered to be
the latest version and so it is the one linked to automatically in the site.
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.
Binary file removed assets/images/round-dots.png
Binary file not shown.
114 changes: 0 additions & 114 deletions assets/scss/custom.scss

This file was deleted.

3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
+++
authors = ["Joaquim Rocha", "Andy Randall"]
date = "2020-11-16T15:33:00+00:00"
description = "Shining a light on the Kubernetes User Experience with Headlamp"
draft = false
tags = ["open source", "user-interfaces", "kubernetes", "headlamp"]
title = "Shining a light on the Kubernetes User Experience with Headlamp"
postImage = "tram_night_headlight.jpg"
postImageTooltip = "Image by Lokesh Anand"
subtitle = "Announcing a new open source Kubernetes user interface project, Headlamp"
+++
---
authors: [joaquim-rocha, andrew-randall]
description: "Shining a light on the Kubernetes User Experience with Headlamp"
draft: false
tags: ["open source", "user-interfaces", "kubernetes", "headlamp"]
title: "Shining a light on the Kubernetes User Experience with Headlamp"
image: ./tram_night_headlight.jpg
subtitle: "Announcing a new open source Kubernetes user interface project, Headlamp"
---

If you’ve ever seen a Kubernetes demo, it probably involved a terminal and someone typing commands using kubectl and arcane yaml configuration files. This might be a powerful workflow for experts, but in an age when everything has a slick web interface, it is not the most accessible user experience. It **steepens the learning curve** for those new to Kubernetes, and **presents a barrier** to occasional users.

Of course, there are several graphical user interfaces available for Kubernetes, including the _Kubernetes Dashboard_ project that is part of upstream Kubernetes itself. However, when we researched the landscape, we couldn’t find a solution that covered everything we were looking for. Specifically, our criteria were:

* 100% open source
* Actively maintained
* Generic, in the sense of not being tied to a specific vendor’s Kubernetes distro
* Modular and extensible
* Clean, modern user interface
* Implemented using a stack that was familiar to our development team (Go, Javascript/Typescript, React)
* An interactive UI that allows read-write operations, not just a read-only dashboard
* Multi-cluster.
- 100% open source
- Actively maintained
- Generic, in the sense of not being tied to a specific vendor’s Kubernetes distro
- Modular and extensible
- Clean, modern user interface
- Implemented using a stack that was familiar to our development team (Go, Javascript/Typescript, React)
- An interactive UI that allows read-write operations, not just a read-only dashboard
- Multi-cluster.

Despite the good number of alternatives, the reality is that none of the solutions we tested at the time really matched all the points in our criteria or was a good base to start from. So, in the time-honored tradition, we decided to build one ourselves…


# Introducing Headlamp

Today, I am **proud to announce the general availability of a new UI for Kubernetes**: [Headlamp](https://github.com/kinvolk/headlamp).
Today, I am **proud to announce the general availability of a new UI for Kubernetes**: [Headlamp](https://github.com/headlamp-k8s/headlamp).

![Headlamp](./headlamp_cluster_overview.png)

Expand Down Expand Up @@ -98,14 +95,10 @@ You may be aware that Kinvolk also has a Kubernetes distribution, [Lokomotive](h

# Shine Headlamp on your cluster!!

It’s **easy to try out Headlamp**: just apply the deployment manifest to your cluster and point your browser to the Headlamp service, or download and install the desktop application for Windows, Mac, or Linux. For details, see the [documentation](https://kinvolk.io/docs/headlamp/latest/installation).
It’s **easy to try out Headlamp**: just apply the deployment manifest to your cluster and point your browser to the Headlamp service, or download and install the desktop application for Windows, Mac, or Linux. For details, see the [documentation](/docs/latest/installation).

Headlamp is fully open source, released under the Apache 2.0 terms and, as mentioned above, we created it to be a generic and vendor-independent Kubernetes UI that we hope can suit many use-cases. So we encourage anyone interested to take part.

If you want to participate, please check out our [contribution guidelines](https://kinvolk.io/docs/headlamp/latest/contributing).
If you want to participate, please check out our [contribution guidelines](/docs/latest/contributing).

**We hope you enjoy Headlamp!**

<div style="text-align: center">
<img src="/images/headlamp-logo.svg" style="max-width: 500px;" alt="" />
</div>
Loading

0 comments on commit da8ac81

Please sign in to comment.