Closed bcipolli closed 8 years ago
I think I remember a reason for not doing this - it might have to do with rendering on circle (the .html approach works, the index.html files do not). I think we need to get circle fixed up first so we can test on there before considering this. I definitely agree if we can move to having nicer looking paths for the packages, it would be an improvement.
Sure thing! I figured it was easier to submit a PR rather than an issue. No rush.
The PR is great! It will make the fix super easy. + 1 :)
@vsoch Just rebased; we can take a look on circle shortly!
Yeah unfortunately this is what I remember - the URLS without an actual file name are not able to preview on circle:
It is less elegant to have the *.html files, but it's important for preview. So I think we need to hold off on this PR for now, unless there is another way to do it?
So, I see what you mentioned: circle.ci doesn't look for an index.html:
theirs is the only web server i've ever seen with this behavior lol. We'll have to find a workaround...
Yeah it's pretty annoying.
I'm fine to hold off... though a similar workaround would be to specify 'index.html' in all of the links. Then we could merge this, and "prettify" the internal urls later (when circle shapes up).
@vsoch I did a major refactor here.
data/packages.yml
and into each package file.data/package-categories.yml
/packages/:title
Waiting for circleci build to see if it works there. Works well locally, as far as I can tell.
I'm hoping this will simplify adding packages (all things needed to change are in one place) and fix the URLs issue.
Ah, I see! I really like this structure. I hope it works!
Hmmm, I can already see that it won't. Since circle knows nothing about Jekyll, it just serves static html wherever it is. Jekyll puts the files to : /packages/[project]/index.html
. So... same issue as always.
We should really just replace the URLs (across all files in _site
) for circle, using some sed
command... seems you know sed
well, is that something you could help with?
I think the current structure is working, using jekyll as it was meant without considerable hacking, and I don't see the added benefit of trying to introduce more hacking with its standard functionality to make a change that won't have considerable impact on the actual site.
I really appreciate your hard work, and I too wish it would have worked :O)
LOL okey dokey. I'll compromise and simply set the permalinks to point to index.html
I guarantee this will work :)
And at some point, enough jekyll folk will complain about the issue for circle to actually do something about it instead of pointing us indefinitely to the community boards!
@vsoch I made a change to the baseurl
logic that avoids the double backslash issue. Everything seems to work on circleci, and the url munging script is simplified. Works great locally as well (jekyll serve
)
https://circle-artifacts.com/gh/nipy/nipy.github.com/63/artifacts/0/home/ubuntu/nipy.github.com/_site/index.html#
To specify urls, they should be referred to with absolute URLs, and then baseurl should be prepended. I moved all URLs to use the prepend
filter, but {{site.baseurl}}/my/url
would work fine as well.
So, I think this is a pretty good improvement (simplifies adding packages, cleans up the use of baseurl, organizes files, uses collections).
Lemme know what you think!
Beautiful work!
It looks good on circle, and on my local testing as well. I'm merging this guy!
I think this makes things a bit cleaner: