Skip to content

Commit

Permalink
Adds basic website (#289)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt authored Jul 6, 2021
1 parent 14347d9 commit b8f2b72
Show file tree
Hide file tree
Showing 25 changed files with 175 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ $(GORELEASER): $(BINGO_DIR)/goreleaser.mod
@echo "(re)installing $(GOBIN)/goreleaser-v0.166.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN)/goreleaser-v0.166.0 "github.com/goreleaser/goreleaser"

HUGO := $(GOBIN)/hugo-v0.85.0
$(HUGO): $(BINGO_DIR)/hugo.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/hugo-v0.85.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=hugo.mod -o=$(GOBIN)/hugo-v0.85.0 "github.com/gohugoio/hugo"

LICENSER := $(GOBIN)/licenser-v0.6.0
$(LICENSER): $(BINGO_DIR)/licenser.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
Expand Down
5 changes: 5 additions & 0 deletions .bingo/hugo.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.16

require github.com/gohugoio/hugo v0.80.0
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "site/themes/syna"]
path = site/themes/syna
url = https://github.com/okkur/syna.git
3 changes: 3 additions & 0 deletions .licenserignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ last_known_envoy.txt
testdata/
site/*.json
e2e/*.yaml

netlify.toml
site/
7 changes: 7 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ make coverage
### How to run end-to-end Tests

See [test/e2e](e2e) for how to develop or run end-to-end tests

### How to test the website

Run below, then view with http://localhost:1313/
```shell
make site
```
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ bin $(BIN): $(GORELEASER)
@echo "--- bin ---"
@$(GORELEASER) build --snapshot --single-target --rm-dist

##@ Test website
.PHONY: site
site: $(HUGO)
@echo "--- site ---"
@git submodule update
@cd site && $(HUGO) server -D

##@ Unit and End-to-End tests

TEST_PACKAGES ?= $(shell go list ./... | grep -v -e github.com/tetratelabs/func-e/e2e -e github.com/tetratelabs/func-e/site)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ curl -L https://func-e.io/install.sh | bash -s -- -b /usr/local/bin
$ func-e run --config-yaml "admin: {address: {socket_address: {address: '127.0.0.1', port_value: 9901}}}"
```

Run `func-e help` or have a look at the [Usage Docs](site/usage.md) for more information.
Run `func-e help` or have a look at the [Usage Docs](USAGE.md) for more information.

-----
Envoy® is a registered trademark of The Linux Foundation in the United States and/or other countries
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/cmd/usage_md_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/tetratelabs/func-e/internal/globals"
)

const siteMarkdownFile = "../../site/usage.md"
const siteMarkdownFile = "../../USAGE.md"

// TestUsageMarkdownMatchesCommands is in the "cmd" package because changes here will drift siteMarkdownFile.
func TestUsageMarkdownMatchesCommands(t *testing.T) {
Expand Down
15 changes: 15 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[build]
base = "site"
publish = "public"

[build.environment]
HUGO_VERSION = "0.85.0"

[context.production]
command = "hugo --gc --minify"

[context.deploy-preview]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
2 changes: 2 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources/
public/
12 changes: 6 additions & 6 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Envoy site
# func-e.io

The following files are hosted on https://func-e.io, specifically via [Netlify redirects](https://github.com/tetratelabs/func-e.io/blob/master/site/static/_redirects):
This directory holds the func-e site's source code. To visit the site click [here](https://func-e.io/)

Latest master merge:
* https://func-e.io/install.sh -> [./install.sh](install.sh)
* https://www.func-e.io/usage/ -> [./usage.md](usage.md)
* this is verified by [usage_md_test.go](../internal/cmd/usage_md_test.go)
The website is built using [Hugo](https://gohugo.io/), as static website generator, and [Syna](https://about.okkur.org/syna/) theme.

## Deployment process
This site deploys via Netlify on change to the `master` branch.
29 changes: 29 additions & 0 deletions site/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
baseurl = "https://func-e.io/"
languageCode = "en-us"
defaultContentLanguage = "en"
title = "func-e"
theme = "syna"
enableGitInfo = true
disableKinds = ["RSS", "taxonomy", "taxonomyTerm"]
ignorefiles = [ "content/dev/.*" ]

[params]
name = "func-e"
title ="func-e (pronounced funky) makes running Envoy® easy"
description = "func-e allows you to quickly see available versions of Envoy and try them out"
author = "Tetrate"

[[menu.main]]
url = "https://github.com/tetratelabs/func-e/blob/master/USAGE.md"
name = "Usage"
weight = 20

[[menu.main]]
url = "https://github.com/tetratelabs/func-e/releases"
name = "Releases"
weight = 30

[[menu.main]]
url = "https://github.com/tetratelabs/func-e"
name = "GitHub"
weight = 40
8 changes: 8 additions & 0 deletions site/content/_global/copyright.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
fragment = "copyright"
date = "2021-07-06"
weight = 1250
background = "dark"

copyright = "2021 © Tetrate.io. Envoy® is a registered trademark of The Linux Foundation in the United States and/or other countries."
+++
3 changes: 3 additions & 0 deletions site/content/_global/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
+++
headless = true
+++
13 changes: 13 additions & 0 deletions site/content/_global/nav.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
+++
fragment = "nav"
date = "2021-07-06"
weight = 0
sticky = true
background = "dark"

# Branding options
[asset]
image = "branding_logo.svg"
text = "func-e"

+++
7 changes: 7 additions & 0 deletions site/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+++
title = "func-e"
date = "2021-07-06"
subtitle = "func-e (pronounced funky) makes running Envoy® easy"
description = "func-e allows you to quickly see available versions of Envoy and try them out"
+++

10 changes: 10 additions & 0 deletions site/content/_index/features/consistent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
title = "Consistent"
date = "2021-07-06"
weight = 20

[asset]
icon = "fas fa-copy"
+++

`func-e use` pins the version when you need to
10 changes: 10 additions & 0 deletions site/content/_index/features/easy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
title = "Easy"
date = "2021-07-06"
weight = 10

[asset]
icon = "fas fa-box-open"
+++

One command to get started: `func-e run`
8 changes: 8 additions & 0 deletions site/content/_index/features/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
fragment = "items"
date = "2021-07-06"
weight = 150

title = "Features"
subtitle= ""
+++
10 changes: 10 additions & 0 deletions site/content/_index/hero.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
fragment = "hero"
date = "2021-07-06"
weight = 110
background = "light"
particles = true

title = "func-e makes running Envoy® easy"

+++
4 changes: 4 additions & 0 deletions site/content/_index/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
+++
headless = true
+++

16 changes: 16 additions & 0 deletions site/content/_index/installation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
+++
fragment = "content"
date = "2021-07-06"
weight = 150
+++

func-e (pronounced funky) allows you to quickly see available versions of Envoy and try them out. This makes it easy to validate
configuration you would use in production. Each time you end a run, a snapshot of runtime state is taken on
your behalf. This makes knowledge sharing and troubleshooting easier, especially when upgrading. Try it out!

```sh
$ curl -L https://func-e.io/install.sh | bash -s -- -b /usr/local/bin
$ func-e run -c /path/to/envoy.yaml
# If you don't have a configuration file, you can start the admin port like this
$ func-e run --config-yaml "admin: {address: {socket_address: {address: '127.0.0.1', port_value: 9901}}}"
```
File renamed without changes.
1 change: 1 addition & 0 deletions site/themes/syna
Submodule syna added at d086af

0 comments on commit b8f2b72

Please sign in to comment.