nipy / nipy.github.io

Main website for the Neuroimaging in Python community
http://nipy.org
8 stars 10 forks source link

Move package files to packages/ directory. #23

Closed bcipolli closed 8 years ago

bcipolli commented 8 years ago

I think this makes things a bit cleaner:

vsoch commented 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.

bcipolli commented 8 years ago

Sure thing! I figured it was easier to submit a PR rather than an issue. No rush.

vsoch commented 8 years ago

The PR is great! It will make the fix super easy. + 1 :)

bcipolli commented 8 years ago

@vsoch Just rebased; we can take a look on circle shortly!

vsoch commented 8 years ago

Yeah unfortunately this is what I remember - the URLS without an actual file name are not able to preview on circle:

https://circle-artifacts.com/gh/nipy/nipy.github.com/53/artifacts/0/home/ubuntu/nipy.github.com/_site/packages/mindboggle/

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?

bcipolli commented 8 years ago

So, I see what you mentioned: circle.ci doesn't look for an index.html:

Fails: https://circle-artifacts.com/gh/nipy/nipy.github.com/53/artifacts/0/home/ubuntu/nipy.github.com/_site/

Succeeds: https://circle-artifacts.com/gh/nipy/nipy.github.com/53/artifacts/0/home/ubuntu/nipy.github.com/_site/index.html

theirs is the only web server i've ever seen with this behavior lol. We'll have to find a workaround...

vsoch commented 8 years ago

Yeah it's pretty annoying.

bcipolli commented 8 years ago

https://discuss.circleci.com/t/circle-artifacts-com-not-using-index-html/320

bcipolli commented 8 years ago

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).

bcipolli commented 8 years ago

@vsoch I did a major refactor here.

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.

vsoch commented 8 years ago

Ah, I see! I really like this structure. I hope it works!

bcipolli commented 8 years ago

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?

vsoch commented 8 years ago

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.

vsoch commented 8 years ago

I really appreciate your hard work, and I too wish it would have worked :O)

bcipolli commented 8 years ago

LOL okey dokey. I'll compromise and simply set the permalinks to point to index.html I guarantee this will work :)

vsoch commented 8 years ago

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!

bcipolli commented 8 years ago

@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!

vsoch commented 8 years ago

Beautiful work!

vsoch commented 8 years ago

It looks good on circle, and on my local testing as well. I'm merging this guy!