-
Notifications
You must be signed in to change notification settings - Fork 0
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
Markdown format #13
base: main
Are you sure you want to change the base?
Markdown format #13
Conversation
<eox-map id="tour" .config=${{ | ||
view:{ | ||
center:[0,0], | ||
zoom:7 | ||
}, | ||
layers:[ | ||
{ | ||
type:"Tile", | ||
properties: { | ||
id: "foo" | ||
}, | ||
source:{ | ||
type:"OSM" | ||
} | ||
}, | ||
{ | ||
type:"Tile", | ||
properties: { | ||
id: "bar" | ||
}, | ||
source:{ | ||
type:"OSM" | ||
} | ||
} | ||
] | ||
}}></eox-map> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it better to avoid injecting html
and js
code directly into markdown but try to make it similar to the section pattern, something like this -
# eox-map { #tour center='[0,0]' zoom='7' layers='[{"type":"Tile","properties":{"id":"foo"},"source":{type:"OSM"}}]' }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will help us to avoid unnecessary code injection into the storytelling renderer and which may cause unnecessary output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also think we discussed not wanting to allow code injection. This is also why we moved away from concepts such as MDX and MDJS, right?
It is quite tricky to find a good approach on how to use markdown for storytelling, as there are many possibilities, and I wonder how complicated we want to make things.
Ideally we wouldn't reinvent the wheel, and use something already existing (with just adding some small extensions on top). There is the "pandoc flavoured markdown" which includes already most of the basic needs I guess, and Quarto expanded on it by using both the markdown parts as well as some custom rendering for e.g. dashboards.
Someone even did experiments with creating a scrollytelling experience with quarto, although I believe that this would be the point where we would need some of our own extensions to the system.
We might be able to use quarto's renderer since it is now MIT.
In this PR, I am particularly not happy about how the eox-map looks. Also, this way, we really butcher the markdown file, so it becomes not readable any longer in pure GitHub rendering. Any suggestions are welcome, thank you. Please use the comment function to comment on individual lines of code.
Edit: I have created an alternative using HTML comments for everything, resulting in a readable md file on GitHub: https://github.com/EOX-A/storytelling/blob/markdown-format-alternative/map-steps.md?plain=1
This would be nice, but would be again a completely custom solution, not reusing other's.
Other resources: