-
Notifications
You must be signed in to change notification settings - Fork 10
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
File path went from name to dir #154
File path went from name to dir #154
Conversation
1 similar comment
|
I added a fix for the problem above. |
Please check this and see how to make the fix of #155 still work. |
8049a6a
to
2d413d1
Compare
lib/jekyll/drops/rdf_resource.rb
Outdated
@@ -116,6 +116,12 @@ def filename(domain_name, baseurl) | |||
@filename ||= generate_file_name(domain_name, baseurl) | |||
end | |||
|
|||
def filedir | |||
return @filedir unless @filedir.nil? | |||
generate_file_name(@site.config["url"], @site.config["baseurl"]) #TODO change to RdfHelper.... like page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the TODO
lib/jekyll/drops/rdf_resource.rb
Outdated
@@ -116,6 +116,12 @@ def filename(domain_name, baseurl) | |||
@filename ||= generate_file_name(domain_name, baseurl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove domain_name
and baseurl
parameters from filename method.
lib/jekyll/drops/rdf_resource.rb
Outdated
@@ -116,6 +116,12 @@ def filename(domain_name, baseurl) | |||
@filename ||= generate_file_name(domain_name, baseurl) | |||
end | |||
|
|||
def filedir | |||
return @filedir unless @filedir.nil? | |||
generate_file_name(@site.config["url"], @site.config["baseurl"]) #TODO change to RdfHelper.... like page_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the TODO line
2d413d1
to
4e15c97
Compare
lib/jekyll/drops/rdf_resource.rb
Outdated
domain_name = domain_name.to_s | ||
baseurl = baseurl.to_s | ||
domain_name = URI::split(Jekyll::JekyllRdf::Helper::RdfHelper::site.config["url"])[2].to_s | ||
baseurl = Jekyll::JekyllRdf::Helper::RdfHelper::site.config["baseurl"].to_s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does happen, of no baseurl
is set in the config? i.e. if there is no config parameter for baseurl
at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then the value returned by config would be Nil. For that reason, we use the .to_s
method to cast it to string.
Nil cast to String becomes "", which means it has no further effect.
0137c87
to
8c194de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this fix the page is not rendered to the usual path.
made the fix but the also, I still need to test |
993c212
to
ae22032
Compare
the methods page_url, render_path, filename and filedir will now yield correct results, no matter in what order they are used. filename param were removed.
ae22032
to
734295c
Compare
Fix #147
above issue brought a design flaw to my attention, that there since the beginning
and causes us to endlessly redo resource.generate_file_name