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

page_url is not always correct #86

Closed
white-gecko opened this issue Jul 19, 2017 · 5 comments · Fixed by #101
Closed

page_url is not always correct #86

white-gecko opened this issue Jul 19, 2017 · 5 comments · Fixed by #101
Assignees
Milestone

Comments

@white-gecko
Copy link
Member

graph:

<http://example.org/Resource> <http://example.org/rel> <http://example.org/RelatedResource> .
<http://example.org/RelatedResource> <http://example.org/rel> <http://example.org/RelatedResource> .

template

<dl>
    <dt>render_path</dt>
    <dd><pre>{{ page.rdf.render_path }}</pre></dd>
    <dt>page_url</dt>
    <dd><pre>{{ page.rdf.page_url }}</pre></dd>
    <dt>iri</dt>
    <dd><pre>{{ page.rdf.iri }}</pre></dd>
</dl>

rel:
{% assign rel = page.rdf | rdf_property: '<http://example.org/rel>' %}
<dl>
    <dt>render_path</dt>
    <dd><pre>{{ rel.render_path }}</pre></dd>
    <dt>page_url</dt>
    <dd><pre>{{ rel.page_url }}</pre></dd>
    <dt>iri</dt>
    <dd><pre>{{ rel.iri }}</pre></dd>
</dl>

actual:

render_path

    Resource/index.html

page_url

    /Resource/

iri

    http://example.org/Resource

rel:

render_path

page_url

    /Resource/

iri

    http://example.org/RelatedResource

expected:

render_path

    Resource/index.html

page_url

    /Resource/

iri

    http://example.org/Resource

rel:

render_path

    RelatedResource/index.html

page_url

    /RelatedResource/

iri

    http://example.org/RelatedResource
@white-gecko white-gecko added this to the 2.1.1 milestone Jul 19, 2017
@white-gecko
Copy link
Member Author

The missing render_path is covered in #85

@white-gecko
Copy link
Member Author

please also add a test for this

@Simaris
Copy link
Collaborator

Simaris commented Jul 26, 2017

the problem is that page_url is supposed to point at the page it is used on. Changing that behaviour would be an API change (That behaviour is actually used in code). We could implement another method to give the expected information and update behaviours in our next mayor patch.

@white-gecko
Copy link
Member Author

Since the method is only used inside the jekyll-rdf code it is no API change. The difference between page_url and render_path is also depicted in #94 .

@white-gecko
Copy link
Member Author

Since #101 it is now:

render_path

    Resource/index.html

page_url

    Resource/

iri

    http://example.org/Resource

rel:

render_path

    rdfsites/http/example.org/RelatedResource/index.html

page_url

    rdfsites/http/example.org/RelatedResource/

iri

    http://example.org/RelatedResource

even though both pages are under the base url http://example.org/

@white-gecko white-gecko modified the milestones: 2.1.1, 2.1.2 Aug 3, 2017
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 a pull request may close this issue.

2 participants