Skip to content

Conversation

bcipolli
Copy link

When coding, we have to distinguish between relative paths and absolute paths. I propose the following convention, to make it very clear:

  • For absolute paths, specify the path as if our root is "/", and prepend baseurl:
<img src="{{ "/images/my_image.png" | prepend: site.baseurl }}" />
  • For relative paths, specify the path without a leading slash:
<img src="images/my_image.png" />

This makes the intent very clear, without having to search whether baseurl was prepended. In order to do this, we simply need to make baseurl not have a trailing slash.

This PR changes the config so that baseurl does not have a trailing slash, and then fixes up the URLs to either use this convention, or (in some cases) start using the baseurl convention.

Ben Cipollini added 2 commits August 24, 2015 13:09
@vsoch
Copy link
Owner

vsoch commented Aug 24, 2015

Did you look on circle? The style, etc is not rendering correctly:

https://circle-artifacts.com/gh/bcipolli/nipy-jekyll/6/artifacts/0/home/ubuntu/nipy-jekyll/_site/home.html

@bcipolli
Copy link
Author

@vsoch I worked on this a bit yesterday, things are a bit funky / not straightforward. I didn't have time to look at it again today, but hopefully tomorrow we can wrap things up!

Any progress from your side?

@vsoch
Copy link
Owner

vsoch commented Aug 25, 2015

I haven't looked at your PR - I've been working from the last up to date version that I had working. To get this to work on circle I tried doing another sed command to change the url, but I couldn't get it working.

For your version - I did a bunch of testing, and was able to figure out that the posts are not rendering because the site.baseurl variable is not defined on index.html - if you take a look, one of the h2 tag is empty. I think it must have something to do with the config fie for the posts, but nothing that I tried seemed to work. An interesting thing I tried was to instead use "site.url," and that worked only given that it was defined (when I changed it to be an empty string, the original error occurred)

Some progress - I got in contact with a circle person so minimally they know that we would want the functionality for circle to automatically detect a jekyll repo and act accordingly. I haven't heard back from the initial response.

Doing some "bigger picture" thinking about this - I'm thinking back to the original goal. We want something that is easy for people to add packages / posts to, and has some kind of continuous integration (for previewing updates). I'm not entirely sure what was wrong with the initial look of the site? Is sphinx hard to update? Jekyll is really annoying. There are some pretty substantial bugs, and I'm not convinced that hosting on github pages is somehow ideal or easier than say, some free service for sites (aka, like google sites). There is definitely work to be done to improve the look of the template that I made, but I'm not sure it's worth it because Jekyll sucks the big one. What do you think?

@bcipolli
Copy link
Author

@vsoch I think this higher-level discussion is perfect for the developer's mailing list. Would you be up for sending there? I think this is the kind of feedback people were waiting for. If you'd like a response from me before sharing anything there, lemme know and I'd be happy to do it!

For my version, for whatever reason the BASEURL env variable is not getting set in the script. I spent over an hour trying to figure out why, then gave up and embedded it directly in the sed command. That worked, but exposed another issue in how the post URLs are constructed. I got stuck on that...

@vsoch
Copy link
Owner

vsoch commented Aug 26, 2015

ok, all set. Let's discuss this properly on the list before either of us invests more time! I think there is misalignment between goals for this site and the infrastructure we are using, and we should work out those details.

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

Successfully merging this pull request may close these issues.

2 participants