W render engine scheme

April 24, 2026 ยท View on GitHub

This diagram represent W rendering chain.

flowchart TD

    0A(Head generation) -->
    0rss(RSS feed declaration) --> 3B

    2A[[Body]] -->
    2B(W inclusion)  -------->
    2C((Elements inclusion)) -->
    2D(Summary) -->
    2rss(RSS detection) -->
    typo(Typography fixer) --> 2I
    subgraph "DOM parser"
        2I(Link and media analysis) -->
        url(URL checker) -->
        2K(comment form parser)
    end
    2K --> 2pp
    2pp(check for post render actions) -->
    3B((Head and Body gathering)) -->
    3C[[Rendered HTML]] --> 4c
    subgraph "post render actions"
        4c(counters) -->
        4e(disable comment inputs) -->
        4j(include js vars)
    end
    4j --> 5{served web page}


    1A[[Element]] -->
    1B(W inclusion) -->
    1C(wiki links) -->
    1D(every link*) -->
    1E(Markdown) --> 1F
    subgraph "post MD parser"
        1F(header ID) -->
        1G(URL linker) -->
        1H(HTML tag*)
    end
    1H --> 2C

    1E -. "send TOC structure" .-> 2D
    2rss -. "send rss links" .-> 0rss
    2pp -. trigger post render action .-> 4c
    2K -. trigger post render action .-> 4e

    urlcache@{ shape: lin-cyl, label: "URL cache" }
    cloud@{ shape: cloud, label: "the Web"}
    urlcache <-.-> url
    cloud <-.-> urlcache

  • *every link: rendering option that transform every word as a link
  • *HTML tag: rendering option that does not print Element's corresponding HTML tags (only for pages V1)

W inclusions

List of W inclusions

  1. replace %DATE%, %DATEMODIF%, %TIME%, %TIMEMODIF% codes
  2. replace %THUMBNAIL% code
  3. replace %PAGEID% and %ID% code
  4. replace %URL% code
  5. replace %PATH% code
  6. replace %TITLE% code
  7. replace %DESCRIPTION% code
  8. replace %LIST% code
  9. replace %MEDIA% code
  10. replace %MAP% code
  11. replace %RANDOM% code
  12. replace %AUTHORS% code
  13. replace %CONNECT% code
  14. replace %COMMENTS% code
  15. replace %COMMENTCOUNT% code

The point of doing those inclusions early is to be before Header ID parser. That way, when they are used inside HTML headings, they will generate nicer IDs.