AKSW / jekyll-rdf

📃 A Jekyll plugin to include RDF data in your static site or build a complete site for your RDF graph
http://aksw.org/Projects/JekyllRDF
Other
57 stars 10 forks source link

Make URI to generated page mapping neat #94

Closed white-gecko closed 6 years ago

white-gecko commented 7 years ago

Resources with the following URIs should result in the following pages (under the assumption site.url = "http://ex.org"):

iri                       -> render_path (page_url)
<http://ex.org/a>         -> /a.html (/a)
<http://ex.org/b/>        -> /b/index.html (/b/)
<http://ex.org/b/x>       -> /b/x.html (/b/x)
<http://ex.org/b/y/>      -> /b/y/index.html (/b/y/)

For the special case of fragment identifiers:

<http://ex.org/c>         -> /c.html
<http://ex.org/c#alpha>   -> /c.html
<http://ex.org/c#beta>    -> /c.html

In /c.html the variables are set as follows:

page.rdf = "http://ex.org/c"
page.rdf.covered = true
page.sub_rdf = [http://ex.org/c#alpha, http://ex.org/c#beta]

It there is no "super resource" the page is still generated if there are fragment identifiers on it:

<http://ex.org/d#gama>    -> /d.html
<http://ex.org/d#delta>   -> /d.html

In /d.html the variables are set as follows:

page.rdf = "http://ex.org/d"
page.rdf.covered = false
page.sub_rdf = [http://ex.org/d#gama, http://ex.org/d#delta]

Since there is no class in the model for <http://ex.org/d> the default_template will be used except for, that an instance_template_mappings entry exists for <http://ex.org/d>. If no default_template and no mapping is provided, the page will not be rendered.

Further if there are resources ending with .html the behavior should be as follows:

<http://ex.org/e.html>    -> /e.html
<http://ex.org/f>         -> /f.html

The following setup should throw an error for now.

<http://ex.org/g.html>    -> x
<http://ex.org/g>         -> x