Skip to content

emit the bundle of codeblocs #2242

@impfromliga

Description

@impfromliga

Trying to create Quartz plugin for simple (as i though) feature:
I whant to scope multiple codeblocks from the MD to emit live demo pages.
In Obsidian each codeblok can be linked as ^uniqueId placed after it on the individual line (that linespaced above and below)

  1. In first i would try to emit unique js files with that id's as file name, and writed in subfolder {currentPath}/assets/{blockId}.js
  • so, should i do AST parsing by my self, or some quartz API can it do? (i can't find the doc)
  1. For a clever implementation step1 should be processing at the fly. How i see it can work:
  • my Transformer plugin scope blocs, ad it metadata to AST tree (code blocs can have some meta props for linking)
  • my Emmiter build js from tree as is step1 (or meta props can declare whaterfall bundle of all current MD file blocks, or ever direct link to any existed in AST step1 js file) for finalize it ever can include it to some html template to make single demo page

Can you point me how i can done it better?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions