Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Implement Proxied Content (dynamic variables) #40

Open
shah opened this issue Nov 30, 2021 · 2 comments
Open

Implement Proxied Content (dynamic variables) #40

shah opened this issue Nov 30, 2021 · 2 comments
Assignees
Labels
📃 Content Portability Make content portable so that Markdown or HTML can be reused easily across multiple projects ❗ Essential 📈 Scalability Functionality needed for large sites

Comments

@shah
Copy link
Contributor

shah commented Nov 30, 2021

Create proxied content infuse and interpolate (PCII) Markdown directive for including dynamic content from modules. This directive is called PCII because content is proxied (delegated from somewhere else), is infused (included) into the current text stream, and is (optionally) interpolated dynamically if the symbol is a function.

Spec:

:pcii[symbol]                                 find first instance of symbol in any module
:pcii[symbol]{module="module.ts"}             if module.ts is unique across all folders
:pcii[symbol]{module="path/path/module.ts"}   if module.ts is found in multiple paths

where symbol is the name of an exported variable or function in path/path/module.ts.

shah added a commit that referenced this issue Nov 30, 2021
@shah shah added ❗ Essential 📃 Content Portability Make content portable so that Markdown or HTML can be reused easily across multiple projects 📈 Scalability Functionality needed for large sites labels Nov 30, 2021
@shah shah self-assigned this Nov 30, 2021
@shah
Copy link
Contributor Author

shah commented Dec 1, 2021

  • Add context="client" or similar to :pcii[symbol]{context="client"} so that the variable will be injected in the browser instead of at built time. The default context is server or build.
  • Add PCII web components to drive proxied content infusion and interpolation in HTML. Perhaps the bundled *.client.pcii.ts output could include web component in the bundled Javascript file?

@shah
Copy link
Contributor Author

shah commented Jan 11, 2022

We also need to add the ability for directives to be recursively rendered in case the result of PCII content has Markdown.

shah added a commit that referenced this issue Jan 11, 2022
Directives can now have {post-process="markdown"} attributes which,
if provided (e.g. :pcii[var]{post-process="markdown"}) can pass output back
through the Markdown-it renderer for recursive processing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📃 Content Portability Make content portable so that Markdown or HTML can be reused easily across multiple projects ❗ Essential 📈 Scalability Functionality needed for large sites
Projects
None yet
Development

No branches or pull requests

1 participant