|
|
|
@ -4,7 +4,6 @@ const merge = require('lodash.merge')
|
|
|
|
const nunjucks = require('nunjucks')
|
|
|
|
const nunjucks = require('nunjucks')
|
|
|
|
const assign = require('assign-deep')
|
|
|
|
const assign = require('assign-deep')
|
|
|
|
const fs = require('fs')
|
|
|
|
const fs = require('fs')
|
|
|
|
const uuid = require('uuid')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Media = require('./../factories/media.js')
|
|
|
|
const Media = require('./../factories/media.js')
|
|
|
|
const parseMarkdownFile = require('./../parsers/markdown.js')
|
|
|
|
const parseMarkdownFile = require('./../parsers/markdown.js')
|
|
|
|
@ -53,7 +52,6 @@ class Page {
|
|
|
|
this._filename = this._resolveFilename(file)
|
|
|
|
this._filename = this._resolveFilename(file)
|
|
|
|
this._slug = this._resolveSlug(this._filename)
|
|
|
|
this._slug = this._resolveSlug(this._filename)
|
|
|
|
this._permalink = this._dirPath
|
|
|
|
this._permalink = this._dirPath
|
|
|
|
this._uuid = uuid.v5(this._dirPath + '/' + this._filename, uuid.v5.URL)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this._slug) {
|
|
|
|
if (this._slug) {
|
|
|
|
this._permalink = this._dirPath + '/' + this._slug
|
|
|
|
this._permalink = this._dirPath + '/' + this._slug
|
|
|
|
@ -104,8 +102,7 @@ class Page {
|
|
|
|
'dirPath' : this._dirPath,
|
|
|
|
'dirPath' : this._dirPath,
|
|
|
|
'path' : this._dirPath + '/' + this._filename,
|
|
|
|
'path' : this._dirPath + '/' + this._filename,
|
|
|
|
'permalink' : this._permalink,
|
|
|
|
'permalink' : this._permalink,
|
|
|
|
'filename' : this._filename,
|
|
|
|
'filename' : this._filename
|
|
|
|
'uuid' : this._uuid
|
|
|
|
|
|
|
|
}, this._fields)
|
|
|
|
}, this._fields)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|