Add editor structure outline to the developer guide on the website

This commit is contained in:
Keavon Chambers
2025-07-12 23:09:29 -07:00
parent 765092fbe9
commit d6d1bbb1e6
18 changed files with 426 additions and 558 deletions
+4 -2
View File
@@ -36,9 +36,9 @@
{%- set global_linked_css = [] -%}
{%- set global_js = ["/js/text-justification.js", "/js/navbar.js"] -%}
{%- set global_css = ["/base.css", "/fonts/common.css"] -%}
{%- set fonts_loaded = load_data(path="static/fonts/common.css", format="plain", required=false) -%}
{%- set fonts_loaded = load_data(path = "static/fonts/common.css", format = "plain", required = false) -%}
{%- if not fonts_loaded -%}
{{ throw(message="------------------------------------------------------------> FONTS ARE NOT INSTALLED! Before running Zola, execute `npm run install-fonts` from the `/website` directory.") }}
{{ throw(message = "------------------------------------------------------------> FONTS ARE NOT INSTALLED! Before running Zola, execute `npm run install-fonts` from the `/website` directory.") }}
{%- endif -%}
{#- RETRIEVE FROM TEMPLATES AND PAGES: CSS AND JS TO LOAD EITHER AS A LINK OR INLINE -#}
@@ -125,9 +125,11 @@
<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 />
@@ -38,3 +38,18 @@
{{ load_data(path="static/text-balancer.js", format="plain") | safe }}
</script>
{% endmacro text_balancer %}
{% macro hierarchical_message_system_tree() %}
{%- set content = load_data(path = "other/editor-structure/replacement.html", format = "plain", required = false) -%}
{%- set fallback = "<pre>THIS CONTENT IS FILLED IN WHEN CI BUILDS THE WEBSITE.
TO TEST IT LOCALLY, RUN:
cd website/other/editor-structure
AND THEN:
cargo test --package graphite-editor --lib -- messages::message::test::generate_message_tree
node generate.js ../../../hierarchical_message_system_tree.txt replacement.html</pre>" -%}
{{ content | default(value = fallback) | safe }}
{% endmacro hierarchical_message_system_tree %}