3

I really have taken a liking to Stackoverflow's permalinks. The way I understand them to work is as follows:

https://stackoverflow.com/questions/uniqueid/post-title-for-seo

The following gets the job done too https://stackoverflow.com/questions/15721310:

https://stackoverflow.com/questions/uniqueid

Interestingly, if you put anything after uniqueid you will get to the question

https://stackoverflow.com/questions/100001/hello-world
https://stackoverflow.com/questions/100001/hello-cruel-world
https://stackoverflow.com/questions/100001/hello-strange-world

All of the above work, this allows you to change the question's title without losing all your permalinks.

I'm using jekyll and I plan to launch on github with github-pages (which doesn't allow .htaccess). If it can be done with jekyll without github-pages (which I'm sure is much easier) then I'd be willing to deploy it to a hosted VPS. I'm open to any solution!

I would also like questions to be a specific variable in the post like post.category or post.template such as blog or portfolio.

4

1 回答 1

2

The only close this I found in Jekill Docs is to define permalink in every post:

---
layout: share
title: CoffeeScript Spaces and Tabs
date: 2013-09-17
categories: [coffee, eclipse, nodeclipse, enide, studio, monster]
permalink: /share/coffeescript-spaces-and-tabs
---

I see no trace of post ID concept in Jekyll. I hope someone can suggest how to do that with variables or some other way.

于 2013-09-17T10:36:19.047 回答