|
|
|
@ -45,12 +45,11 @@ class Page {
|
|
|
|
|
// adding filename for html as pathname and relative path in structure
|
|
|
|
|
this._filename = this._resolveFilename(file)
|
|
|
|
|
this._slug = this._resolveSlug(this._filename)
|
|
|
|
|
this._path = this._resolvePath(parent)
|
|
|
|
|
|
|
|
|
|
this._permalink = this._path
|
|
|
|
|
this._dirPath = this._resolvePath(parent)
|
|
|
|
|
this._permalink = this._dirPath
|
|
|
|
|
|
|
|
|
|
if (this._slug) {
|
|
|
|
|
this._permalink = this._path + '/' + this._slug
|
|
|
|
|
this._permalink = this._dirPath + '/' + this._slug
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this._filename += '.' + this._fields.extensions
|
|
|
|
@ -70,7 +69,8 @@ class Page {
|
|
|
|
|
return assign({
|
|
|
|
|
'content' : this._content,
|
|
|
|
|
'blocks' : this._blocks,
|
|
|
|
|
'path' : this._path + '/' + this._filename,
|
|
|
|
|
'dirPath' : this._dirPath,
|
|
|
|
|
'path' : this._dirPath + '/' + this._filename,
|
|
|
|
|
'permalink' : this._permalink,
|
|
|
|
|
'filename' : this._filename
|
|
|
|
|
}, this._fields)
|
|
|
|
|