mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Add the auto-generated node catalog to the website's user manual (#3662)
* Generate the MVP node catalog in the manual (with some placeholders) * Implement nearly the rest of everything * Move to the tools directory and make it generate nicer default values * Add category descriptions * Organize file structure and improve type naming * Improve book table of contents code * Add collapsing chapter navigation to the book template * Add to build workflow * Clean up site structure
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
{%- endblock %}
|
||||
|
||||
{#- ======================================================================== -#}
|
||||
|
||||
{#- ON EVERY PAGE OF THE SITE: CSS AND JS TO LOAD EITHER AS A LINK OR INLINE -#}
|
||||
{#- ======================================================================== -#}
|
||||
{%- set global_linked_js = [] -%}
|
||||
@@ -41,6 +40,7 @@
|
||||
{{ throw(message = "------------------------------------------------------------> FONTS ARE NOT INSTALLED! Before running Zola, execute `npm install` from the `/website` directory.") }}
|
||||
{%- endif -%}
|
||||
|
||||
{#- ================================================================================ -#}
|
||||
{#- RETRIEVE FROM TEMPLATES AND PAGES: CSS AND JS TO LOAD EITHER AS A LINK OR INLINE -#}
|
||||
{#- ================================================================================ -#}
|
||||
{%- set linked_css = page.extra.linked_css | default(value = []) | concat(with = linked_css | default(value = [])) -%}
|
||||
@@ -48,6 +48,7 @@
|
||||
{%- set css = page.extra.css | default(value = []) | concat(with = css | default(value = [])) -%}
|
||||
{%- set js = page.extra.js | default(value = []) | concat(with = js | default(value = [])) -%}
|
||||
|
||||
{#- =================================================== -#}
|
||||
{#- COMBINE THE GLOBAL AND TEMPLATE/PAGE RESOURCE LISTS -#}
|
||||
{#- =================================================== -#}
|
||||
{%- set linked_css_list = linked_css | concat(with = global_linked_css) -%}
|
||||
@@ -55,6 +56,7 @@
|
||||
{%- set css_list = css | concat(with = global_css) -%}
|
||||
{%- set js_list = js | concat(with = global_js) -%}
|
||||
|
||||
{#- ================================================================================== -#}
|
||||
{#- CONDITIONALLY MAKE ONLY PROD BUILDS ACTUALLY INLINE THE CSS AND JS FOR CLEANLINESS -#}
|
||||
{#- ================================================================================== -#}
|
||||
{%- if get_env(name = "MODE", default = "dev") != "prod" -%}
|
||||
@@ -64,18 +66,21 @@
|
||||
{%- set js_list = [] -%}
|
||||
{%- endif -%}
|
||||
|
||||
{#- ================ -#}
|
||||
{#- INSERT CSS LINKS -#}
|
||||
{#- ================ -#}
|
||||
{%- for path in linked_css_list %}
|
||||
<link rel="stylesheet" href="{{ path | safe }}" />
|
||||
{%- endfor %}
|
||||
|
||||
{#- =============== -#}
|
||||
{#- INSERT JS LINKS -#}
|
||||
{#- =============== -#}
|
||||
{%- for path in linked_js_list %}
|
||||
<script src="{{ path | safe }}"></script>
|
||||
{%- endfor %}
|
||||
|
||||
{#- ====================== -#}
|
||||
{#- INSERT INLINE CSS CODE -#}
|
||||
{#- ====================== -#}
|
||||
{%- if css_list | length > 0 %}
|
||||
@@ -86,6 +91,7 @@
|
||||
{{ "</" ~ "style>" | safe }}
|
||||
{%- endif %}
|
||||
|
||||
{#- ===================== -#}
|
||||
{#- INSERT INLINE JS CODE -#}
|
||||
{#- ===================== -#}
|
||||
{%- for path in js_list %}
|
||||
@@ -97,51 +103,53 @@
|
||||
{{- get_env(name = "INDEX_HTML_HEAD_INCLUSION", default = "") | safe }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<header>
|
||||
<nav>
|
||||
<div class="row">
|
||||
<div class="left">
|
||||
<a href="/">
|
||||
<img src="https://static.graphite.art/logos/graphite-logo-solid.svg" alt="Graphite Logo" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="/learn">Learn</a>
|
||||
<a href="/features">Features</a>
|
||||
<a href="/about">About</a>
|
||||
<a href="/blog">Blog</a>
|
||||
<a href="/volunteer">Volunteer</a>
|
||||
<a href="/donate" class="heart">Donate</a>
|
||||
<a href="https://editor.graphite.art" class="button arrow">Launch</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<svg class="ripple" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 0,15 l 10000,0" />
|
||||
</svg>
|
||||
<hr />
|
||||
</header>
|
||||
<main>
|
||||
{%- filter replace(from = "<!-- replacements::blog_posts(count = 2) -->", to = replacements::blog_posts(count = 2)) -%}
|
||||
{%- filter replace(from = "<!-- replacements::text_balancer() -->", to = replacements::text_balancer()) -%}
|
||||
{%- filter replace(from = "<!-- replacements::hierarchical_message_system_tree() -->", to = replacements::hierarchical_message_system_tree()) -%}
|
||||
{%- block content -%}{%- endblock -%}
|
||||
{%- endfilter -%}
|
||||
{%- endfilter -%}
|
||||
{%- endfilter -%}
|
||||
</main>
|
||||
<footer>
|
||||
<hr />
|
||||
<nav>
|
||||
<a href="https://github.com/GraphiteEditor/Graphite" class="link not-uppercase">GitHub</a>
|
||||
<a href="/license" class="link not-uppercase">License</a>
|
||||
<a href="/logo" class="link not-uppercase">Logo</a>
|
||||
<a href="/press" class="link not-uppercase">Press</a>
|
||||
<a href="/contact" class="link not-uppercase">Contact</a>
|
||||
</nav>
|
||||
<span>Copyright © {{ now() | date(format = "%Y") }} Graphite Labs, LLC (an open source community organization)</span>
|
||||
</footer>
|
||||
</div>
|
||||
<div class="page">
|
||||
<header>
|
||||
<nav>
|
||||
<div class="row">
|
||||
<div class="left">
|
||||
<a href="/">
|
||||
<img src="https://static.graphite.art/logos/graphite-logo-solid.svg" alt="Graphite Logo" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="/learn">Learn</a>
|
||||
<a href="/features">Features</a>
|
||||
<a href="/about">About</a>
|
||||
<a href="/blog">Blog</a>
|
||||
<a href="/volunteer">Volunteer</a>
|
||||
<a href="/donate" class="heart">Donate</a>
|
||||
<a href="https://editor.graphite.art" class="button arrow">Launch</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<svg class="ripple" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 0,15 l 10000,0" />
|
||||
</svg>
|
||||
<hr />
|
||||
</header>
|
||||
<main>
|
||||
{# This is a comment. It exists to prevent the {%- -%} on the lines below from removing the line break between `<main>` and the `content` block #}
|
||||
{%- filter replace(from = "<!-- replacements::blog_posts(count = 2) -->", to = replacements::blog_posts(count = 2)) -%}
|
||||
{%- filter replace(from = "<!-- replacements::text_balancer() -->", to = replacements::text_balancer()) -%}
|
||||
{%- filter replace(from = "<!-- replacements::hierarchical_message_system_tree() -->", to = replacements::hierarchical_message_system_tree()) -%}
|
||||
{%- block content -%}{%- endblock -%}
|
||||
{%- endfilter -%}
|
||||
{%- endfilter -%}
|
||||
{%- endfilter -%}
|
||||
{# This is a comment. It exists to prevent the {%- -%} on the lines above from removing the line break between the `content` block and `</main>` #}
|
||||
</main>
|
||||
<footer>
|
||||
<hr />
|
||||
<nav>
|
||||
<a href="https://github.com/GraphiteEditor/Graphite" class="link not-uppercase">GitHub</a>
|
||||
<a href="/license" class="link not-uppercase">License</a>
|
||||
<a href="/logo" class="link not-uppercase">Logo</a>
|
||||
<a href="/press" class="link not-uppercase">Press</a>
|
||||
<a href="/contact" class="link not-uppercase">Contact</a>
|
||||
</nav>
|
||||
<span>Copyright © {{ now() | date(format = "%Y") }} Graphite Labs, LLC (an open source community organization)</span>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user