Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about custom parsing #1734

Open
GitVex opened this issue Jan 21, 2025 · 2 comments
Open

Question about custom parsing #1734

GitVex opened this issue Jan 21, 2025 · 2 comments

Comments

@GitVex
Copy link

GitVex commented Jan 21, 2025

Hey there!

This is a bit of an elaborate question.

I recently implemented a figurative login on top of quartz so I can control who can see which notes.

Now I want to make it so i can do a custom html tag so that I can "redact" parts of a note for some users.
I can get through essentially all steps of implementing this, but what I'm a bit in the dark about is the parsing of this html tag. I'd probably go for something like:

Please dont read me!

But since regular HTML tags aren't parsed either, I'd like to ask where I could implement this into the parsing pipeline.
Some pointers on HOW to implement this would be appreciated too, but I can probably figure this out too if I can find the rest of the parsers.

Thanks in advance and best regard,
Paul

@aarnphm
Copy link
Collaborator

aarnphm commented Jan 22, 2025

Well, https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements

But we are using preact to transpile jsx into html, so you might have to check how they handle custom props.

fwiw we only use jsx for templating, and not for any specific other preact features.

if you set a certain users flow within the body dataset, then you can probably render the target specific html blocks you want to hide with js "afterDOMReady" (albeit ablate the div and then fetch it back somehow for users who can have access to it)

@aarnphm
Copy link
Collaborator

aarnphm commented Jan 22, 2025

but at this point might as well use a probably framework like astro or svelte, where they have proper state management and better CMS support.

i'm not saying you can't build CMS with Quartz, just with a lot more work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants