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

resources use global config instead site.config #145

Closed Simaris closed 6 years ago

Simaris commented 6 years ago

path building should now work in developer mode too

Fix #102 properly.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling a2ca0c62ea07a19528b26661eb09ea094c061161 on Simaris:render_path_should_work_non_rdf_page into 790ca72c00a7e97e20279a3f7bf0fffbcd0b11e6 on white-gecko:develop.

white-gecko commented 6 years ago

If I understand it correctly this pr addressed the issue, as pointed out in the readme:

Note: Since Jekyll 3.3.0 there is a special behavior of the jekyll serve command in a development environment. Jekyll overwrites the site.url variable with your host and port reference, as described in the Jekyll documentation. The behavior breaks the jekyll-rdf resource creation. If you want to use jekyll serve you have to set the environment variable JEKYLL_ENV=production.

It might not be a good idea to overwrite the behavior of jekyll for our plug-in in this case. Since there might be side effects, now or in the future. I would suggest instead to output a warning in the case, that @site.config["url"] != Jekyll::JekyllRdf::Helper::RdfHelper::config["url"].

white-gecko commented 6 years ago

We should also support a new jeykll_rdf config key baseiriwhich would overwrite @site.config["url"] and @site.config["baseurl"] in any case.