|
@@ -186,14 +186,7 @@ class Entry(object):
|
|
|
|
|
|
@property
|
|
@property
|
|
def destination(self):
|
|
def destination(self):
|
|
- # pages are rendered to the top level
|
|
|
|
- if self.kind == 'page':
|
|
|
|
- dest = '%s.html' % self.title.replace('/', "-")
|
|
|
|
- else:
|
|
|
|
- dest = "%s/%s/index.html" % (KINDS[self.kind]['name_plural'], self.name)
|
|
|
|
- dest = dest.lstrip('/')
|
|
|
|
- print dest
|
|
|
|
- return os.path.join(CONFIG['output_to'], dest)
|
|
|
|
|
|
+ return os.path.join(CONFIG['output_to'], self.permalink)
|
|
|
|
|
|
@property
|
|
@property
|
|
def title(self):
|
|
def title(self):
|
|
@@ -237,6 +230,17 @@ class Entry(object):
|
|
return markdown2.markdown(self.body, extras=['fenced-code-blocks',
|
|
return markdown2.markdown(self.body, extras=['fenced-code-blocks',
|
|
'hilite',
|
|
'hilite',
|
|
'tables'])
|
|
'tables'])
|
|
|
|
+
|
|
|
|
+ @property
|
|
|
|
+ def permalink(self):
|
|
|
|
+ if self.kind == 'page':
|
|
|
|
+ dest = '%s.html' % self.title.replace('/', "-")
|
|
|
|
+ else:
|
|
|
|
+ dest = "%s/%s/index.html" % (KINDS[self.kind]['name_plural'], self.name)
|
|
|
|
+ dest = dest.lstrip('/')
|
|
|
|
+
|
|
|
|
+ return dest
|
|
|
|
+
|
|
@property
|
|
@property
|
|
def tags(self):
|
|
def tags(self):
|
|
try:
|
|
try:
|