mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Render Markdown documents as HTML.
This commit is contained in:
parent
1ad03871b2
commit
c0dac12111
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld",
|
||||||
|
"import": [
|
||||||
|
"files-scs:config/util/representation-conversion/converters/content-type-replacer.json",
|
||||||
|
"files-scs:config/util/representation-conversion/converters/quad-to-rdf.json",
|
||||||
|
"files-scs:config/util/representation-conversion/converters/rdf-to-quad.json"
|
||||||
|
],
|
||||||
|
"@graph": [
|
||||||
|
{
|
||||||
|
"comment": "Renders Markdown snippets into the main page template.",
|
||||||
|
"@id": "urn:solid-server:default:MarkdownToHtmlConverter",
|
||||||
|
"@type": "MarkdownToHtmlConverter",
|
||||||
|
"templateEngine": {
|
||||||
|
"@type": "HandlebarsTemplateEngine",
|
||||||
|
"template": "$PACKAGE_ROOT/templates/main.html.hbs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -3,7 +3,8 @@
|
|||||||
"import": [
|
"import": [
|
||||||
"files-scs:config/util/representation-conversion/converters/content-type-replacer.json",
|
"files-scs:config/util/representation-conversion/converters/content-type-replacer.json",
|
||||||
"files-scs:config/util/representation-conversion/converters/quad-to-rdf.json",
|
"files-scs:config/util/representation-conversion/converters/quad-to-rdf.json",
|
||||||
"files-scs:config/util/representation-conversion/converters/rdf-to-quad.json"
|
"files-scs:config/util/representation-conversion/converters/rdf-to-quad.json",
|
||||||
|
"files-scs:config/util/representation-conversion/converters/markdown.json"
|
||||||
],
|
],
|
||||||
"@graph": [
|
"@graph": [
|
||||||
{
|
{
|
||||||
@ -12,6 +13,7 @@
|
|||||||
"@type": "WaterfallHandler",
|
"@type": "WaterfallHandler",
|
||||||
"handlers": [
|
"handlers": [
|
||||||
{ "@id": "urn:solid-server:default:DefaultUiConverter" },
|
{ "@id": "urn:solid-server:default:DefaultUiConverter" },
|
||||||
|
{ "@id": "urn:solid-server:default:MarkdownToHtmlConverter" },
|
||||||
{
|
{
|
||||||
"@type": "IfNeededConverter",
|
"@type": "IfNeededConverter",
|
||||||
"comment": "Only continue converting if the requester cannot accept the available content type"
|
"comment": "Only continue converting if the requester cannot accept the available content type"
|
||||||
@ -36,15 +38,7 @@
|
|||||||
"extension": ".md.hbs",
|
"extension": ".md.hbs",
|
||||||
"contentType": "text/markdown"
|
"contentType": "text/markdown"
|
||||||
},
|
},
|
||||||
{
|
{ "@id": "urn:solid-server:default:MarkdownToHtmlConverter" }
|
||||||
"comment": "Renders Markdown snippets into the main page template.",
|
|
||||||
"@type": "MarkdownToHtmlConverter",
|
|
||||||
"templateEngine": {
|
|
||||||
"@id": "urn:solid-server:default:MainTemplateEngine",
|
|
||||||
"@type": "HandlebarsTemplateEngine",
|
|
||||||
"template": "$PACKAGE_ROOT/templates/main.html.hbs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -15,9 +15,13 @@ html {
|
|||||||
--solid-purple: #7c4dff;
|
--solid-purple: #7c4dff;
|
||||||
--solid-blue: #18a9e6;
|
--solid-blue: #18a9e6;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
background-color: var(--solid-purple);
|
background-color: var(--solid-purple);
|
||||||
background-image: linear-gradient(135deg, var(--solid-purple) 10%, var(--solid-blue) 90%);
|
background-image: linear-gradient(135deg, var(--solid-purple) 10%, var(--solid-blue) 90%);
|
||||||
height: 100%;
|
background-repeat: no-repeat;
|
||||||
|
background-attachment: fixed;
|
||||||
|
overscroll-behavior: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body, input, button {
|
body, input, button {
|
||||||
@ -34,9 +38,6 @@ body {
|
|||||||
background: white;
|
background: white;
|
||||||
box-shadow: 5px 5px 2px rgba(0, 0, 0, .1);
|
box-shadow: 5px 5px 2px rgba(0, 0, 0, .1);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
|
||||||
font: 12pt/1.3 Raleway, sans-serif;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
@ -86,6 +87,10 @@ a:hover {
|
|||||||
color: var(--solid-blue);
|
color: var(--solid-blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
}
|
}
|
||||||
@ -96,6 +101,10 @@ ul > li::marker {
|
|||||||
color: var(--solid-purple);
|
color: var(--solid-purple);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
fieldset {
|
fieldset {
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user