From b8907d1f8e939cb038861cd70fa98a5a6fe89ea0 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 14:43:45 -0400 Subject: [PATCH 01/37] docs: update page titles to match sidebar --- docs/deployment/application-deployment.md | 2 +- docs/deployment/builders/cloud-native-buildpacks.md | 2 +- docs/deployment/builders/herokuish-buildpacks.md | 2 +- docs/deployment/zero-downtime-deploys.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/deployment/application-deployment.md b/docs/deployment/application-deployment.md index 3b1427169..eb8f85dc1 100644 --- a/docs/deployment/application-deployment.md +++ b/docs/deployment/application-deployment.md @@ -1,4 +1,4 @@ -# Deploying to Dokku +# Deploying an Application > Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should substitute the domain `dokku.me` for the domain name or IP address associated with your server. Users of the Vagrant VM included with Dokku can use `dokku.me` which points to the IP of the VM. diff --git a/docs/deployment/builders/cloud-native-buildpacks.md b/docs/deployment/builders/cloud-native-buildpacks.md index ebbb15768..edf63236e 100644 --- a/docs/deployment/builders/cloud-native-buildpacks.md +++ b/docs/deployment/builders/cloud-native-buildpacks.md @@ -1,4 +1,4 @@ -# Cloud Native Buildpacks (Experimental) +# Cloud Native Buildpacks > New as of 0.22.0 diff --git a/docs/deployment/builders/herokuish-buildpacks.md b/docs/deployment/builders/herokuish-buildpacks.md index 0f863085f..179e6c321 100644 --- a/docs/deployment/builders/herokuish-buildpacks.md +++ b/docs/deployment/builders/herokuish-buildpacks.md @@ -1,4 +1,4 @@ -# Herokuish Buildpack Deployment +# Herokuish Buildpacks > Subcommands new as of 0.15.0 diff --git a/docs/deployment/zero-downtime-deploys.md b/docs/deployment/zero-downtime-deploys.md index 93c315568..b68734ae2 100644 --- a/docs/deployment/zero-downtime-deploys.md +++ b/docs/deployment/zero-downtime-deploys.md @@ -1,4 +1,4 @@ -# Zero Downtime Deploys +# Zero Downtime Deploy Checks > New as of 0.5.0 From 08b77b62d4e528eb9c693b02ccaeec1436c15f2e Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 14:46:22 -0400 Subject: [PATCH 02/37] docs: add initial files for mkdocs support --- docs/_overrides/main.html | 49 ++++++++++++++++++++++++ docs/assets/extra.css | 0 mkdocs.yml | 78 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 docs/_overrides/main.html create mode 100644 docs/assets/extra.css create mode 100644 mkdocs.yml diff --git a/docs/_overrides/main.html b/docs/_overrides/main.html new file mode 100644 index 000000000..b26dbf43a --- /dev/null +++ b/docs/_overrides/main.html @@ -0,0 +1,49 @@ + + +{% extends "base.html" %} + + +{% block extrahead %} + + + +{% endblock %} + + +{% block announce %} + + For updates follow @dokku on + + Twitter + +{% endblock %} + + +{% block scripts %} + {{ super() }} + + + +{% endblock %} diff --git a/docs/assets/extra.css b/docs/assets/extra.css new file mode 100644 index 000000000..e69de29bb diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 000000000..556e7bc90 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,78 @@ +--- +# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json + +markdown_extensions: + - admonition + - attr_list + - footnotes + - md_in_html + - pymdownx.details + - pymdownx.emoji: + emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:materialx.emoji.twemoji + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true + - tables + +repo_url: https://github.com/dokku/dokku + +site_dir: site +site_name: Dokku Documentation +site_url: https://dokku.com/docs/ + +extra: + social: + - icon: fontawesome/solid/bug + link: https://github.com/dokku/dokku/issues + - icon: fontawesome/solid/cart-shopping + link: https://dokku.dpdcart.com/cart/add?product_id=217344&method_id=236878 + version: + provider: mike + +theme: + custom_dir: docs/_overrides + favicon: assets/favicons/favicon-96x96.png + features: + - navigation.instant + - navigation.sections + - navigation.tabs + - navigation.top + - search.highlight + homepage: https://dokku.com + icon: + admonition: + tip: fontawesome/solid/wand-magic-sparkles + logo: assets/dokku-logo.svg + name: material + palette: + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to light mode + +plugins: + - search + - exclude: + glob: + - _build/Dockerfile + - _build/entrypoint + - _build/requirements.txt + - home.html + - template.html + +extra_css: + - assets/extra.css From f7905b4943c92ce76115d698e838a72c3043cbee Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 14:46:55 -0400 Subject: [PATCH 03/37] docs: add code for building docs in ci --- .dockerignore | 2 ++ Makefile | 1 + docs.mk | 19 ++++++++++++++++++ docs/_build/Dockerfile | 12 ++++++++++++ docs/_build/entrypoint | 38 ++++++++++++++++++++++++++++++++++++ docs/_build/requirements.txt | 23 ++++++++++++++++++++++ 6 files changed, 95 insertions(+) create mode 100644 docs.mk create mode 100644 docs/_build/Dockerfile create mode 100755 docs/_build/entrypoint create mode 100644 docs/_build/requirements.txt diff --git a/.dockerignore b/.dockerignore index fb38043ca..7cab72b98 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,6 +7,8 @@ build docs tests !build/package/* +!docs/_build/entrypoint +!docs/_build/requirements.txt !tests/dhparam.pem !contrib/bash-completion !contrib/docker diff --git a/Makefile b/Makefile index cd792b016..e4da07db5 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ include common.mk .PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies docker-image-labeler lambda-builder netrc sshcommand procfile-util plugn docker aufs stack count vagrant-acl-add vagrant-dokku go-build +include docs.mk include tests.mk include package.mk include deb.mk diff --git a/docs.mk b/docs.mk new file mode 100644 index 000000000..2231448da --- /dev/null +++ b/docs.mk @@ -0,0 +1,19 @@ +.PHONY: docs-build-image +docs-build-image: + docker build -f docs/_build/Dockerfile --progress plain -t app/mkdocs . + +.PHONY: docs-build +docs-build: + docker run --rm -p 3487:3487 -v "$(PWD):/usr/src/source" --name docs-serve app/mkdocs build + +.PHONY: docs-serve +docs-serve: + docker run --rm -p 3487:3487 -v "$(PWD):/usr/src/source" --name docs-serve app/mkdocs serve + +.PHONY: docs-deps +docs-deps: + @docker run --rm -p 3487:3487 -v "$(PWD):/usr/src/app" app/mkdocs deps + +.PHONY: docs-enter +docs-enter: + docker exec -it docs-serve bash diff --git a/docs/_build/Dockerfile b/docs/_build/Dockerfile new file mode 100644 index 000000000..4c233db37 --- /dev/null +++ b/docs/_build/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.10-alpine + +WORKDIR /usr/src/app + +COPY docs/_build/requirements.txt . + +RUN apk add --no-cache bash yaml && \ + pip install --no-cache-dir -r requirements.txt + +COPY docs/_build/entrypoint /bin/entrypoint + +ENTRYPOINT [ "/bin/entrypoint" ] diff --git a/docs/_build/entrypoint b/docs/_build/entrypoint new file mode 100755 index 000000000..2cf2adf22 --- /dev/null +++ b/docs/_build/entrypoint @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +set -eo pipefail + +write-mkdocs() { + if [[ -f /usr/src/source/contrib/write-mkdocs ]]; then + if ! python /usr/src/source/contrib/write-mkdocs; then + exit 0 + fi + fi +} + +main() { + declare CMD="$1" ARGS=("${@:2}") + + if [[ "$CMD" == "build" ]]; then + write-mkdocs + mkdocs build + site_dir="$(grep site_dir mkdocs.yml | awk '{print $2}')" + cp -r "/usr/src/app/${site_dir}" "/usr/src/source/${site_dir}" + + return $? + fi + + if [[ "$CMD" == "deps" ]]; then + pip freeze + return $? + fi + + if [[ "$CMD" == "serve" ]]; then + write-mkdocs + mkdocs serve -a 0.0.0.0:3487 + return $? + fi + + "$CMD" "${ARGS[@]}" +} + +main "$@" diff --git a/docs/_build/requirements.txt b/docs/_build/requirements.txt new file mode 100644 index 000000000..4868546aa --- /dev/null +++ b/docs/_build/requirements.txt @@ -0,0 +1,23 @@ +beautifulsoup4==4.11.1 +click==8.1.3 +ghp-import==2.1.0 +importlib-metadata==4.12.0 +Jinja2==3.1.2 +Markdown==3.3.7 +MarkupSafe==2.1.1 +mergedeep==1.3.4 +mkdocs==1.3.1 +mkdocs-material==8.4.2 +mkdocs-material-extensions==1.0.3 +packaging==21.3 +Pygments==2.13.0 +pymdown-extensions==9.5 +pyparsing==3.0.9 +python-dateutil==2.8.2 +PyYAML==6.0 +pyyaml_env_tag==0.1 +six==1.16.0 +soupsieve==2.3.2.post1 +watchdog==2.1.9 +zipp==3.8.1 +mkdocs-exclude From 062aa7aa433f19667abbc94a4ebbd6a950d8dea3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 14:49:56 -0400 Subject: [PATCH 04/37] docs: add code for generating documentation from all old versions of dokku This generates the appropriate versions for our usage, in addition to ensuring the markdown is of a format that mkdocs understands. --- contrib/build-docs | 94 ++++++++++++++ contrib/write-mkdocs | 287 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 381 insertions(+) create mode 100755 contrib/build-docs create mode 100644 contrib/write-mkdocs diff --git a/contrib/build-docs b/contrib/build-docs new file mode 100755 index 000000000..d26e8beb9 --- /dev/null +++ b/contrib/build-docs @@ -0,0 +1,94 @@ +#!/usr/bin/env bash +set -eo pipefail + +readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)" + +main() { + pushd "$ROOT_DIR" >/dev/null || return 1 + rm -rf docs-main tmp/docs-source tmp/docs-build/docs # tmp/docs-build + mkdir -p tmp/docs-build + cp -r docs docs-main + + git clone https://github.com/dokku/dokku.git tmp/docs-source + + rm -rf docs/assets + mkdir -p docs/assets + cp -r docs-main/assets/favicons docs/assets/favicons + cp -r docs-main/assets/dokku-logo.svg docs/assets/dokku-logo.svg + + rm -rf tmp/docs-build/assets + cp -r docs-main/assets tmp/docs-build/assets + + make docs-build + mv site tmp/docs-build/docs + mv docs/home.html tmp/docs-build/index.html + sed -i.bak "s/{{NAME}}~{{REF}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak + sed -i.bak "s/{{NAME}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak + + jq -C -r '.["max-versions"][]' docs-main/assets/versions.json | while read -r current_version; do + major="$(echo "$current_version" | cut -d'.' -f1)" + minor="$(echo "$current_version" | cut -d'.' -f2)" + patch="$(echo "$current_version" | cut -d'.' -f3)" + while true; do + if [[ "$patch" -lt 0 ]]; then + break + fi + version="${major}.${minor}.${patch}" + echo "version: ${major}.${minor}.${patch}" + + if [[ "$major" -lt 1 ]]; then + if [[ "$current_version" != "$version" ]] && [[ "$minor" -lt 28 ]]; then + rm -rf "tmp/docs-build/docs~v${version}" + patch=$((patch - 1)) + continue + fi + fi + + if [[ -d "tmp/docs-build/docs~v${version}" ]]; then + patch=$((patch - 1)) + continue + fi + + git -C tmp/docs-source checkout -- . + git -C tmp/docs-source checkout "tags/v${version}" -b "v${version}-branch" + rm -rf docs + mv tmp/docs-source/docs docs + + rm -rf docs/assets + mkdir -p docs/assets + cp -r docs-main/assets/favicons docs/assets/favicons + cp -r docs-main/assets/dokku-logo.svg docs/assets/dokku-logo.svg + + cp -r docs-main/_build docs/_build + cp -r docs-main/_overrides docs/_overrides + git checkout -- mkdocs.yml + sed -i.bak "s/site_dir: site/site_dir: docs~v$version/g" mkdocs.yml && rm mkdocs.yml.bak + if [[ ! -f docs/template.html ]]; then + if [[ "$patch" -eq 0 ]]; then + break + fi + + continue + fi + + if ! make docs-build; then + continue + fi + + if [[ -d "docs~v${version}" ]]; then + mv "docs~v${version}" "tmp/docs-build/docs~v${version}" + fi + + if [[ "$patch" -eq 0 ]]; then + break + fi + patch=$((patch - 1)) + done + done + + rm -rf docs + mv docs-main docs + git checkout -- mkdocs.yml docs +} + +main "$@" diff --git a/contrib/write-mkdocs b/contrib/write-mkdocs new file mode 100644 index 000000000..dd2458371 --- /dev/null +++ b/contrib/write-mkdocs @@ -0,0 +1,287 @@ +#!/usr/bin/env python +from bs4 import BeautifulSoup +import os +import pathlib +import shutil +import sys +import yaml + + +def get_nav_from_selector(soup, selector, docs_dir): + navigation = [] + header_name = "" + for anchor in soup.select(selector): + classes = anchor.get("class", []) + if classes is None: + continue + + if "disabled" in classes: + header_name = anchor.text + navigation.append({header_name: []}) + + href = anchor.get("href", "") + if href is None: + continue + + href = str(href) + if href == "#": + continue + + url = href.replace("{{NAME}}", "") + filename = url.replace("http://progrium.viewdocs.io/dokku/", "") + filename = filename.replace("http://dokku.viewdocs.io/dokku/", "") + filename = filename.strip("/") + ".md" + filename = filename.removeprefix("dokku/") + if not os.path.exists(docs_dir + "/" + filename): + print("error fetching markdown file:", filename) + continue + + for nav in navigation: + if header_name in nav: + nav[header_name].append(filename) + return navigation + + +def generate_nav(src, dest): + navigation = [] + repo_dir = pathlib.Path(__file__).parent.parent.resolve() + docs_dir = str(repo_dir) + "/docs" + with open(docs_dir + "/template.html") as response: + soup = BeautifulSoup(response, "html.parser") + selectors = [ + ".container .row .list-group a", + ".container-fluid .row .list-group a", + ] + for selector in selectors: + navigation = get_nav_from_selector(soup, selector, docs_dir) + if len(navigation) > 0: + break + + if len(navigation) == 0: + print("No navigation found") + sys.exit(1) + print(navigation) + + with open(src) as f: + data = yaml.unsafe_load(f) + data["nav"] = [ + {"Docs": navigation}, + {"Pro": "https://pro.dokku.com/docs/getting-started/"}, + {"Blog": "https://pro.dokku.com/blog/"}, + {"Purchase Dokku Pro": "https://dokku.dpdcart.com/cart/add?product_id=217344&method_id=236878"}, + ] + + with open(dest, mode="wt", encoding="utf-8") as f: + yaml.dump(data, f) + + +def modify_content_noop(lines): + modified = False + updated_lines = [] + for line in lines: + updated_lines.append(line) + return updated_lines, modified + + +def modify_content_stripspace(lines): + modified = False + updated_lines = [] + for line in lines: + line = line.rstrip() + updated_lines.append(line) + return updated_lines, modified + + +def modify_content_inject_newlines(lines): + modified = False + updated_lines = [] + for line in lines: + updated_lines.append(line + "\n") + return updated_lines, modified + + +def is_info(line): + return line.startswith("> ") + + +def is_new(line): + return line.startswith("> ") and "new as of" in line.lower() + + +def is_note(line): + return line.startswith("> Note:") + + +def is_warning(line): + return line.startswith("> Warning:") + + +def modify_content_admonition(lines): + modified = False + updated_lines = [] + admonition_lines = [] + is_admonition = False + for line in lines: + if is_info(line) or is_new(line) or is_note(line) or is_warning(line): + if is_new(line): + line = line.replace("> ", "!!! tip \"New\"\n\n ") + line = line.replace("New as of", "Introduced in") + line = line.replace("new as of", "introduced in") + if is_note(line): + line = line.replace( + "> Note: ", "!!! note \"Note\"\n\n ") + elif is_warning(line): + line = line.replace( + "> Warning: ", "!!! warning \"Warning\"\n\n ") + elif is_info(line): + if not is_admonition: + line = line.replace("> ", "!!! info \"Info\"\n\n ") + elif line == ">": + line = "" + else: + line = " " + line.removeprefix("> ") + + is_admonition = True + admonition_lines.append(line) + elif is_admonition and line == ">": + line = "" + admonition_lines.append(line) + elif is_admonition and line.startswith("> "): + line = " " + line.removeprefix("> ") + admonition_lines.append(line) + elif line == "": + is_admonition = False + if len(admonition_lines) > 0: + updated_lines.extend(admonition_lines) + admonition_lines = [] + updated_lines.append("") + else: + updated_lines.append(line) + return updated_lines, modified + + +def is_shell_codeblock_start(line): + return line == "```shell" + + +def modify_content_terminal_example(lines): + modified = False + updated_lines = [] + command_block = [] + example_block = [] + in_command_block = False + in_example_block = False + previous_block = "" + next_line_must_be = None + for line in lines: + if is_shell_codeblock_start(line): + command_block.append(line) + modified = True + in_command_block = True + continue + elif in_command_block: + command_block.append(line) + if line == "```": + in_command_block = False + previous_block = "command_block" + next_line_must_be = "" + continue + elif line == "```": + if previous_block == "": + updated_lines.append(line) + continue + elif previous_block == "command_block": + example_block.append(line) + + if in_example_block: + previous_block = "" + in_example_block = False + updated_lines.append("=== \"Shell\"") + updated_lines.append("") + for command_line in command_block: + updated_lines.append(f" {command_line}") + command_block = [] + + updated_lines.append("") + updated_lines.append("=== \"Output\"") + updated_lines.append("") + for example_line in example_block: + updated_lines.append(f" {example_line}") + example_block = [] + else: + in_example_block = True + continue + elif previous_block == "command_block": + if next_line_must_be is None: + if in_example_block: + example_block.append(line) + else: + updated_lines.extend(command_block) + updated_lines.append("") + updated_lines.append(line) + command_block = [] + previous_block = "" + continue + elif next_line_must_be == "": + if line == "": + next_line_must_be = None + continue + + updated_lines.append(line) + + if len(command_block) > 0: + updated_lines.extend(command_block) + + return updated_lines, modified + + +def update_markdown(src): + markdown_files = [] + extensions = [".md"] + for subdir, _, files in os.walk(src): + for file in files: + ext = os.path.splitext(file)[-1].lower() + if ext in extensions: + markdown_files.append(os.path.join(subdir, file)) + + modifiers = [ + modify_content_noop, + modify_content_stripspace, + modify_content_admonition, + modify_content_terminal_example, + modify_content_inject_newlines, + ] + + for file in markdown_files: + modified = False + lines = [] + with open(file, 'r') as f: + lines = f.readlines() + for modifier in modifiers: + lines, m = modifier(lines) + if m: + modified = True + + if modified: + with open(file, 'w') as fp: + fp.writelines(lines) + + +def main(): + print("====> Copying mkdocs.yml") + print(" Generating navigation") + generate_nav("/usr/src/source/mkdocs.yml", "/usr/src/app/mkdocs.yml") + + print("====> Copying docs folder") + update_markdown("/usr/src/source/docs",) + + if os.path.exists("/usr/src/app/docs"): + print(" Removing old docs folder") + shutil.rmtree("/usr/src/app/docs") + + print(" Performing copy") + shutil.copytree("/usr/src/source/docs", "/usr/src/app/docs") + + +if __name__ == "__main__": + main() From ab0b1277789e87d51968879b3dcd557068c0aae7 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 15:16:37 -0400 Subject: [PATCH 05/37] chore: update build dependencies --- docs/_build/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_build/requirements.txt b/docs/_build/requirements.txt index 4868546aa..4cdb3037d 100644 --- a/docs/_build/requirements.txt +++ b/docs/_build/requirements.txt @@ -7,6 +7,7 @@ Markdown==3.3.7 MarkupSafe==2.1.1 mergedeep==1.3.4 mkdocs==1.3.1 +mkdocs-exclude==1.0.2 mkdocs-material==8.4.2 mkdocs-material-extensions==1.0.3 packaging==21.3 @@ -20,4 +21,3 @@ six==1.16.0 soupsieve==2.3.2.post1 watchdog==2.1.9 zipp==3.8.1 -mkdocs-exclude From 0d6263c9b5db9f0b17e8b66ba7c7de44599ab356 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 15:27:52 -0400 Subject: [PATCH 06/37] chore: drop extra print --- contrib/write-mkdocs | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/write-mkdocs b/contrib/write-mkdocs index dd2458371..084afd7a0 100644 --- a/contrib/write-mkdocs +++ b/contrib/write-mkdocs @@ -60,7 +60,6 @@ def generate_nav(src, dest): if len(navigation) == 0: print("No navigation found") sys.exit(1) - print(navigation) with open(src) as f: data = yaml.unsafe_load(f) From db11f1f15f4c199b9ac53214491664434c9fb670 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 15:28:46 -0400 Subject: [PATCH 07/37] docs: remove unnecessary link This is duplicated through a redirect. --- docs/template.html | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/template.html b/docs/template.html index 9c3803916..dbff9cbda 100644 --- a/docs/template.html +++ b/docs/template.html @@ -198,7 +198,6 @@ Kubernetes Nomad Null Scheduler - Alternate Schedulers Development From fa7de79faf407d0fd4b332ad3897fb520bab0f0f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 15:38:49 -0400 Subject: [PATCH 08/37] docs: cleanup whitespace in codeblocks --- contrib/write-mkdocs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/write-mkdocs b/contrib/write-mkdocs index 084afd7a0..5f27f580d 100644 --- a/contrib/write-mkdocs +++ b/contrib/write-mkdocs @@ -95,7 +95,7 @@ def modify_content_inject_newlines(lines): modified = False updated_lines = [] for line in lines: - updated_lines.append(line + "\n") + updated_lines.append(line.rstrip() + "\n") return updated_lines, modified @@ -135,14 +135,14 @@ def modify_content_admonition(lines): elif is_info(line): if not is_admonition: line = line.replace("> ", "!!! info \"Info\"\n\n ") - elif line == ">": + elif line in [">", "> "]: line = "" else: line = " " + line.removeprefix("> ") is_admonition = True admonition_lines.append(line) - elif is_admonition and line == ">": + elif is_admonition and line in [">", "> "]: line = "" admonition_lines.append(line) elif is_admonition and line.startswith("> "): From d3a5289156640eb20174714728296da933519fe4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 16:46:13 -0400 Subject: [PATCH 09/37] docs: turn absolute links into relative links This is necessary as links in mkdocs must be relative. --- contrib/write-mkdocs | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/contrib/write-mkdocs b/contrib/write-mkdocs index 5f27f580d..fe5ddfb6c 100644 --- a/contrib/write-mkdocs +++ b/contrib/write-mkdocs @@ -74,7 +74,7 @@ def generate_nav(src, dest): yaml.dump(data, f) -def modify_content_noop(lines): +def modify_content_noop(lines, _): modified = False updated_lines = [] for line in lines: @@ -82,7 +82,23 @@ def modify_content_noop(lines): return updated_lines, modified -def modify_content_stripspace(lines): +def modify_content_links(lines, filename): + filename = filename.replace("/usr/src/source/docs/", "") + parts = filename.split("/") + parts.pop() + replacement = "](" + '/'.join([".." for _ in parts]) + "/" + modified = False + updated_lines = [] + for line in lines: + if "](/docs/" in line: + line = line.replace("](/docs/", replacement) + modified = True + + updated_lines.append(line) + return updated_lines, modified + + +def modify_content_stripspace(lines, _): modified = False updated_lines = [] for line in lines: @@ -91,7 +107,7 @@ def modify_content_stripspace(lines): return updated_lines, modified -def modify_content_inject_newlines(lines): +def modify_content_inject_newlines(lines, _): modified = False updated_lines = [] for line in lines: @@ -115,7 +131,7 @@ def is_warning(line): return line.startswith("> Warning:") -def modify_content_admonition(lines): +def modify_content_admonition(lines, _): modified = False updated_lines = [] admonition_lines = [] @@ -163,7 +179,7 @@ def is_shell_codeblock_start(line): return line == "```shell" -def modify_content_terminal_example(lines): +def modify_content_terminal_example(lines, _): modified = False updated_lines = [] command_block = [] @@ -236,15 +252,17 @@ def modify_content_terminal_example(lines): def update_markdown(src): markdown_files = [] - extensions = [".md"] + allowed_extensions = [".md"] for subdir, _, files in os.walk(src): for file in files: ext = os.path.splitext(file)[-1].lower() - if ext in extensions: - markdown_files.append(os.path.join(subdir, file)) + file_path = os.path.join(subdir, file) + if ext in allowed_extensions: + markdown_files.append(file_path) modifiers = [ modify_content_noop, + modify_content_links, modify_content_stripspace, modify_content_admonition, modify_content_terminal_example, @@ -257,7 +275,7 @@ def update_markdown(src): with open(file, 'r') as f: lines = f.readlines() for modifier in modifiers: - lines, m = modifier(lines) + lines, m = modifier(lines, file) if m: modified = True From 01531c39866ddc0ff9c3e331b3ef8544df26187c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 16:48:48 -0400 Subject: [PATCH 10/37] docs: cleanup links to renamed docs --- docs/advanced-usage/persistent-storage.md | 2 +- docs/advanced-usage/resource-management.md | 2 +- docs/appendices/0.25.0-migration-guide.md | 2 +- docs/deployment/application-deployment.md | 4 ++-- docs/deployment/logs.md | 2 +- docs/deployment/schedulers/scheduler-management.md | 2 -- docs/networking/network.md | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/advanced-usage/persistent-storage.md b/docs/advanced-usage/persistent-storage.md index 1edc4d404..fa288c49b 100644 --- a/docs/advanced-usage/persistent-storage.md +++ b/docs/advanced-usage/persistent-storage.md @@ -175,4 +175,4 @@ By default, Dokku will execute your buildpack app processes as the `herokuishuse > NOTE: this user must exist in your herokuish image. -Additionally, the default `docker-local` scheduler that comes with Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. See the [docker-local scheduler documentation](/docs/advanced-usage/schedulers/docker-local.md#disabling-chown-of-persistent-storage) docs for more information. +Additionally, the default `docker-local` scheduler that comes with Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. See the [docker-local scheduler documentation](/docs/deployment/schedulers/docker-local.md#disabling-chown-of-persistent-storage) docs for more information. diff --git a/docs/advanced-usage/resource-management.md b/docs/advanced-usage/resource-management.md index 24ebaf735..bcbe07a91 100644 --- a/docs/advanced-usage/resource-management.md +++ b/docs/advanced-usage/resource-management.md @@ -28,7 +28,7 @@ Valid resource options include: - `--network-egress` - `--nvidia-gpu` -See the [Supported Resource Management Properties](/docs/advanced-usage/schedulers/docker-local.md#supported-resource-management-properties) section of the docker local scheduler documentation for more information on how each resource limit maps to Docker. +See the [Supported Resource Management Properties](/docs/deployment/schedulers/docker-local.md#supported-resource-management-properties) section of the docker local scheduler documentation for more information on how each resource limit maps to Docker. Resource limits and reservations are applied only during the `run` and `deploy` phases of an application, and will not impact the `build` phase of an application. diff --git a/docs/appendices/0.25.0-migration-guide.md b/docs/appendices/0.25.0-migration-guide.md index 95c74490a..1ff9ab5b8 100644 --- a/docs/appendices/0.25.0-migration-guide.md +++ b/docs/appendices/0.25.0-migration-guide.md @@ -7,7 +7,7 @@ The [dokku-registry](https://github.com/dokku/dokku-registry) plugin is now buil - Builder plugins should call `post-release-builder` at the end of the build. - The `push` and `pull` command are not implemented. Users wishing to deploy a remote image should use `git:from-image`. Image pushing is not available at this time. - At this time, remote docker repositories are not automatically created for AWS, and users must create those repositories for their applications as necessary. This may be implemented in the future. -- Docker images are only pushed when configured to do so. See the [registry management documentation](/docs/deployment/registry-management.md) for more details. +- Docker images are only pushed when configured to do so. See the [registry management documentation](/docs/advanced-usage/registry-management.md) for more details. Before upgrading, uninstall the registry plugin via `dokku plugin:uninstall registry`. Not doing so will cause issues with Dokku. diff --git a/docs/deployment/application-deployment.md b/docs/deployment/application-deployment.md index eb8f85dc1..07ce90825 100644 --- a/docs/deployment/application-deployment.md +++ b/docs/deployment/application-deployment.md @@ -105,7 +105,7 @@ Dokku supports deploying applications in a few ways: - [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) via [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks): See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) to learn about the different ways to specify a buildpack. - This is the default method used by Dokku. - [Dockerfile](https://docs.docker.com/reference/builder/): See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys. -- [Docker Image](https://docs.docker.com/get-started/overview/#docker-objects): See the [docker image documentation](/docs/deployment/methods/images.md) to learn about how to deploy a Docker Image. +- [Docker Image](https://docs.docker.com/get-started/overview/#docker-objects): See the [docker image documentation](/docs/deployment/methods/git.md#initializing-an-app-repository-from-a-docker-image) to learn about how to deploy a Docker Image. ### Setting up SSL @@ -242,7 +242,7 @@ See the [Dockerfile documentation](/docs/deployment/builders/dockerfiles.md) for ## Image tagging -See the [image tagging documentation](/docs/deployment/methods/images.md) for more information on how Docker images can be tagged and deployed for a given application. +See the [image tagging documentation](/docs/deployment/methods/git.md#initializing-an-app-repository-from-a-docker-image) for more information on how Docker images can be tagged and deployed for a given application. ## Specifying a custom buildpack diff --git a/docs/deployment/logs.md b/docs/deployment/logs.md index 820e5ebd5..62cba312b 100644 --- a/docs/deployment/logs.md +++ b/docs/deployment/logs.md @@ -43,7 +43,7 @@ The above command will show logs continually from the web process. ### Failed deploy logs -> Warning: The default [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md) will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server. +> Warning: The default [docker-local scheduler](/docs/deployment/schedulers/docker-local.md) will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server. In some cases, it may be useful to retrieve the logs from a previously failed deploy. diff --git a/docs/deployment/schedulers/scheduler-management.md b/docs/deployment/schedulers/scheduler-management.md index 132720ed7..f41ca0390 100644 --- a/docs/deployment/schedulers/scheduler-management.md +++ b/docs/deployment/schedulers/scheduler-management.md @@ -18,8 +18,6 @@ Dokku supports the following built-in schedulers: - `scheduler-docker-local`: Schedules apps against the local docker socket and runs containers directly on the Dokku host. See the [docker-local scheduler documentation](/docs/deployment/schedulers/docker-local.md) for more information on how this scheduler functions. - `scheduler-null`: Does nothing during the scheduler phase. See the [null scheduler documentation](/docs/deployment/schedulers/null.md) for more information on how this scheduler functions. -See the [alternate schedulers documentation](/docs/deployment/schedulers/alternate-schedulers.md) for more information on other scheduler plugins. - ### Overriding the auto-selected scheduler If desired, the scheduler can be specified via the `scheduler:set` command by speifying a value for `selected`. The selected scheduler will always be used. diff --git a/docs/networking/network.md b/docs/networking/network.md index 237e0e0fe..95089cbc7 100644 --- a/docs/networking/network.md +++ b/docs/networking/network.md @@ -161,7 +161,7 @@ Only a single `$IP:$PORT` combination can be routed to for a given app, and that > New as of 0.20.0, Requires Docker 1.21+ -Apps will default to being associated with the default `bridge` network or a network specified by the `initial-network` network property. Additionally, an app can be attached to `attachable` networks by changing the `attach-post-create` or `attach-post-deploy` network properties when using the [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md). A change in these values will require an app deploy or rebuild. +Apps will default to being associated with the default `bridge` network or a network specified by the `initial-network` network property. Additionally, an app can be attached to `attachable` networks by changing the `attach-post-create` or `attach-post-deploy` network properties when using the [docker-local scheduler](/docs/deployment/schedulers/docker-local.md). A change in these values will require an app deploy or rebuild. ```shell # associates the network after a container is created but before it is started From 47c1bfe26d2a02c8dd7a1114870934c9584b19ef Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 17:07:57 -0400 Subject: [PATCH 11/37] docs: rename upgrading index to allow supporting navigation indexes --- docs/getting-started/{installation.md => installation/index.md} | 0 docs/getting-started/{upgrading.md => upgrading/index.md} | 2 +- docs/networking/dns.md | 2 +- mkdocs.yml | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) rename docs/getting-started/{installation.md => installation/index.md} (100%) rename docs/getting-started/{upgrading.md => upgrading/index.md} (99%) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation/index.md similarity index 100% rename from docs/getting-started/installation.md rename to docs/getting-started/installation/index.md diff --git a/docs/getting-started/upgrading.md b/docs/getting-started/upgrading/index.md similarity index 99% rename from docs/getting-started/upgrading.md rename to docs/getting-started/upgrading/index.md index b82d540cc..e45026086 100644 --- a/docs/getting-started/upgrading.md +++ b/docs/getting-started/upgrading/index.md @@ -1,6 +1,6 @@ # Upgrading -If your version of Dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/docs/getting-started/installation.md) on a new server. +If your version of Dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/docs/getting-started/installation/index.md) on a new server. ## Security Updates diff --git a/docs/networking/dns.md b/docs/networking/dns.md index e675783d6..80c5975b2 100644 --- a/docs/networking/dns.md +++ b/docs/networking/dns.md @@ -65,7 +65,7 @@ If everything is working correctly, you should also be able to query for any oth If they all return your IP address, you have set DNS up properly for dokku. You should also be able to `ssh root@myserver.example.tld` and access your server. -Proceed with the setup instructions in the [installation documentation](/docs/getting-started/installation.md) +Proceed with the setup instructions in the [installation documentation](/docs/getting-started/installation/index.md) ### Using the root of your domain (node-js-app.example.tld) diff --git a/mkdocs.yml b/mkdocs.yml index 556e7bc90..dde14b924 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -38,6 +38,7 @@ theme: custom_dir: docs/_overrides favicon: assets/favicons/favicon-96x96.png features: + - navigation.indexes - navigation.instant - navigation.sections - navigation.tabs From 4b0a40a20c26331b0a9c76845091b5065ffa6e2e Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 17:29:09 -0400 Subject: [PATCH 12/37] docs: add navigation indexes for installations and upgrades --- contrib/write-mkdocs | 45 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/contrib/write-mkdocs b/contrib/write-mkdocs index fe5ddfb6c..ad645f47e 100644 --- a/contrib/write-mkdocs +++ b/contrib/write-mkdocs @@ -32,13 +32,52 @@ def get_nav_from_selector(soup, selector, docs_dir): filename = filename.replace("http://dokku.viewdocs.io/dokku/", "") filename = filename.strip("/") + ".md" filename = filename.removeprefix("dokku/") + + ignore_errors_for = [ + "getting-started/installation.md", + "getting-started/upgrading.md", + ] if not os.path.exists(docs_dir + "/" + filename): - print("error fetching markdown file:", filename) - continue + if filename not in ignore_errors_for: + print("error fetching markdown file:", filename) + continue for nav in navigation: if header_name in nav: - nav[header_name].append(filename) + if filename == "getting-started/installation.md": + child_dir = "getting-started/install/" + children = os.listdir(docs_dir + "/" + child_dir) + children = [child_dir + c for c in children] + children.insert( + 0, "getting-started/advanced-installation.md") + if os.path.exists(docs_dir + "/" + filename): + children.insert(0, filename) + else: + children.insert( + 0, "getting-started/installation/index.md") + nav[header_name].append({ + "Getting Started with Dokku": children, + }) + continue + elif filename == "getting-started/upgrading.md": + child_dir = "appendices/" + children = os.listdir(docs_dir + "/" + child_dir) + + children.sort(key=lambda x: list( + map(int, x.split("-")[0].split('.'))), + reverse=True) + children = [child_dir + c for c in children] + if os.path.exists(docs_dir + "/" + filename): + children.insert(0, filename) + else: + children.insert( + 0, "getting-started/upgrading/index.md") + nav[header_name].append({ + "Upgrading": children, + }) + continue + else: + nav[header_name].append(filename) return navigation From 1d5c9edbd2907def87af92c6c055f9ca0d9d5a39 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 17:35:17 -0400 Subject: [PATCH 13/37] docs: use an easier to understand icon for toggling light mode --- mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index dde14b924..584fd8a65 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -55,14 +55,14 @@ theme: - media: "(prefers-color-scheme: light)" scheme: default toggle: - icon: material/brightness-7 + icon: material/toggle-switch name: Switch to dark mode # Palette toggle for dark mode - media: "(prefers-color-scheme: dark)" scheme: slate toggle: - icon: material/brightness-4 + icon: material/toggle-switch-off-outline name: Switch to light mode plugins: From d560ee13e08bdc706394adcd72eb64786233c803 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 17:35:30 -0400 Subject: [PATCH 14/37] docs: switch to the acquamarine color --- docs/assets/extra.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/assets/extra.css b/docs/assets/extra.css index e69de29bb..d52a3ca82 100644 --- a/docs/assets/extra.css +++ b/docs/assets/extra.css @@ -0,0 +1,5 @@ +:root > * { + --md-primary-fg-color: #2A8FBD; + --md-primary-fg-color--light: #ECB7B7; + --md-primary-fg-color--dark: #90030C; +} From 8fe33a0e410fad6f23f47d236a4ccdaa1bc344ca Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 17:35:48 -0400 Subject: [PATCH 15/37] docs: copy the extra css to subsites --- contrib/build-docs | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/build-docs b/contrib/build-docs index d26e8beb9..4e29ee448 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -13,6 +13,7 @@ main() { rm -rf docs/assets mkdir -p docs/assets + cp -r docs-main/assets/extra.css docs/assets/extra.css cp -r docs-main/assets/favicons docs/assets/favicons cp -r docs-main/assets/dokku-logo.svg docs/assets/dokku-logo.svg From d3890fee9f6ebbae12b8eb33ed1c752c9ab3ea5f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 19:03:56 -0400 Subject: [PATCH 16/37] feat: add rewrites for older versions --- contrib/build-docs | 4 ++++ docs/_build/app-nginx.conf.sigil | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 docs/_build/app-nginx.conf.sigil diff --git a/contrib/build-docs b/contrib/build-docs index 4e29ee448..0a856e89d 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -eo pipefail +set -x readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)" @@ -19,6 +20,8 @@ main() { rm -rf tmp/docs-build/assets cp -r docs-main/assets tmp/docs-build/assets + cp docs-main/_build/app-nginx.conf.sigil tmp/docs-build/app-nginx.conf.sigil + mkdir -p tmp/docs-build/nginx.conf.d make docs-build mv site tmp/docs-build/docs @@ -39,6 +42,7 @@ main() { if [[ "$major" -lt 1 ]]; then if [[ "$current_version" != "$version" ]] && [[ "$minor" -lt 28 ]]; then + echo "rewrite ^/docs~$version/(.*)$ /docs~$current_version\$1 last;" > "tmp/docs-build/nginx.conf.d/$version.conf" rm -rf "tmp/docs-build/docs~v${version}" patch=$((patch - 1)) continue diff --git a/docs/_build/app-nginx.conf.sigil b/docs/_build/app-nginx.conf.sigil new file mode 100644 index 000000000..6f3578163 --- /dev/null +++ b/docs/_build/app-nginx.conf.sigil @@ -0,0 +1,38 @@ +worker_processes 1; +error_log stderr; +pid nginx.pid; +daemon off; + +events { + worker_connections 768; +} + +http { + types_hash_max_size 2048; + include mime.types; + charset UTF-8; + server { + listen {{ $.PORT }}; + server_name _; + {{ if ne $.NGINX_ROOT "" }} + root /app/www/{{ $.NGINX_ROOT }}; + {{ else }} + root /app/www; + {{ end }} + index index.html; + port_in_redirect off; + + include /app/www/nginx.conf.d/*.conf; + location ^~ /nginx.conf.d/ { + return 404; + } + + location / { + {{ if ne $.NGINX_DEFAULT_REQUEST "" }} + try_files $uri $uri/ /{{ $.NGINX_DEFAULT_REQUEST }}; + {{ else }} + try_files $uri $uri/ =404; + {{ end }} + } + } +} From 1d232aae89cd8fc82a77197d6e0c8ba898594d36 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 19:04:53 -0400 Subject: [PATCH 17/37] fix: add missing / --- contrib/build-docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/build-docs b/contrib/build-docs index 0a856e89d..b2f249dc0 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -42,7 +42,7 @@ main() { if [[ "$major" -lt 1 ]]; then if [[ "$current_version" != "$version" ]] && [[ "$minor" -lt 28 ]]; then - echo "rewrite ^/docs~$version/(.*)$ /docs~$current_version\$1 last;" > "tmp/docs-build/nginx.conf.d/$version.conf" + echo "rewrite ^/docs~$version/(.*)$ /docs~$current_version/\$1 last;" > "tmp/docs-build/nginx.conf.d/$version.conf" rm -rf "tmp/docs-build/docs~v${version}" patch=$((patch - 1)) continue From 32404911137cc87d02d0d00f918391c0c8a1ea04 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 19:28:05 -0400 Subject: [PATCH 18/37] fix: ensure the assets are always up to date --- contrib/build-docs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/build-docs b/contrib/build-docs index b2f249dc0..3a0030eaa 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -50,6 +50,10 @@ main() { fi if [[ -d "tmp/docs-build/docs~v${version}" ]]; then + rm -rf "tmp/docs-build/docs~v${version}/assets/favicons" + cp -r docs-main/assets/favicons "tmp/docs-build/docs~v${version}/assets/favicons" + cp -r docs-main/assets/dokku-logo.svg "tmp/docs-build/docs~v${version}/assets/dokku-logo.svg" + cp -r docs-main/assets/extra.css "tmp/docs-build/docs~v${version}/assets/extra.css" patch=$((patch - 1)) continue fi @@ -63,6 +67,7 @@ main() { mkdir -p docs/assets cp -r docs-main/assets/favicons docs/assets/favicons cp -r docs-main/assets/dokku-logo.svg docs/assets/dokku-logo.svg + cp -r docs-main/assets/extra.css docs/assets/extra.css cp -r docs-main/_build docs/_build cp -r docs-main/_overrides docs/_overrides From 48ddbb4279a6b160723e44a0221c0f1932b40c47 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 19:28:20 -0400 Subject: [PATCH 19/37] feat: ensure we build the app with the static buildpack --- contrib/build-docs | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/build-docs b/contrib/build-docs index 3a0030eaa..28e568b9e 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -22,6 +22,7 @@ main() { cp -r docs-main/assets tmp/docs-build/assets cp docs-main/_build/app-nginx.conf.sigil tmp/docs-build/app-nginx.conf.sigil mkdir -p tmp/docs-build/nginx.conf.d + touch tmp/docs-build/.static make docs-build mv site tmp/docs-build/docs From 11b640c0b84c08c68d2261246b8b1a21459583dd Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 19:28:33 -0400 Subject: [PATCH 20/37] fix: drop trace output --- contrib/build-docs | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/build-docs b/contrib/build-docs index 28e568b9e..525cca474 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -1,6 +1,5 @@ #!/usr/bin/env bash set -eo pipefail -set -x readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)" From cf92615936d8170a842a136e5fd1d799bd50b8a2 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 19:38:46 -0400 Subject: [PATCH 21/37] feat: add social links to footer --- mkdocs.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 584fd8a65..1aa6d0681 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -27,8 +27,20 @@ site_url: https://dokku.com/docs/ extra: social: + - icon: fontawesome/brands/github + link: https://github.com/dokku/dokku - icon: fontawesome/solid/bug link: https://github.com/dokku/dokku/issues + - icon: fontawesome/brands/discord + link: https://discord.gg/YQjANGMZvu + - icon: fontawesome/brands/slack + link: https://slack.dokku.com/ + - icon: fontawesome/solid/hashtag + link: https://webchat.libera.chat/?channels=dokku + - icon: fontawesome/brands/twitter + link: https://twitter.com/dokku + - icon: fontawesome/solid/comments + link: https://github.com/dokku/dokku/discussions - icon: fontawesome/solid/cart-shopping link: https://dokku.dpdcart.com/cart/add?product_id=217344&method_id=236878 version: From 98117db6a58076995c578f0a8a5fe138a78bdb13 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 20:09:15 -0400 Subject: [PATCH 22/37] feat: write the mkdocs version --- contrib/build-docs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/build-docs b/contrib/build-docs index 525cca474..7db024996 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -22,13 +22,18 @@ main() { cp docs-main/_build/app-nginx.conf.sigil tmp/docs-build/app-nginx.conf.sigil mkdir -p tmp/docs-build/nginx.conf.d touch tmp/docs-build/.static + echo "[]" > tmp/docs-build/versions.json make docs-build + rm -rf site/_build mv site tmp/docs-build/docs mv docs/home.html tmp/docs-build/index.html sed -i.bak "s/{{NAME}}~{{REF}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak sed -i.bak "s/{{NAME}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak + jq '. += [{"title": "latest", "version": "docs", "aliases": []}]' tmp/docs-build/versions.json > tmp/docs-build/versions.json.bak + mv tmp/docs-build/versions.json.bak tmp/docs-build/versions.json + jq -C -r '.["max-versions"][]' docs-main/assets/versions.json | while read -r current_version; do major="$(echo "$current_version" | cut -d'.' -f1)" minor="$(echo "$current_version" | cut -d'.' -f2)" @@ -49,6 +54,8 @@ main() { fi fi + jq --arg title "v$version" --arg version "docs~v$version" '. += [{"title": $title, "version": $version, "aliases": []}]' tmp/docs-build/versions.json > tmp/docs-build/versions.json.bak + mv tmp/docs-build/versions.json.bak tmp/docs-build/versions.json if [[ -d "tmp/docs-build/docs~v${version}" ]]; then rm -rf "tmp/docs-build/docs~v${version}/assets/favicons" cp -r docs-main/assets/favicons "tmp/docs-build/docs~v${version}/assets/favicons" @@ -86,6 +93,7 @@ main() { fi if [[ -d "docs~v${version}" ]]; then + rm -rf "docs~v${version}/_build" mv "docs~v${version}" "tmp/docs-build/docs~v${version}" fi From 460edc8b3e5f5d872104e1ec90b3c171a906b6b3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 20:24:57 -0400 Subject: [PATCH 23/37] fix: remove unneeded variables --- docs/_build/app-nginx.conf.sigil | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/_build/app-nginx.conf.sigil b/docs/_build/app-nginx.conf.sigil index 6f3578163..4870d426e 100644 --- a/docs/_build/app-nginx.conf.sigil +++ b/docs/_build/app-nginx.conf.sigil @@ -14,11 +14,7 @@ http { server { listen {{ $.PORT }}; server_name _; - {{ if ne $.NGINX_ROOT "" }} - root /app/www/{{ $.NGINX_ROOT }}; - {{ else }} - root /app/www; - {{ end }} + root /app/www; index index.html; port_in_redirect off; @@ -28,11 +24,7 @@ http { } location / { - {{ if ne $.NGINX_DEFAULT_REQUEST "" }} - try_files $uri $uri/ /{{ $.NGINX_DEFAULT_REQUEST }}; - {{ else }} - try_files $uri $uri/ =404; - {{ end }} + try_files $uri $uri/ =404; } } } From 4c9deedba9ce07f5dbd560ce30756a0ca8e645c1 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 20:25:41 -0400 Subject: [PATCH 24/37] fix: rewrite home logo link in index.html --- contrib/build-docs | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/build-docs b/contrib/build-docs index 7db024996..68bc3cf71 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -30,6 +30,7 @@ main() { mv docs/home.html tmp/docs-build/index.html sed -i.bak "s/{{NAME}}~{{REF}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak sed -i.bak "s/{{NAME}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak + sed -i.bak 's/="\/docs\/"/="\/"/g' tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak jq '. += [{"title": "latest", "version": "docs", "aliases": []}]' tmp/docs-build/versions.json > tmp/docs-build/versions.json.bak mv tmp/docs-build/versions.json.bak tmp/docs-build/versions.json From 344d2e83ad7b5b94043d63e3c4c6659fc0374908 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 20:41:40 -0400 Subject: [PATCH 25/37] fix: ensure the versions are sorted --- contrib/build-docs | 1 + contrib/sort-mkdocs-versions | 38 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 contrib/sort-mkdocs-versions diff --git a/contrib/build-docs b/contrib/build-docs index 68bc3cf71..ed503eb3a 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -105,6 +105,7 @@ main() { done done + python contrib/sort-mkdocs-versions rm -rf docs mv docs-main docs git checkout -- mkdocs.yml docs diff --git a/contrib/sort-mkdocs-versions b/contrib/sort-mkdocs-versions new file mode 100644 index 000000000..961dd8bf0 --- /dev/null +++ b/contrib/sort-mkdocs-versions @@ -0,0 +1,38 @@ +#!/usr/bin/env python +import json + + +def main(): + version_file = "tmp/docs-build/versions.json" + data = [] + with open(version_file) as f: + data = json.load(f) + + versions = [] + for info in data: + if info["title"] == "latest": + continue + versions.append(info["title"].removeprefix("v")) + + versions.sort(key=lambda x: list(map(int, x.split('.'))), reverse=True) + data = [ + { + "aliases": [], + "title": "latest", + "version": "docs", + } + ] + + for version in versions: + data.append({ + "aliases": [], + "title": f"v{version}", + "version": f"docs~v{version}", + }) + + with open(version_file, "w") as f: + json.dump(data, f, indent=4) + + +if __name__ == "__main__": + main() From e77e8d71bde3a492e65fcf1b9adb2cd2263fe7f4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 20:58:29 -0400 Subject: [PATCH 26/37] fix: redirect to the correct page for old doc versions --- contrib/build-docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/build-docs b/contrib/build-docs index ed503eb3a..70ec058d8 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -48,7 +48,7 @@ main() { if [[ "$major" -lt 1 ]]; then if [[ "$current_version" != "$version" ]] && [[ "$minor" -lt 28 ]]; then - echo "rewrite ^/docs~$version/(.*)$ /docs~$current_version/\$1 last;" > "tmp/docs-build/nginx.conf.d/$version.conf" + echo "rewrite ^/docs~v$version/(.*)$ /docs~v$current_version/\$1 redirect;" > "tmp/docs-build/nginx.conf.d/$version.conf" rm -rf "tmp/docs-build/docs~v${version}" patch=$((patch - 1)) continue From a862bdaf88514843e9192a107a27ca12bf19d760 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:02:44 -0400 Subject: [PATCH 27/37] feat: add override --- docs/_overrides/main.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/_overrides/main.html b/docs/_overrides/main.html index b26dbf43a..29377c1aa 100644 --- a/docs/_overrides/main.html +++ b/docs/_overrides/main.html @@ -47,3 +47,10 @@ {% endblock %} + +{% block outdated %} + You're not viewing the latest version. + + Click here to go to latest. + +{% endblock %} From 401183fdd8cecffad953e98b7bd8e35db11a2e9f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:20:16 -0400 Subject: [PATCH 28/37] feat: use absolute url --- docs/_overrides/main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_overrides/main.html b/docs/_overrides/main.html index 29377c1aa..8233afc3b 100644 --- a/docs/_overrides/main.html +++ b/docs/_overrides/main.html @@ -50,7 +50,7 @@ {% block outdated %} You're not viewing the latest version. - + Click here to go to latest. {% endblock %} From b53a8526cd61cc5b9af68adf12482b50dd0a6301 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:20:42 -0400 Subject: [PATCH 29/37] fix: add latest alias to latest docs --- contrib/build-docs | 3 --- contrib/sort-mkdocs-versions | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/build-docs b/contrib/build-docs index 70ec058d8..d330a0b88 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -32,9 +32,6 @@ main() { sed -i.bak "s/{{NAME}}/docs/g" tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak sed -i.bak 's/="\/docs\/"/="\/"/g' tmp/docs-build/index.html && rm tmp/docs-build/index.html.bak - jq '. += [{"title": "latest", "version": "docs", "aliases": []}]' tmp/docs-build/versions.json > tmp/docs-build/versions.json.bak - mv tmp/docs-build/versions.json.bak tmp/docs-build/versions.json - jq -C -r '.["max-versions"][]' docs-main/assets/versions.json | while read -r current_version; do major="$(echo "$current_version" | cut -d'.' -f1)" minor="$(echo "$current_version" | cut -d'.' -f2)" diff --git a/contrib/sort-mkdocs-versions b/contrib/sort-mkdocs-versions index 961dd8bf0..21ef20020 100644 --- a/contrib/sort-mkdocs-versions +++ b/contrib/sort-mkdocs-versions @@ -17,7 +17,7 @@ def main(): versions.sort(key=lambda x: list(map(int, x.split('.'))), reverse=True) data = [ { - "aliases": [], + "aliases": ["latest"], "title": "latest", "version": "docs", } From 4b086ff8a4ea05bce1aad477e35c0006c94ab789 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:21:06 -0400 Subject: [PATCH 30/37] chore: hide outdated message for latest docs --- contrib/build-docs | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/build-docs b/contrib/build-docs index d330a0b88..dcfda9a5f 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -24,6 +24,7 @@ main() { touch tmp/docs-build/.static echo "[]" > tmp/docs-build/versions.json + sed -i.bak "s/outdated/outdated-hidden/g" docs/_overrides/main.html && rm docs/_overrides/main.html.bak make docs-build rm -rf site/_build mv site tmp/docs-build/docs From 80924a0c31239967a621fe635992163ec7aa8107 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:22:19 -0400 Subject: [PATCH 31/37] fix: do not use unsupported hyphens in block name --- contrib/build-docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/build-docs b/contrib/build-docs index dcfda9a5f..6cd5986ad 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -24,7 +24,7 @@ main() { touch tmp/docs-build/.static echo "[]" > tmp/docs-build/versions.json - sed -i.bak "s/outdated/outdated-hidden/g" docs/_overrides/main.html && rm docs/_overrides/main.html.bak + sed -i.bak "s/outdated/outdated_hidden/g" docs/_overrides/main.html && rm docs/_overrides/main.html.bak make docs-build rm -rf site/_build mv site tmp/docs-build/docs From 9cb54fc74238ffb6c9c35df72bfa5b22d9c55496 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:28:05 -0400 Subject: [PATCH 32/37] chore: silence command --- docs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.mk b/docs.mk index 2231448da..911eef17d 100644 --- a/docs.mk +++ b/docs.mk @@ -4,7 +4,7 @@ docs-build-image: .PHONY: docs-build docs-build: - docker run --rm -p 3487:3487 -v "$(PWD):/usr/src/source" --name docs-serve app/mkdocs build + @docker run --rm -p 3487:3487 -v "$(PWD):/usr/src/source" --name docs-serve app/mkdocs build .PHONY: docs-serve docs-serve: From 9ab58d6f332ab8c4c04f10e6831a5b457c44fed3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:31:55 -0400 Subject: [PATCH 33/37] feat: cleanup output and only ever generate latest docs for a version --- contrib/build-docs | 17 +++++++++++------ contrib/write-mkdocs | 4 ++-- docs/_build/entrypoint | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/contrib/build-docs b/contrib/build-docs index 6cd5986ad..5a9689d5e 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -9,7 +9,8 @@ main() { mkdir -p tmp/docs-build cp -r docs docs-main - git clone https://github.com/dokku/dokku.git tmp/docs-source + echo "====> Processing version: latest" + git clone -q https://github.com/dokku/dokku.git tmp/docs-source rm -rf docs/assets mkdir -p docs/assets @@ -25,6 +26,7 @@ main() { echo "[]" > tmp/docs-build/versions.json sed -i.bak "s/outdated/outdated_hidden/g" docs/_overrides/main.html && rm docs/_overrides/main.html.bak + echo "----> Generating docs" make docs-build rm -rf site/_build mv site tmp/docs-build/docs @@ -42,11 +44,13 @@ main() { break fi version="${major}.${minor}.${patch}" - echo "version: ${major}.${minor}.${patch}" + echo "====> Processing version: ${major}.${minor}.${patch}" if [[ "$major" -lt 1 ]]; then - if [[ "$current_version" != "$version" ]] && [[ "$minor" -lt 28 ]]; then + if [[ "$current_version" != "$version" ]]; then + echo " Writing rewrite rule" echo "rewrite ^/docs~v$version/(.*)$ /docs~v$current_version/\$1 redirect;" > "tmp/docs-build/nginx.conf.d/$version.conf" + echo " Removing old docs" rm -rf "tmp/docs-build/docs~v${version}" patch=$((patch - 1)) continue @@ -64,8 +68,8 @@ main() { continue fi - git -C tmp/docs-source checkout -- . - git -C tmp/docs-source checkout "tags/v${version}" -b "v${version}-branch" + git -C tmp/docs-source checkout -q -- . + git -C tmp/docs-source checkout -q "tags/v${version}" -b "v${version}-branch" rm -rf docs mv tmp/docs-source/docs docs @@ -77,7 +81,7 @@ main() { cp -r docs-main/_build docs/_build cp -r docs-main/_overrides docs/_overrides - git checkout -- mkdocs.yml + git checkout -q -- mkdocs.yml sed -i.bak "s/site_dir: site/site_dir: docs~v$version/g" mkdocs.yml && rm mkdocs.yml.bak if [[ ! -f docs/template.html ]]; then if [[ "$patch" -eq 0 ]]; then @@ -87,6 +91,7 @@ main() { continue fi + echo "----> Generating docs" if ! make docs-build; then continue fi diff --git a/contrib/write-mkdocs b/contrib/write-mkdocs index ad645f47e..71cea848e 100644 --- a/contrib/write-mkdocs +++ b/contrib/write-mkdocs @@ -324,11 +324,11 @@ def update_markdown(src): def main(): - print("====> Copying mkdocs.yml") + print("----> Copying mkdocs.yml") print(" Generating navigation") generate_nav("/usr/src/source/mkdocs.yml", "/usr/src/app/mkdocs.yml") - print("====> Copying docs folder") + print("----> Copying docs folder") update_markdown("/usr/src/source/docs",) if os.path.exists("/usr/src/app/docs"): diff --git a/docs/_build/entrypoint b/docs/_build/entrypoint index 2cf2adf22..891f76432 100755 --- a/docs/_build/entrypoint +++ b/docs/_build/entrypoint @@ -14,6 +14,7 @@ main() { if [[ "$CMD" == "build" ]]; then write-mkdocs + echo "----> Executing mkdocs build" mkdocs build site_dir="$(grep site_dir mkdocs.yml | awk '{print $2}')" cp -r "/usr/src/app/${site_dir}" "/usr/src/source/${site_dir}" From dd26a82646dd4964f7cddb319ad92bf2089893c4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:33:26 -0400 Subject: [PATCH 34/37] fix: add note about existing docs --- contrib/build-docs | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/build-docs b/contrib/build-docs index 5a9689d5e..b3683c45e 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -60,6 +60,7 @@ main() { jq --arg title "v$version" --arg version "docs~v$version" '. += [{"title": $title, "version": $version, "aliases": []}]' tmp/docs-build/versions.json > tmp/docs-build/versions.json.bak mv tmp/docs-build/versions.json.bak tmp/docs-build/versions.json if [[ -d "tmp/docs-build/docs~v${version}" ]]; then + echo " ! Docs exist, skipping regeneration" rm -rf "tmp/docs-build/docs~v${version}/assets/favicons" cp -r docs-main/assets/favicons "tmp/docs-build/docs~v${version}/assets/favicons" cp -r docs-main/assets/dokku-logo.svg "tmp/docs-build/docs~v${version}/assets/dokku-logo.svg" From 4ed1bcb3f4bf65eb7575e9f1129333a214ddc5f5 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:45:46 -0400 Subject: [PATCH 35/37] chore: fix formatting --- contrib/build-docs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/build-docs b/contrib/build-docs index b3683c45e..8bbbfc7f5 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -23,7 +23,7 @@ main() { cp docs-main/_build/app-nginx.conf.sigil tmp/docs-build/app-nginx.conf.sigil mkdir -p tmp/docs-build/nginx.conf.d touch tmp/docs-build/.static - echo "[]" > tmp/docs-build/versions.json + echo "[]" >tmp/docs-build/versions.json sed -i.bak "s/outdated/outdated_hidden/g" docs/_overrides/main.html && rm docs/_overrides/main.html.bak echo "----> Generating docs" @@ -49,7 +49,7 @@ main() { if [[ "$major" -lt 1 ]]; then if [[ "$current_version" != "$version" ]]; then echo " Writing rewrite rule" - echo "rewrite ^/docs~v$version/(.*)$ /docs~v$current_version/\$1 redirect;" > "tmp/docs-build/nginx.conf.d/$version.conf" + echo "rewrite ^/docs~v$version/(.*)$ /docs~v$current_version/\$1 redirect;" >"tmp/docs-build/nginx.conf.d/$version.conf" echo " Removing old docs" rm -rf "tmp/docs-build/docs~v${version}" patch=$((patch - 1)) @@ -57,7 +57,7 @@ main() { fi fi - jq --arg title "v$version" --arg version "docs~v$version" '. += [{"title": $title, "version": $version, "aliases": []}]' tmp/docs-build/versions.json > tmp/docs-build/versions.json.bak + jq --arg title "v$version" --arg version "docs~v$version" '. += [{"title": $title, "version": $version, "aliases": []}]' tmp/docs-build/versions.json >tmp/docs-build/versions.json.bak mv tmp/docs-build/versions.json.bak tmp/docs-build/versions.json if [[ -d "tmp/docs-build/docs~v${version}" ]]; then echo " ! Docs exist, skipping regeneration" From c2a170b6ecea0629190ed65448ac81a08a45fa4b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:49:04 -0400 Subject: [PATCH 36/37] chore: use normal blog link for now --- contrib/write-mkdocs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/write-mkdocs b/contrib/write-mkdocs index 71cea848e..71e70b430 100644 --- a/contrib/write-mkdocs +++ b/contrib/write-mkdocs @@ -105,7 +105,7 @@ def generate_nav(src, dest): data["nav"] = [ {"Docs": navigation}, {"Pro": "https://pro.dokku.com/docs/getting-started/"}, - {"Blog": "https://pro.dokku.com/blog/"}, + {"Blog": "https://dokku.github.io/"}, {"Purchase Dokku Pro": "https://dokku.dpdcart.com/cart/add?product_id=217344&method_id=236878"}, ] From 884571595949c37d2bb487c8c16bed96de4cd776 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Sep 2022 21:53:34 -0400 Subject: [PATCH 37/37] fix: correct current version --- docs/home.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/home.html b/docs/home.html index d77e00122..042e7bb12 100644 --- a/docs/home.html +++ b/docs/home.html @@ -98,7 +98,7 @@
-
Latest release v0.27.1
+
Latest release v0.28.1

An open source PAAS alternative to Heroku.

Dokku helps you build and manage the lifecycle of applications from building to scaling.