From 567e7d278896e21bb7abbd2984fb71f088ab7913 Mon Sep 17 00:00:00 2001 From: Harjun751 Date: Thu, 15 Jan 2026 12:50:09 +0800 Subject: [PATCH 1/3] Add small example on Content Processing in DG --- docs/devGuide/design/architecture.md | 46 +++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/docs/devGuide/design/architecture.md b/docs/devGuide/design/architecture.md index fa4d54ec60..07b49cae4f 100644 --- a/docs/devGuide/design/architecture.md +++ b/docs/devGuide/design/architecture.md @@ -61,4 +61,48 @@ Its syntax is also the most compatible and independent of the other stages. 3. Having processed possibly conflicting Nunjucks and Markdown syntax, HTML is then processed last. {% from "njk/common.njk" import previous_next %} -{{ previous_next('projectStructure', 'serverSideRendering') }} \ No newline at end of file +{{ previous_next('projectStructure', 'serverSideRendering') }} + +## A small example +To demonstrate the content processing flow, let's take a look at a small toy MarkBind page: +```markdown +{% raw %}{% set myVariable = "Item" %} + +# A basic level 1 header +There will be 5 items here: + + +A link that gets [converted](contents/topic1.md){% endraw %} +``` + +At the first step of the processing flow, the VariableProcessor converts Nunjucks template code into HTML: +```markdown +{% raw %}# A basic level 1 header +There will be 5 items here: + + +A link that gets [converted](contents/topic1.md){% endraw %} +``` +Notice that the Nunjucks variable is consumed and that the unordered list is expanded. + +Next, the NodeProcessor converts markdown to HTML: +```markdown +{% raw %}

A basic level 1 header

+

There will be 5 items here:

+ +

A link that gets converted

{% endraw %} +``` +Finally, the content is wrapped in a layout and written to a file. From 4e875235e72af82b094ed29a36eec3cc41689b68 Mon Sep 17 00:00:00 2001 From: Harjun751 Date: Thu, 15 Jan 2026 18:13:58 +0800 Subject: [PATCH 2/3] Add content processing flow example to DG --- docs/devGuide/design/architecture.md | 29 +++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/docs/devGuide/design/architecture.md b/docs/devGuide/design/architecture.md index 07b49cae4f..b5ae4ebee2 100644 --- a/docs/devGuide/design/architecture.md +++ b/docs/devGuide/design/architecture.md @@ -63,8 +63,8 @@ Its syntax is also the most compatible and independent of the other stages. {% from "njk/common.njk" import previous_next %} {{ previous_next('projectStructure', 'serverSideRendering') }} -## A small example -To demonstrate the content processing flow, let's take a look at a small toy MarkBind page: +## Demonstration +To demonstrate the content processing flow, let's take a look at a small toy MarkBind file: ```markdown {% raw %}{% set myVariable = "Item" %} @@ -76,10 +76,12 @@ There will be 5 items here: {% endfor %} -A link that gets [converted](contents/topic1.md){% endraw %} +A link that gets [converted](contents/topic1.md) + +{% endraw %} ``` -At the first step of the processing flow, the VariableProcessor converts Nunjucks template code into HTML: +At the first step of the processing flow, the `VariableProcessor` converts Nunjucks template code into HTML: ```markdown {% raw %}# A basic level 1 header There will be 5 items here: @@ -90,11 +92,13 @@ There will be 5 items here:
  • Item #4
  • -A link that gets [converted](contents/topic1.md){% endraw %} +A link that gets [converted](contents/topic1.md) + +{% endraw %} ``` -Notice that the Nunjucks variable is consumed and that the unordered list is expanded. +Notice that `myVariable` is consumed and that the unordered list is expanded. -Next, the NodeProcessor converts markdown to HTML: +Next, the NodeProcessor converts Markdown to HTML: ```markdown {% raw %}

    A basic level 1 header

    There will be 5 items here:

    @@ -103,6 +107,13 @@ Next, the NodeProcessor converts markdown to HTML:
  • Item #2
  • Item #3
  • Item #4
  • -

    A link that gets converted

    {% endraw %} +

    A link that gets converted

    +
    +
    +

    Topic 1

    +
    +

    This is a placeholder page - more content to be added.

    {% endraw %} ``` -Finally, the content is wrapped in a layout and written to a file. +It does this by traversing the node graph and matching node titles to their HTML equivalents. `include` nodes are recursively traversed and converted. + +After this, the content is embedded into the layout and the .html file is written to. From 50dc3ccec9aff1391a56b3bdf52fdbe25c6d9523 Mon Sep 17 00:00:00 2001 From: Harjun751 Date: Fri, 16 Jan 2026 11:25:44 +0800 Subject: [PATCH 3/3] Push buttons to bottom, rename header --- docs/devGuide/design/architecture.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/devGuide/design/architecture.md b/docs/devGuide/design/architecture.md index b5ae4ebee2..949d5705bf 100644 --- a/docs/devGuide/design/architecture.md +++ b/docs/devGuide/design/architecture.md @@ -60,10 +60,7 @@ Its syntax is also the most compatible and independent of the other stages. 3. Having processed possibly conflicting Nunjucks and Markdown syntax, HTML is then processed last. -{% from "njk/common.njk" import previous_next %} -{{ previous_next('projectStructure', 'serverSideRendering') }} - -## Demonstration +### Demonstrating the content processing flow To demonstrate the content processing flow, let's take a look at a small toy MarkBind file: ```markdown {% raw %}{% set myVariable = "Item" %} @@ -117,3 +114,6 @@ Next, the NodeProcessor converts Markdown to HTML: It does this by traversing the node graph and matching node titles to their HTML equivalents. `include` nodes are recursively traversed and converted. After this, the content is embedded into the layout and the .html file is written to. + +{% from "njk/common.njk" import previous_next %} +{{ previous_next('projectStructure', 'serverSideRendering') }}