Sorry, but the documentation page that you are looking for was not found.
\n\nDocumentation changes over time, and pages are moved around. We try to redirect you to the updated content where possible, but unfortunately, that didn\'t work this time (maybe because the content you were looking for does not exist in this version of the documentation).
\nYou can try to use the navigation to locate the content you\'re looking for, or search for a similar page.
\n', -} - -# Default image for OGP (to prevent font errors, see -# https://github.com/canonical/sphinx-docs-starter-pack/pull/54 ) -if not 'ogp_image' in locals(): - ogp_image = 'https://assets.ubuntu.com/v1/253da317-image-document-ubuntudocs.svg' - -############################################################ -### General configuration -############################################################ - -exclude_patterns = [ - '_build', - 'Thumbs.db', - '.DS_Store', - '.sphinx', -] -exclude_patterns.extend(custom_excludes) - -rst_epilog = ''' -.. include:: /reuse/links.txt -''' -if 'custom_rst_epilog' in locals(): - rst_epilog = custom_rst_epilog - -source_suffix = { - '.rst': 'restructuredtext', - '.md': 'markdown', -} - -if not 'conf_py_path' in html_context and 'github_folder' in html_context: - html_context['conf_py_path'] = html_context['github_folder'] - -# For ignoring specific links -linkcheck_anchors_ignore_for_url = [ - r'https://github\.com/.*' -] -linkcheck_anchors_ignore_for_url.extend(custom_linkcheck_anchors_ignore_for_url) - -# Tags cannot be added directly in custom_conf.py, so add them here -for tag in custom_tags: - tags.add(tag) - -# html_context['get_contribs'] is a function and cannot be -# cached (see https://github.com/sphinx-doc/sphinx/issues/12300) -suppress_warnings = ["config.cache"] - -############################################################ -### Styling -############################################################ - -# Find the current builder -builder = 'dirhtml' -if '-b' in sys.argv: - builder = sys.argv[sys.argv.index('-b')+1] - -# Setting templates_path for epub makes the build fail -if builder == 'dirhtml' or builder == 'html': - templates_path = ['.sphinx/_templates'] - notfound_template = '404.html' - -# Theme configuration -html_theme = 'furo' -html_last_updated_fmt = '' -html_permalinks_icon = '¶' - -if html_title == '': - html_theme_options = { - 'sidebar_hide_name': True - } - -############################################################ -### Additional files -############################################################ - -html_static_path = ['.sphinx/_static'] - -html_css_files = [ - 'custom.css', - 'header.css', - 'github_issue_links.css', - 'furo_colors.css', - 'footer.css' -] -html_css_files.extend(custom_html_css_files) - -html_js_files = ['header-nav.js', 'footer.js'] -if 'github_issues' in html_context and html_context['github_issues'] and not disable_feedback_button: - html_js_files.append('github_issue_links.js') -html_js_files.extend(custom_html_js_files) - -############################################################# -# Display the contributors - - -############################################################# -# DISABLED AS IT DOESN'T WORK FOR source not in same dir - -#def get_contributors_for_file(github_url, github_folder, github_source, pagename, page_source_suffix, display_contributors_since=None): -# filename = f"{pagename}{page_source_suffix}" -# paths=html_context['github_source'][1:] + filename -# -# try: -# repo = Repo(".") -# except InvalidGitRepositoryError: -# cwd = os.getcwd() -# ghfolder = html_context['github_source'][:-1] -# -# if ghfolder and cwd.endswith(ghfolder): -# repo = Repo(cwd.rpartition(ghfolder)[0]) -# else: -# print("The local Git repository could not be found.") -# return -# -# since = display_contributors_since if display_contributors_since and display_contributors_since.strip() else None -# -# commits = repo.iter_commits(paths=paths, since=since) -# -# contributors_dict = {} -# for commit in commits: -# contributor = commit.author.name -# if contributor not in contributors_dict or commit.committed_date > contributors_dict[contributor]['date']: -# contributors_dict[contributor] = { -# 'date': commit.committed_date, -# 'sha': commit.hexsha -# } -# # The github_page contains the link to the contributor's latest commit. -# contributors_list = [{'name': name, 'github_page': f"{github_url}/commit/{data['sha']}"} for name, data in contributors_dict.items()] -# sorted_contributors_list = sorted(contributors_list, key=lambda x: x['name']) -# return sorted_contributors_list -# -# html_context['get_contribs'] = get_contributors_for_file - -############################################################ -### Myst configuration -############################################################ -if os.path.exists('./reuse/substitutions.yaml'): - with open('./reuse/substitutions.yaml', 'r') as fd: - myst_substitutions = yaml.safe_load(fd.read()) - - -############################################################ -### PDF configuration -############################################################ - -latex_additional_files = [ - "./.sphinx/fonts/Ubuntu-B.ttf", - "./.sphinx/fonts/Ubuntu-R.ttf", - "./.sphinx/fonts/Ubuntu-RI.ttf", - "./.sphinx/fonts/UbuntuMono-R.ttf", - "./.sphinx/fonts/UbuntuMono-RI.ttf", - "./.sphinx/fonts/UbuntuMono-B.ttf", - "./.sphinx/images/Canonical-logo-4x.png", - "./.sphinx/images/front-page-light.pdf", - "./.sphinx/images/normal-page-footer.pdf", -] - -latex_engine = 'xelatex' -latex_show_pagerefs = True -latex_show_urls = 'footnote' - -with open(".sphinx/latex_elements_template.txt", "rt") as file: - latex_config = file.read() - -latex_elements = ast.literal_eval(latex_config.replace("$PROJECT", project)) - -master_doc = 'index' \ No newline at end of file diff --git a/docs/canonicalk8s/conf.py b/docs/canonicalk8s/conf.py index c804e78c1..5cc3cafeb 100644 --- a/docs/canonicalk8s/conf.py +++ b/docs/canonicalk8s/conf.py @@ -192,7 +192,7 @@ # except InvalidGitRepositoryError: # cwd = os.getcwd() # ghfolder = html_context['github_source'][:-1] -# +# # if ghfolder and cwd.endswith(ghfolder): # repo = Repo(cwd.rpartition(ghfolder)[0]) # else: @@ -252,4 +252,4 @@ latex_elements = ast.literal_eval(latex_config.replace("$PROJECT", project)) -master_doc = 'index' \ No newline at end of file +master_doc = 'index' diff --git a/docs/canonicalk8s/custom_conf.py b/docs/canonicalk8s/custom_conf.py index e0ff5a05d..3568d992d 100644 --- a/docs/canonicalk8s/custom_conf.py +++ b/docs/canonicalk8s/custom_conf.py @@ -99,7 +99,7 @@ # Change to the folder that contains the documentation # (usually "/" or "/docs/") - 'github_folder': '/docs/', + 'github_folder': '/docs/canonicalk8s/', # Change to an empty value if your GitHub repo doesn't have issues enabled. # This will disable the feedback button and the issue link in the footer. @@ -143,7 +143,9 @@ 'http://127.0.0.1:8000', 'http://rocks.canonical.com', 'about', - 'https://ceph.io/' + 'https://ceph.io/', + 'https://charmhub.io/k8s/', + 'https://charmhub.io/k8s-worker/' ] # Pages on which to ignore anchors @@ -160,6 +162,8 @@ # Remove this variable to disable the MyST parser extensions. custom_myst_extensions = [] +suppress_warnings = ["myst.xref_missing", "myst.iref_ambiguous"] + # Add custom Sphinx extensions as needed. # This array contains recommended extensions that should be used. # NOTE: The following extensions are handled automatically and do @@ -190,7 +194,7 @@ custom_excludes = [ 'doc-cheat-sheet*', '_parts/*', - 'src/_parts' + '/_parts' ] # Add CSS files (located in .sphinx/_static/) @@ -243,5 +247,7 @@ 'https://ubuntu.com/about/release-cycle', 'https://juju.is/docs/juju/relation', 'https://canonical.com/multipass/docs/tutorial', - 'https://microk8s.io/docs/how-to-cis-harden' + 'https://microk8s.io/docs/how-to-cis-harden', + 'https://registry.terraform.io/providers/juju/juju/latest/docs', + 'https://snapcraft.io/docs/managing-updates' ] diff --git a/docs/canonicalk8s/index.md b/docs/canonicalk8s/index.md index 6b9ba94b1..de5806a87 100644 --- a/docs/canonicalk8s/index.md +++ b/docs/canonicalk8s/index.md @@ -17,7 +17,7 @@ development and innovation without having to worry about the infrastructure. Whether you are deploying a small cluster to get accustomed to Kubernetes or a huge enterprise level deployment across the globe, {{product}} can cater to your needs. If you would like to jump straight in, head to the -[snap getting started tutorial!](src/snap/tutorial/getting-started.md) +[snap getting started tutorial!](/snap/tutorial/getting-started.md) ![Illustration depicting working on components and clouds][logo] @@ -29,7 +29,7 @@ your needs. If you would like to jump straight in, head to the Juju cluster or with Cluster API. Find out more about which {{product}} installation method is best for your project's needs with -**[choosing a {{product}} installation method.](src/snap/explanation/installation-methods.md)** +**[choosing a {{product}} installation method.](/snap/explanation/installation-methods.md)** ```{toctree} @@ -45,37 +45,36 @@ Canonical Kubernetes documentationSorry, but the documentation page that you are looking for was not found.
\n\nDocumentation changes over time, and pages are moved around. We try to redirect you to the updated content where possible, but unfortunately, that didn\'t work this time (maybe because the content you were looking for does not exist in this version of the documentation).
\nYou can try to use the navigation to locate the content you\'re looking for, or search for a similar page.
\n', -} - -# Default image for OGP (to prevent font errors, see -# https://github.com/canonical/sphinx-docs-starter-pack/pull/54 ) -if not 'ogp_image' in locals(): - ogp_image = 'https://assets.ubuntu.com/v1/253da317-image-document-ubuntudocs.svg' - -############################################################ -### General configuration -############################################################ - -exclude_patterns = [ - '_build', - 'Thumbs.db', - '.DS_Store', - '.sphinx', - '_parts' -] -exclude_patterns.extend(custom_excludes) - -rst_epilog = ''' -.. include:: /reuse/links.txt -''' -if 'custom_rst_epilog' in locals(): - rst_epilog = custom_rst_epilog - -source_suffix = { - '.rst': 'restructuredtext', - '.md': 'markdown', -} - -if not 'conf_py_path' in html_context and 'github_folder' in html_context: - html_context['conf_py_path'] = html_context['github_folder'] - -# For ignoring specific links -linkcheck_anchors_ignore_for_url = [ - r'https://github\.com/.*' -] -linkcheck_anchors_ignore_for_url.extend(custom_linkcheck_anchors_ignore_for_url) - -# Tags cannot be added directly in custom_conf.py, so add them here -for tag in custom_tags: - tags.add(tag) - -# html_context['get_contribs'] is a function and cannot be -# cached (see https://github.com/sphinx-doc/sphinx/issues/12300) -suppress_warnings = ["config.cache"] - -############################################################ -### Styling -############################################################ - -# Find the current builder -builder = 'dirhtml' -if '-b' in sys.argv: - builder = sys.argv[sys.argv.index('-b')+1] - -# Setting templates_path for epub makes the build fail -if builder == 'dirhtml' or builder == 'html': - templates_path = ['.sphinx/_templates'] - notfound_template = '404.html' - -# Theme configuration -html_theme = 'furo' -html_last_updated_fmt = '' -html_permalinks_icon = '¶' - -if html_title == '': - html_theme_options = { - 'sidebar_hide_name': True - } - -############################################################ -### Additional files -############################################################ - -html_static_path = ['.sphinx/_static'] - -html_css_files = [ - 'custom.css', - 'header.css', - 'github_issue_links.css', - 'furo_colors.css', - 'footer.css' -] -html_css_files.extend(custom_html_css_files) - -html_js_files = ['header-nav.js', 'footer.js'] -if 'github_issues' in html_context and html_context['github_issues'] and not disable_feedback_button: - html_js_files.append('github_issue_links.js') -html_js_files.extend(custom_html_js_files) - -############################################################# -# Display the contributors - -def get_contributors_for_file(github_url, github_folder, pagename, page_source_suffix, display_contributors_since=None): - filename = f"{pagename}{page_source_suffix}" - paths=html_context['github_folder'][1:] + filename - - try: - repo = Repo(".") - except InvalidGitRepositoryError: - cwd = os.getcwd() - ghfolder = html_context['github_folder'][:-1] - if ghfolder and cwd.endswith(ghfolder): - repo = Repo(cwd.rpartition(ghfolder)[0]) - else: - print("The local Git repository could not be found.") - return - - since = display_contributors_since if display_contributors_since and display_contributors_since.strip() else None - - commits = repo.iter_commits(paths=paths, since=since) - - contributors_dict = {} - for commit in commits: - contributor = commit.author.name - if contributor not in contributors_dict or commit.committed_date > contributors_dict[contributor]['date']: - contributors_dict[contributor] = { - 'date': commit.committed_date, - 'sha': commit.hexsha - } - # The github_page contains the link to the contributor's latest commit. - contributors_list = [{'name': name, 'github_page': f"{github_url}/commit/{data['sha']}"} for name, data in contributors_dict.items()] - sorted_contributors_list = sorted(contributors_list, key=lambda x: x['name']) - return sorted_contributors_list - -html_context['get_contribs'] = get_contributors_for_file - -############################################################ -### Myst configuration -############################################################ -if os.path.exists('./reuse/substitutions.yaml'): - with open('./reuse/substitutions.yaml', 'r') as fd: - myst_substitutions = yaml.safe_load(fd.read()) - - - -############################################################ -### PDF configuration -############################################################ - -latex_additional_files = [ - "./.sphinx/fonts/Ubuntu-B.ttf", - "./.sphinx/fonts/Ubuntu-R.ttf", - "./.sphinx/fonts/Ubuntu-RI.ttf", - "./.sphinx/fonts/UbuntuMono-R.ttf", - "./.sphinx/fonts/UbuntuMono-RI.ttf", - "./.sphinx/fonts/UbuntuMono-B.ttf", - "./.sphinx/images/Canonical-logo-4x.png", - "./.sphinx/images/front-page-light.pdf", - "./.sphinx/images/normal-page-footer.pdf", -] - -latex_engine = 'xelatex' -latex_show_pagerefs = True -latex_show_urls = 'footnote' - -with open(".sphinx/latex_elements_template.txt", "rt") as file: - latex_config = file.read() - -latex_elements = ast.literal_eval(latex_config.replace("$PROJECT", project)) \ No newline at end of file diff --git a/docs/tools/conf.py-old b/docs/tools/conf.py-old deleted file mode 100644 index f4346485e..000000000 --- a/docs/tools/conf.py-old +++ /dev/null @@ -1,150 +0,0 @@ -import sys -import os -import yaml - -sys.path.append('./') -from custom_conf import * - -# Configuration file for the Sphinx documentation builder. -# You should not do any modifications to this file. Put your custom -# configuration into the custom_conf.py file. -# If you need to change this file, contribute the changes upstream. -# -# For the full list of built-in configuration values, see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -############################################################ -### Extensions -############################################################ - -extensions = [ - 'sphinx_design', - 'sphinx_tabs.tabs', - 'sphinx_reredirects', - 'canonical.youtube-links', - 'canonical.related-links', - 'canonical.custom-rst-roles', - 'canonical.terminal-output', - 'sphinx_copybutton', - 'sphinxext.opengraph', - 'myst_parser', - 'sphinxcontrib.jquery', - 'notfound.extension' -] -extensions.extend(custom_extensions) - -### Configuration for extensions - -# Additional MyST syntax -myst_enable_extensions = [ - 'substitution', - 'deflist', - 'linkify' -] -myst_enable_extensions.extend(custom_myst_extensions) - -# Used for related links -if not 'discourse_prefix' in html_context and 'discourse' in html_context: - html_context['discourse_prefix'] = html_context['discourse'] + '/t/' - -# The default for notfound_urls_prefix usually works, but not for -# documentation on documentation.ubuntu.com -if slug: - notfound_urls_prefix = '/' + slug + '/en/latest/' - -notfound_context = { - 'title': 'Page not found', - 'body': 'Sorry, but the documentation page that you are looking for was not found.
\nDocumentation changes over time, and pages are moved around. We try to redirect you to the updated content where possible, but unfortunately, that didn\'t work this time (maybe because the content you were looking for does not exist in this version of the documentation).
\nYou can try to use the navigation to locate the content you\'re looking for, or search for a similar page.
\n', -} - -# Default image for OGP (to prevent font errors, see -# https://github.com/canonical/sphinx-docs-starter-pack/pull/54 ) -if not 'ogp_image' in locals(): - ogp_image = 'https://assets.ubuntu.com/v1/253da317-image-document-ubuntudocs.svg' - -############################################################ -### General configuration -############################################################ - -exclude_patterns = [ - '_build', - 'Thumbs.db', - '.DS_Store', - '.sphinx', - '_parts' -] -exclude_patterns.extend(custom_excludes) - -rst_epilog = ''' -.. include:: /reuse/links.txt -''' -if 'custom_rst_epilog' in locals(): - rst_epilog = custom_rst_epilog - -source_suffix = { - '.rst': 'restructuredtext', - '.md': 'markdown', -} - -if not 'conf_py_path' in html_context and 'github_folder' in html_context: - html_context['conf_py_path'] = html_context['github_folder'] - -# For ignoring specific links -linkcheck_anchors_ignore_for_url = [ - r'https://github\.com/.*' -] -linkcheck_anchors_ignore_for_url.extend(custom_linkcheck_anchors_ignore_for_url) - -# Tags cannot be added directly in custom_conf.py, so add them here -for tag in custom_tags: - tags.add(tag) - -############################################################ -### Styling -############################################################ - -# Find the current builder -builder = 'dirhtml' -if '-b' in sys.argv: - builder = sys.argv[sys.argv.index('-b')+1] - -# Setting templates_path for epub makes the build fail -if builder == 'dirhtml' or builder == 'html': - templates_path = ['.sphinx/_templates'] - -# Theme configuration -html_theme = 'furo' -html_last_updated_fmt = '' -html_permalinks_icon = '¶' - -if html_title == '': - html_theme_options = { - 'sidebar_hide_name': True - } - -############################################################ -### Additional files -############################################################ - -html_static_path = ['.sphinx/_static'] - -html_css_files = [ - 'custom.css', - 'header.css', - 'github_issue_links.css', - 'furo_colors.css' -] -html_css_files.extend(custom_html_css_files) - -html_js_files = ['header-nav.js'] -if 'github_issues' in html_context and html_context['github_issues'] and not disable_feedback_button: - html_js_files.append('github_issue_links.js') -html_js_files.extend(custom_html_js_files) - - -############################################################ -### Myst configuration -############################################################ -if os.path.exists('./reuse/substitutions.yaml'): - with open('./reuse/substitutions.yaml', 'r') as fd: - myst_substitutions = yaml.safe_load(fd.read()) diff --git a/docs/tools/custom_conf.py b/docs/tools/custom_conf.py deleted file mode 100644 index aa876861c..000000000 --- a/docs/tools/custom_conf.py +++ /dev/null @@ -1,220 +0,0 @@ -import datetime - -# Custom configuration for the Sphinx documentation builder. -# All configuration specific to your project should be done in this file. -# -# The file is included in the common conf.py configuration file. -# You can modify any of the settings below or add any configuration that -# is not covered by the common conf.py file. -# -# For the full list of built-in configuration values, see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html -# -# If you're not familiar with Sphinx and don't want to use advanced -# features, it is sufficient to update the settings in the "Project -# information" section. - -############################################################ -### Project information -############################################################ - -# Product name -project = 'Canonical Kubernetes' -author = 'Canonical Group Ltd' - -# The title you want to display for the documentation in the sidebar. -# You might want to include a version number here. -# To not display any title, set this option to an empty string. -html_title = 'Canonical K8s' - -# The default value uses the current year as the copyright year. -# -# For static works, it is common to provide the year of first publication. -# Another option is to give the first year and the current year -# for documentation that is often changed, e.g. 2022–2023 (note the en-dash). -# -# A way to check a GitHub repo's creation date is to obtain a classic GitHub -# token with 'repo' permissions here: https://github.com/settings/tokens -# Next, use 'curl' and 'jq' to extract the date from the GitHub API's output: -# -# curl -H 'Authorization: token