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

Incorrect relative path (project_url) in index.html #204

Closed
d7919 opened this issue Apr 5, 2017 · 10 comments
Closed

Incorrect relative path (project_url) in index.html #204

d7919 opened this issue Apr 5, 2017 · 10 comments
Labels

Comments

@d7919
Copy link
Contributor

d7919 commented Apr 5, 2017

After merging the recent set of merged commits into my fork I noticed that my main index.html no longer renders correctly and have identified that this is because the project_url used for all relative links in this page have changed from being "." to "..". All other pages (that I've looked at) render fine, although I suspect this will also be an issue for the search page.

I suspect this is related to the delayed rendering introduced in 56c262a as around this line we force the use of "." in creating the IndexPage but then change to ".." for everything else. In the past this worked because the IndexPage html was generated at instance creation but now it's not generated until we write the actual file which means it sees the updated value ".." rather than the value at creation time ".".

A quick fix for this is to move the if block here to just before this line, with the change data --> self.index.data. Probably want to also move the if block here to just after here (with the same change) to ensure we leave the final state unchanged.

d7919 referenced this issue in d7919/ford Apr 5, 2017
This issue arises due to the delayed rendering introduced in
56c262a. See https://github.com/cmacmackin/ford/issues/204 for the bug report
@d7919
Copy link
Contributor Author

d7919 commented Apr 5, 2017

I have an example of the quick fix in my fork. I've not created a PR (yet) as there may be a better way to fix this.

@haraldkl
Copy link
Contributor

haraldkl commented Apr 5, 2017

I think, this solution did not quite work for me. I had to do c13fe7b to get the paths correct. Though, I am also not sure what the correct solution would be.

@cmacmackin
Copy link
Contributor

cmacmackin commented Apr 5, 2017 via email

@d7919
Copy link
Contributor Author

d7919 commented Apr 5, 2017

@haraldkl I actually went for your approach first as a test. Do you know which part of the other approach didn't work for you (e.g. did something break or did it just not fix the index issue)?

@haraldkl
Copy link
Contributor

haraldkl commented Apr 5, 2017

I think it just did not work in all places. Maybe the links in the graphs were broken?

@haraldkl
Copy link
Contributor

haraldkl commented Apr 5, 2017

OK the comments on this are in #191, and it looks like the commit c13fe7b is the one that broke the graphs, in addition I needed ab84c5d. Thus, maybe I am just wrongly remembering this and your approach actually works.

@cmacmackin
Copy link
Contributor

I think this is now working? I haven't come across any problems since merging your commits, anyway.

@haraldkl
Copy link
Contributor

I also believe it works as it is right now. We are using relative paths with this version of FORD, without noticing any issues.

@cmacmackin
Copy link
Contributor

I'll close the issue then.

@haraldkl
Copy link
Contributor

However, there is also df9f30d, so there might still be some dragons lurking in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants