diff --git a/docs/Earthfile b/docs/Earthfile index aef65722bfc..f70e5b27f41 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -5,10 +5,8 @@ VERSION 0.7 # Copy all the source we need to build the docs src: - FROM github.com/input-output-hk/catalyst-ci/earthly/docs:feat/docs3+mkdocs-material - - # Just copy the actual doc src here. - COPY --dir src includes macros overrides mkdocs.yml /docs + # Common src setup + DO github.com/input-output-hk/catalyst-ci/earthly/docs:feat/docs3+SRC # Now copy into that any artifacts we pull from the builds. COPY --dir ../+repo-docs/repo /docs/includes diff --git a/docs/includes/abbreviations.md b/docs/includes/abbreviations.md deleted file mode 100644 index 7379265145c..00000000000 --- a/docs/includes/abbreviations.md +++ /dev/null @@ -1,3 +0,0 @@ - -*[HTML]: Hyper Text Markup Language -*[W3C]: World Wide Web Consortium diff --git a/docs/includes/repo/CODE_OF_CONDUCT.md b/docs/includes/repo/CODE_OF_CONDUCT.md deleted file mode 100644 index 50a60f560b5..00000000000 --- a/docs/includes/repo/CODE_OF_CONDUCT.md +++ /dev/null @@ -1 +0,0 @@ -# File replaced during documentation build diff --git a/docs/includes/repo/CONTRIBUTING.md b/docs/includes/repo/CONTRIBUTING.md deleted file mode 100644 index 50a60f560b5..00000000000 --- a/docs/includes/repo/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -# File replaced during documentation build diff --git a/docs/includes/repo/LICENSE-APACHE b/docs/includes/repo/LICENSE-APACHE deleted file mode 100644 index 50a60f560b5..00000000000 --- a/docs/includes/repo/LICENSE-APACHE +++ /dev/null @@ -1 +0,0 @@ -# File replaced during documentation build diff --git a/docs/includes/repo/LICENSE-MIT b/docs/includes/repo/LICENSE-MIT deleted file mode 100644 index 50a60f560b5..00000000000 --- a/docs/includes/repo/LICENSE-MIT +++ /dev/null @@ -1 +0,0 @@ -# File replaced during documentation build diff --git a/docs/includes/repo/README.md b/docs/includes/repo/README.md deleted file mode 100644 index 2e51fbe3b6e..00000000000 --- a/docs/includes/repo/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Repo Documents - -These files are replaced during the build with documentation files maintained -globally to the repo. - -Such documents are importantly used not just inside the documentation, but also -for people browsing the source repository. - -All files in this directory are just placeholders, until the documentation build -replaces them with the appropriate files. diff --git a/docs/includes/repo/SECURITY.md b/docs/includes/repo/SECURITY.md deleted file mode 100644 index 50a60f560b5..00000000000 --- a/docs/includes/repo/SECURITY.md +++ /dev/null @@ -1 +0,0 @@ -# File replaced during documentation build diff --git a/docs/macros/__init__.py b/docs/macros/__init__.py deleted file mode 100644 index e99d2e95ef4..00000000000 --- a/docs/macros/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from .include import inc_file - - -def define_env(env): - """ - This is the hook for defining variables, macros and filters - """ - - @env.macro - def include_file(filename, start_line=0, end_line=None, indent=None): - return inc_file(env, filename, start_line, end_line, indent) diff --git a/docs/macros/include.py b/docs/macros/include.py deleted file mode 100644 index 7a97a73fd78..00000000000 --- a/docs/macros/include.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import textwrap - -def inc_file(env, filename, start_line=0, end_line=None, indent=None): - """ - Include a file, optionally indicating start_line and end_line - (start counting from 0) - The path is relative to the top directory of the documentation - project. - """ - - try: - full_filename = os.path.join(env.project_dir, filename) - - with open(full_filename, "r") as f: - lines = f.readlines() - line_range = lines[start_line:end_line] - text = "".join(line_range) - if indent is None: - indent = "" - else: - indent = " " * indent - return textwrap.indent(text, indent) - except Exception as exc: - return f"{filename} error: {exc}" diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a1fdf315689..229d49595d0 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,152 +1,40 @@ +INHERIT: std-theme.yml + +# cspell: words cips + # Project Information site_name: Project Catalyst - Catalyst Voices site_url: https://input-output-hk.github.io/catalyst-docs -site_author: The Project Catalyst Team -copyright: (c) 2023 Input Output Global - -# cspell: words Diagramsnet, pymdownx, linenums, inlinehilite, superfences, -# cspell: words tasklist, betterem, materialx, twemoji, smartsymbols, -# cspell: words kroki, excalidraw, glightbox, cips, pygments, arithmatex # Repository repo_name: input-output-hk/catalyst-voices repo_url: https://github.com/input-output-hk/catalyst-voices -# The Documentation src to build. -docs_dir: src - -theme: - name: material - custom_dir: overrides - palette: - # Palette toggle for light mode - - scheme: default - media: "(prefers-color-scheme: light)" - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - # Palette toggle for dark mode - - scheme: slate - media: "(prefers-color-scheme: dark)" - toggle: - icon: material/brightness-4 - name: Switch to light mode - - features: - - navigation.instant - - navigation.instant.progress - - navigation.tracking - #- navigation.tabs - #- navigation.tabs.sticky - - navigation.sections - - navigation.expand - - navigation.path - - navigation.indexes - - toc.follow - - toc.integrate - - search.suggest - - search.highlight - -plugins: - - search - - meta-manager - - macros: - module_name: macros - # - diagrams - Plugin is installed, but produces corrupted output - - kroki: - ServerURL: https://kroki.io - EnableDiagramsnet: true - HttpMethod: POST - - glightbox - -markdown_extensions: - # Python Markdown - - abbr - - admonition - - attr_list - - def_list - - footnotes - - md_in_html - - tables - - toc: - permalink: true - - # Python Markdown Extensions - - pymdownx.arithmatex: - generic: true - - pymdownx.betterem: - smart_enable: all - - pymdownx.caret - - pymdownx.details - - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg - - pymdownx.highlight: - anchor_linenums: true - line_spans: __span - pygments_lang_class: true - - pymdownx.inlinehilite - - pymdownx.keys - - pymdownx.mark - - pymdownx.smartsymbols - - pymdownx.snippets: - auto_append: - - includes/abbreviations.md - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format - - pymdownx.tabbed: - alternate_style: true - - pymdownx.tasklist: - custom_checkbox: true - - pymdownx.tilde - -extra: - consent: - title: Cookie consent - description: >- - - We use cookies to recognize your repeated visits and preferences, as well - as to measure the effectiveness of our documentation and whether users - find what they're searching for. With your consent, you're helping us to - make our documentation better. - # Page tree nav: - - Home: - - Home: index.md - - Getting Started: - - Getting Started: getting-started/index.md - - Quick Start: getting-started/quick-start.md - - Advanced: getting-started/advanced.md - - Development: getting-started/development.md - - Monorepo Architecture: - - Monorepo Architecture: monorepo-architecture/index.md - - Catalyst Standards: - - Catalyst Standards: catalyst-standards/index.md - - Draft CIPs: - - Draft CIPs: catalyst-standards/draft-cips/index.md - - Role Registration: catalyst-standards/draft-cips/role-registration/cip-xxxx.md - - RBAC CIP30 Extension: catalyst-standards/draft-cips/rbac-cip30-extension/cip-xxxx.md - - Catalyst Voting CIP30 Extension: catalyst-standards/draft-cips/catalyst-vote-signing-cip30-extension/cip-xxxx.md - - Catalyst Ballot Formats: - - Catalyst Ballot Formats: catalyst-standards/ballot/index.md - - Catalyst V1 Ballot: catalyst-standards/ballot/catalyst-v1.md - - Catalyst V2 Ballot: catalyst-standards/ballot/catalyst-v2.md - - Appendix: - - Documentation Examples: - - Examples: appendix/examples/index.md - - Abbreviations: appendix/examples/abbreviations.md - - Admonitions: appendix/examples/admonitions.md - - Code Formatting: appendix/examples/code-formatting.md - - Mermaid Diagrams: appendix/examples/mermaid-diagrams.md - - Kroki Diagrams: appendix/examples/kroki-diagrams.md - - Important Information: - - Important Information: appendix/important/index.md - - Contributing: appendix/important/contributing.md - - Code of Conduct: appendix/important/coc.md - - Security: appendix/important/security.md - - License: appendix/important/license.md + - Home: index.md + - Getting Started: + - Getting Started: getting-started/index.md + - Quick Start: getting-started/quick-start.md + - Advanced: getting-started/advanced.md + - Development: getting-started/development.md + - Monorepo Architecture: + - Monorepo Architecture: monorepo-architecture/index.md + - Catalyst Standards: + - Catalyst Standards: catalyst-standards/index.md + - Draft CIPs: + - Draft CIPs: catalyst-standards/draft-cips/index.md + - Role Registration: catalyst-standards/draft-cips/role-registration/cip-xxxx.md + - RBAC CIP30 Extension: catalyst-standards/draft-cips/rbac-cip30-extension/cip-xxxx.md + - Catalyst Voting CIP30 Extension: catalyst-standards/draft-cips/catalyst-vote-signing-cip30-extension/cip-xxxx.md + - Catalyst Ballot Formats: + - Catalyst Ballot Formats: catalyst-standards/ballot/index.md + - Catalyst V1 Ballot: catalyst-standards/ballot/catalyst-v1.md + - Catalyst V2 Ballot: catalyst-standards/ballot/catalyst-v2.md + - Appendix: + - Important Information: + - Important Information: appendix/important/index.md + - Contributing: appendix/important/contributing.md + - Code of Conduct: appendix/important/coc.md + - Security: appendix/important/security.md + - License: appendix/important/license.md diff --git a/docs/overrides/cip.html b/docs/overrides/cip.html deleted file mode 100644 index 33e90e4a89b..00000000000 --- a/docs/overrides/cip.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base.html" %} - - -{% block container %} -