From 003bf82635ba8ed454ec933857e734a262882322 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Thu, 9 Feb 2023 15:51:41 +0100 Subject: [PATCH] docs: Website build improvements (#798) Signed-off-by: Simon Schrottner --- docs/.gitignore | 4 ++++ docs/Makefile | 16 ++++++---------- docs/config.yaml | 26 ++++++++++++++++++++++++++ docs/content/en/_index.md | 37 +++++++++++++++++++++++++++++++++++++ docs/go.mod | 10 ++++++++++ 5 files changed, 83 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 00000000000..1e47af87240 --- /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 0ba5272f453..385de8a3909 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 00000000000..81a97894308 --- /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 \ No newline at end of file diff --git a/docs/content/en/_index.md b/docs/content/en/_index.md new file mode 100644 index 00000000000..f30e5ae8bc9 --- /dev/null +++ b/docs/content/en/_index.md @@ -0,0 +1,37 @@ ++++ +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 00000000000..56a1185a8c9 --- /dev/null +++ b/docs/go.mod @@ -0,0 +1,10 @@ +module github.com/keptn/keptn-lifecycle-toolkit/docs + +go 1.19 + +require github.com/aepfli/lifecycle-toolkit-docs v0.0.0-20230203105145-39f38b0bedb9 // indirect= + +require ( + github.com/google/docsy/dependencies v0.6.0 // indirect + github.com/keptn-sandbox/lifecycle-toolkit-docs v0.0.0-20230209144724-01b35a6cfc44 // indirect +)