Open ggrossetie opened 2 years ago
This is mostly related to the fact that some graph gists are not using a proper AsciiDoc document structure.
Let's take an example:
This is a paragraph.
This is another paragraph.
This is yet another paragraph.
----
:play northwind graph
----
Now let's get started.
== Dataset
As you can see...
The above AsciiDoc document will produce the following (simplified) Abstract Syntax Tree:
{
"type": "document",
"blocks": [
{
"type": "paragraph"
},
{
"type": "paragraph"
},
{
"type": "paragraph"
},
{
"type": "listing"
},
{
"type": "paragraph"
},
{
"type": "section",
"blocks": [
{
"type": "paragraph"
}
]
}
]
}
Here, we need to decide when we should create a new slide. Should we create a new slide for each block? should we create one slide for everything that isn't contained in a section?
In order to get a proper document structure, we need to add a document title. Once this is done, everything before the first section is a "preamble":
{
"type": "document",
"blocks": [
{
"type": "preamble",
"blocks": [
{
"type": "paragraph"
},
{
"type": "paragraph"
},
{
"type": "paragraph"
},
{
"type": "listing"
},
{
"type": "paragraph"
}
]
},
{
"type": "section",
"blocks": [
{
"type": "paragraph"
}
]
}
]
}
As you can see, we now have two "top-level" blocks, one preamble and one section. In this case, we can create one slide for the preamble and one slide for the section.
To address this issue, we could mandate a proper document structure when a new graph gist is submitted and/or we could improve the template to handle more cases.
Documentation : https://github.com/neo4j-contrib/neo4j-guides/blob/master/docs/html-guides.adoc
You can take a look at:
It looks like the rendering is broken (i.e. the sections). For reference, here's what we generate today for the following content:
According to the documentation, we should instead generate something like: