Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Post URL's not working. #403

Closed
jacquestardie opened this Issue · 11 comments

3 participants

@jacquestardie

Working on http://jacquestardie.org/atlanticsalmon/.

Selecting a link on the right leads you here: http://jacquestardie.org/threat/2011/09/19/Threat1.html.

I'm not sure why the file doesn't exist. I have a post in the _posts dir that I expect to work.

What am I missing?

Repo is here if someone doesn't mind checking it out:
https://github.com/jacquestardie/atlanticsalmon

@jacquestardie

Also, I realize that there is probably a fairly obvious answer to this. But if someone could correct me I'd gladly send you $5 for your time!

@cocoahero

It is because when the site is being generated by github, it is not generating the permalinks you are trying to use.

Read up on the permalink configuration settings here. Then put the desired configuration in your _config.yml file. You can use mine as an example.

EDIT

Also, I see that you are pushing your locally generated _site to the repo. This is not necessary as github automatically runs your repo through jekyll on each push. Your _site directory is not what is being hosted by github pages.

@uraimo

http://jacquestardie.org/atlanticsalmon/threat/2011/09/19/Threat1.html is available. Cocoahero is right, i'd try with permalink: /atlanticsalmon/:year/:month/:day/:title

@jacquestardie

Got it. Thanks so much!

@jacquestardie

Ugh, I lied.

Where am I going wrong here.

Using permalink: /atlanticsalmon/:categories/:title
This works, http://jacquestardie.org/atlanticsalmon/
This does not, http://jacquestardie.org/atlanticsalmon/threat/Threat1

@jacquestardie jacquestardie reopened this
@uraimo

I've never used that :categories symbol so i can't comment regarding the intended behavior, i'd try using this:

categories:
-threat

instead of category: threat in your post.
If this works, and if this was the intended behavior, the wiki should be updated, if not it's a bug.

Edit:
categories:

  • threat (with a space before threat)
@cocoahero

You don't need the atlanticsalmon in your permalink definition. Behind the scenes, http://jacquestardie.org/atlanticsalmon/ is actually a separately hosted site, therefore / actually represents /atlanticsalmon/.

If your taking the category approach of organizing your posts, then this should work for you:

permalink: /:category/:title

This should generate links such as /atlanticsalmon/threat/post-title.html

@jacquestardie

So, if I do that, links go to here: http://jacquestardie.org/threat/Threat1

http://jacquestardie.org/atlanticsalmon/ is actually powered by the same jekyll instance.

The only thing I can think that might make this more complicated that it is, is the fact that jacquestardie.org is actually hosted with jekyll/github as well. Really, I'm not sure. I think tonight I might try moving this to a new domain and see if it has any effect.

Thanks again cocoahero

@cocoahero

Interesting. It looks like your almost there. Try adding the /atlanticsalmon/ back in to the permalink. I thought it didn't work this way (specific to Github pages).

@jacquestardie

Back to permalink: /atlanticsalmon/:categories/:title, which yields http://jacquestardie.org/atlanticsalmon/threat/Threat1

The link looks good, but if you visit that page, you get a 'Page does not Exist' error via Github.

Not sure if this might clarify things, but when I run jekyll locally, my directory structure is /_site/atlanticsalmon/threat/Threat1

@cocoahero

You need either a trailing slash, or a .html extension.

/atlanticsalmon/:categories/:title.html -or- /atlanticsalmon/:categories/:title/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.