Merge pull request 'feat: Add last newline on markdown file' (#1) from newlines into main
Reviewed-on: https://git.weko.io/resilien/directus-to-markdown/pulls/1
This commit is contained in:
commit
e527a71708
2
index.js
2
index.js
|
@ -21,7 +21,7 @@ export default class DirectusToMarkdown {
|
|||
async _writeIndex(item, itemPath) {
|
||||
const frontMatter = this._formatFrontMatter(item)
|
||||
const content = item[this.contentKey] ? item[this.contentKey].toString() : ''
|
||||
const itemContent = `${frontMatter}${content}`
|
||||
const itemContent = `${frontMatter}${content}\r\n`
|
||||
const indexName = 'index' // TODO: index or _index ?
|
||||
fs.writeFileSync(`${itemPath}/${indexName}.md`, itemContent)
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@resilien/directus-to-markdown",
|
||||
"version": "1.0.0",
|
||||
"version": "0.2.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@resilien/directus-to-markdown",
|
||||
"version": "1.0.0",
|
||||
"version": "0.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@directus/sdk": "^9.5.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@resilien/directus-to-markdown",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "Export Directus items to markdown files with assets",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in New Issue