From 03ce732d0cc72988c49b012df70c776cfdc8eb06 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Tue, 21 Feb 2023 16:23:18 +0100 Subject: [PATCH] docs: website build improvements (#806) Co-authored-by: Giovanni Liva --- docs/.gitignore | 4 ++++ docs/Makefile | 16 ++++++---------- docs/config.yaml | 26 ++++++++++++++++++++++++++ docs/content/en/_index.md | 38 ++++++++++++++++++++++++++++++++++++++ docs/go.mod | 10 ++++++++++ 5 files changed, 84 insertions(+), 10 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/config.yaml create mode 100644 docs/content/en/_index.md create mode 100644 docs/go.mod diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..1e47af8724 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,4 @@ +.hugo_build.lock +resources/_gen +public +go.sum diff --git a/docs/Makefile b/docs/Makefile index 0ba5272f45..385de8a390 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,26 +1,22 @@ -DOCREPO := github.com/keptn-sandbox/lifecycle-toolkit-docs -TMPDIR := $(CURDIR)/tmp -VOLUMES := -v $(TMPDIR)/lifecycle-toolkit-docs:/src -v $(CURDIR)/content/en/docs:/src/content/en/docs-dev +VOLUMES := -v $(CURDIR):/src # renovate: datasource=docker depName=klakegg/hugo HUGO_VERSION := 0.105.0-ext IMAGE := klakegg/hugo:$(HUGO_VERSION) PORT := 1314 -.PHONY: build server clean htmltest - -clone: - @rm -rf $(TMPDIR)/lifecycle-toolkit-docs | true - @mkdir -p $(TMPDIR)/lifecycle-toolkit-docs - @git clone https://$(DOCREPO) $(TMPDIR)/lifecycle-toolkit-docs +.PHONY: build server clean shell htmltest build: docker run --rm -it $(VOLUMES) $(IMAGE) -D -v +shell: + docker run --rm -it $(VOLUMES) $(IMAGE) shell + server: docker run --rm -it $(VOLUMES) -p $(PORT):$(PORT) $(IMAGE) server -D -p $(PORT) clean: docker run --rm -it $(VOLUMES) $(IMAGE) --cleanDestinationDir -htmltest: clone build +htmltest: build docker run -v $(CURDIR):/test --rm wjdp/htmltest -s /test/tmp/lifecycle-toolkit-docs/public diff --git a/docs/config.yaml b/docs/config.yaml new file mode 100644 index 0000000000..d93dd823ed --- /dev/null +++ b/docs/config.yaml @@ -0,0 +1,26 @@ +_merge: deep +module: + imports: + - path: github.com/keptn-sandbox/lifecycle-toolkit-docs + ignoreConfig: false + mounts: + - source: static + target: static + - source: layouts + target: layouts + - source: data + target: data + - source: assets + target: assets + - source: archetypes + target: archetypes + - source: content/en/_index.md + target: content/en/_index.md + proxy: direct + +params: + versions: + - url: /docs/ + version: development + - url: https://lifecycle.keptn.sh + version: production diff --git a/docs/content/en/_index.md b/docs/content/en/_index.md new file mode 100644 index 0000000000..91436b34eb --- /dev/null +++ b/docs/content/en/_index.md @@ -0,0 +1,38 @@ ++++ +title = "Home" + ++++ + + + +{{< blocks/cover title="Welcome to the Keptn Lifecycle Toolkit Documentation" image_anchor="top" height="half" color="primary" >}} + +{{< /blocks/cover >}} + + +{{% blocks/lead color="white" %}} +[![Keptn Lifecycle Toolkit in a Nutshell](https://img.youtube.com/vi/K-cvnZ8EtGc/0.jpg)](https://www.youtube.com/watch?v=K-cvnZ8EtGc) +{{% /blocks/lead %}} + +{{< blocks/section color="dark" >}} +{{% blocks/feature icon="fa-lightbulb" title="Keptn Recordings" %}} +See Keptn [in Action](https://youtube.com/playlist?list=PL6i801Rjt9DbikPPILz38U1TLMrEjppzZ) +{{% /blocks/feature %}} + +{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/keptn/lifecycle-toolkit" %}} +We do a [Pull Request](https://github.com/keptn/lifecycle-toolkit/pulls) contributions workflow on **GitHub**. +New users are always welcome! +{{% /blocks/feature %}} + +{{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/keptnProject" %}} +For announcement of latest features etc. +{{% /blocks/feature %}} + +{{< /blocks/section >}} diff --git a/docs/go.mod b/docs/go.mod new file mode 100644 index 0000000000..7ae5fbaa06 --- /dev/null +++ b/docs/go.mod @@ -0,0 +1,10 @@ +module github.com/keptn/keptn-lifecycle-toolkit/docs + +go 1.19 + +require github.com/keptn-sandbox/lifecycle-toolkit-docs v0.0.0-20230209144724-01b35a6cfc44 // indirect= + +require ( + github.com/google/docsy/dependencies v0.6.0 // indirect + github.com/keptn-sandbox/lifecycle-toolkit-docs v0.0.0-20230209144724-01b35a6cfc44 // indirect +)