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

Markdown format #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Markdown format #13

wants to merge 1 commit into from

Conversation

silvester-pari
Copy link
Collaborator

@silvester-pari silvester-pari commented Feb 15, 2024

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:

Comment on lines +7 to +32
<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>
Copy link
Member

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"}}]' }

Copy link
Member

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.

Copy link
Member

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?

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

Successfully merging this pull request may close these issues.

3 participants