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

Make URI to generated page mapping neat #94

Closed
white-gecko opened this issue Jul 20, 2017 · 0 comments
Closed

Make URI to generated page mapping neat #94

white-gecko opened this issue Jul 20, 2017 · 0 comments
Assignees
Milestone

Comments

@white-gecko
Copy link
Member

white-gecko commented Jul 20, 2017

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
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

No branches or pull requests

2 participants