<div dir="ltr">My current strategy is to use Jekyll plugins to try and set either the site.baseurl, or a "baseurl" variable, based on, say, environment variables (<a href="http://circle.ci">circle.ci</a>) or the site object (github).<div><br></div><div>It's easy to set variables, easy to get environment variables, sometimes ok to get the site object... but haven't got it all together yet.</div><div><br></div><div>Some references:</div><div><a href="https://circleci.com/docs/environment-variables">https://circleci.com/docs/environment-variables</a><br></div><div><a href="https://help.github.com/articles/repository-metadata-on-github-pages/">https://help.github.com/articles/repository-metadata-on-github-pages/</a><br></div><div><br></div><div><a href="http://jekyllrb.com/docs/plugins/">http://jekyllrb.com/docs/plugins/</a></div><div><a href="http://ruby-doc.org/core-2.1.4/ENV.html">http://ruby-doc.org/core-2.1.4/ENV.html</a><br></div><div><br></div><div>and according to this:</div><div><a href="http://jekyllrb.com/docs/variables/">http://jekyllrb.com/docs/variables/</a><br></div><div>you can't reset values of the site.baseurl value, so probably will have to store a separate variable in some other structure, and use that elsewhere.</div><div><br></div><div>Ben</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 22, 2015 at 12:56 PM, Ben Cipollini <span dir="ltr"><<a href="mailto:bcipolli@ucsd.edu" target="_blank">bcipolli@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">@Ariel I don't think that change solves anything different than simply setting the baseurl to /nipy-jekyll/ (note: I would avoid the fully qualified URL, it would unintentionally make a <a href="http://circle.ci" target="_blank">circle.ci</a> version of the site, or a locally built one without specifying an overriding baseurl, to pull from an unexpected source.)<div><br></div><div>The problem is (at least as I see it), we need different baseurl values for different build situations (gh-pages, <a href="http://circle.ci" target="_blank">circle.ci</a>, local).<div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sat, Aug 22, 2015 at 12:12 PM, Ariel Rokem <span dir="ltr"><<a href="mailto:arokem@gmail.com" target="_blank">arokem@gmail.com</a>></span> wrote:<br></span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sat, Aug 22, 2015 at 11:34 AM, vanessa sochat <span dir="ltr"><<a href="mailto:vsochat@stanford.edu" target="_blank">vsochat@stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The "ugly" solution is to use different templates for the pages not at the base url, and then you can just hard code the page one level up. For example, <a href="https://github.com/vsoch/nipy-jekyll/blob/master/_includes/head.html" target="_blank">in the header</a>:<div><br></div><div>a path currently looks like:</div><div><br></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">       <</span><span style="color:rgb(99,163,92);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">script</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap"> </span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">src</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">=</span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap"><span>"</span>{{ <span>"</span></span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">js</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">/</span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">tipsy</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">.</span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">js</span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap"><span>"</span> | prepend: site.baseurl }}<span>"</span></span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">></</span><span style="color:rgb(99,163,92);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">script</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">></span><br><div><br></div><div>and for subpages, we would make a new header_subpage.html with a path like:</div><div><br></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">       <</span><span style="color:rgb(99,163,92);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">script</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap"> </span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">src</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">=</span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap"><span>"</span>{{ <span>"../</span></span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">js</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">/</span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">tipsy</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">.</span><span style="color:rgb(121,93,163);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">js</span><span style="color:rgb(24,54,145);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap"><span>"</span> | prepend: site.baseurl }}<span>"</span></span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">></</span><span style="color:rgb(99,163,92);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">script</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre-wrap">></span><br><div><br></div><div>But then when you change anything about the design, you have to change it in two places. I started implementing this, felt sick to my stomach at how awful the idea was, and completely converted everything back :) I think it could be possible to <a href="http://liquidmarkup.org/" target="_blank">use this weird language</a> so that all pages detect their level. For example, <a href="https://github.com/vsoch/nipy-jekyll/commit/2ac70c6dee2372be6676848aac9766459f4c57c2#diff-e921a390257abd15c1742300f2417b13R14" target="_blank">take a look here</a> at a solution I figured out using the syntax - but it fails in that the if statement is hard coded.</div><div><br></div><div><a href="https://github.com/vsoch/nipy-jekyll/commit/c72756afad2bc4cb57d893f76e9dd4f425b79218#diff-4ea7a794e4d7b7503ac520689daeb20bL17" target="_blank">Also take a look here</a> - for the posts we can get the URLs programatically, but I wasn't sure how to do that for "non-post" pages.</div><div><br></div></div></div></div><div><div><div class="gmail_extra"><br></div></div></div></blockquote><div><br></div></span><div>I am also thinking in this direction. Maybe we can have different baseurl configs for different things? Something along these lines: <br></div><div><br></div><div><a href="https://github.com/arokem/nipy-jekyll/commit/9f2b6be741b20b779321dc2739fc6c6efa1a3bac" target="_blank">https://github.com/arokem/nipy-jekyll/commit/9f2b6be741b20b779321dc2739fc6c6efa1a3bac</a><br></div><div><br></div><div>Still not working, but something like this might work. Once we settle on a design, I don't expect that we will have many changes there. I think that most PRs will be with text content, and not to things of this sort, so I am not too worried about the potential ugliness of having to change many things in many places for that. </div><div><div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote">On Sat, Aug 22, 2015 at 11:24 AM, Ben Cipollini <span dir="ltr"><<a href="mailto:bcipolli@ucsd.edu" target="_blank">bcipolli@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oops, I spoke too soon. Sounds like <a href="http://circle.ci" target="_blank">circle.ci</a> is very important. :)<div><br></div><div>Vanessa, you had an idea for an "ugly" solution for the original issue? May I ask what that is? Looks like others are simply using --baseurl="" on the command-line.</div><div><br></div><div>Thanks,<br>Ben</div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 22, 2015 at 11:19 AM, vanessa sochat <span dir="ltr"><<a href="mailto:vsochat@stanford.edu" target="_blank">vsochat@stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Ariel,<div><br></div><div>Circle is needed to preview PRs.</div><div><br></div><div>On your fork take a look at the individual blog pages - the path goes to the base and it is not found. And then on circle since the baseurl is "/" it would be quite broken looking.</div><div><br></div><div>Right now adding a project would mean adding an entry to the <a href="https://github.com/vsoch/nipy-jekyll/blob/master/_data/packages.yml" target="_blank">data file</a>, and then copying a template page for it (<a href="https://github.com/vsoch/nipy-jekyll/blob/master/sdm.html" target="_blank">for example</a>, you would just need the header and to name the page corresponding to its tag in the data file). The navigation, front page, and D3 are rendered from that file, but I didn't see a nice way to generate an entire page for the package. The reason I had originally chosen flask is because a person could just add a line to a tsv file, and the application would be smart enough to make the page if the user did not. I don't see a way to achieve that with these more syntax based frameworks. </div><div><br></div><div>For the content and more tweaks to the design - let's hold off on jumping into that until we get this url issue worked out! I am totally game for adjusting the design, layout, content for whatever people think is best.</div><div><br></div><div>Best,</div><div><br></div><div>Vanessa</div></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sat, Aug 22, 2015 at 11:04 AM, Ariel Rokem <span dir="ltr"><<a href="mailto:arokem@gmail.com" target="_blank">arokem@gmail.com</a>></span> wrote:<br></span><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Vanessa, <div><br></div><div class="gmail_extra">Sorry for the delay in responding. </div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sun, Aug 16, 2015 at 3:18 PM, vanessa sochat <span dir="ltr"><<a href="mailto:vsochat@stanford.edu" target="_blank">vsochat@stanford.edu</a>></span> wrote:<br></span><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Everyone,<div><br></div><div>Here is an update to the site. I've <a href="https://github.com/vsoch/nipy-jekyll" target="_blank">ported it into jekyll</a>, and tested the template on iphone and computer (seems reasonable). I've also gotten it to render the artifacts on <a href="https://circleci.com/gh/vsoch/nipy-jekyll/32" target="_blank">circle.ci</a>, so we could preview PRs (Click "artifact" and then find <a href="https://circle-artifacts.com/gh/vsoch/nipy-jekyll/32/artifacts/0/home/ubuntu/nipy-jekyll/_site/home.html" target="_blank">home.html</a>). However, I've run into a bug with regard to absolute vs. relative paths - when you click the demo link above, the "posts" not being at the base url means they will not be linked or render correctly (for example, <a href="https://circle-artifacts.com/gh/vsoch/nipy-jekyll/32/artifacts/0/home/ubuntu/nipy-jekyll/_site/code-syntax/index.html" target="_blank">here is a link</a> to a post on circle, and you won't see styling because the css/js links are broken)</div><div><br></div><div>The site works perfectly given that we aren't serving it at a relative path, eg:</div><div><br></div><div>jekyll serve --baseurl="/"</div><div><br></div><div>And the challenge is finding a solution that will render locally, on github pages, and <a href="http://circle.ci" target="_blank">circle.ci</a>, and what we need, I think, is some kind of liquid syntax that will detect when we are in a subfolder and render appropriately. I've been messing around with it for 7 hours today and can't figure it out, and I need to ask for help. Could someone else take a look? Likely someone with more experience than me with Jekyll could figure this out in a heartbeat (Ariel?) The plan right now, I'd like to propose, would be to figure out this bug, get it onto a (test) github pages, tweak the details of the content, make proper documentation, and then release to official github pages.</div><div><br></div></div></blockquote><div> </div></span><div>Why do we need CircleCI here? I am actually not sure what the issue is, but here's the site rendered through gh-pages on my fork of your repo:  </div><div><br></div><div><a href="http://arokem.github.io/nipy-jekyll/" target="_blank">http://arokem.github.io/nipy-jekyll/</a></div><div><br></div><div>I did also add a Gemfile to the repo, and that might matter: I believe Github pages serves jekyll through a call to "bundle exec jekyll serve" (see here: <a href="https://help.github.com/articles/using-jekyll-with-pages/" target="_blank">https://help.github.com/articles/using-jekyll-with-pages/</a>). </div><div><br></div><div>One comment about the content: I would prefer to have a front page that just states what this thing is, and the projects on a separate page. I would like for it to be *super* easy to add projects. The whole idea is that the NIPY community is not a static list of projects, but an ever-evolving ecosystem. <br></div><div><br></div><div>Cheers, </div><span><font color="#888888"><div><br></div><div>Ariel</div><div><br></div><div><br></div><div> </div></font></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir="ltr"><div></div><div>Best,</div><div><br></div><div>Vanessa</div><span><font color="#888888"><div><br></div><div><br></div><div>-- <br><div>Vanessa Villamia Sochat<br>Stanford University<br><div><div><div><a href="tel:%28603%29%20321-0676" value="+16033210676" target="_blank">(603) 321-0676</a></div></div></div></div>
</div></font></span></div>
<br></span><span>_______________________________________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org" target="_blank">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br>
<br></span></blockquote></div><br></div></div>
<br>_______________________________________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org" target="_blank">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br>
<br></blockquote></div></div></div><div><div><br><br clear="all"><div><br></div>-- <br><div>Vanessa Villamia Sochat<br>Stanford University<br><div><div><div><a href="tel:%28603%29%20321-0676" value="+16033210676" target="_blank">(603) 321-0676</a></div></div></div></div>
</div></div></div>
<br>_______________________________________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org" target="_blank">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org" target="_blank">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Vanessa Villamia Sochat<br>Stanford University<br><div><div><div><a href="tel:%28603%29%20321-0676" value="+16033210676" target="_blank">(603) 321-0676</a></div></div></div></div>
</div>
</div></div><br>_______________________________________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org" target="_blank">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org" target="_blank">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br>
<br></blockquote></div></div></div><br></div>
</blockquote></div><br></div>