Allows periods in blog file names -- will allow for version numbers, etc (#163)

* Allows periods in blog file names -- will allow for version numbers, etc

* Removed debug lines...
This commit is contained in:
Eric Nakagawa 2017-10-24 19:27:37 -07:00 committed by Joel Marcey
parent a6bad7f92d
commit 55b0f33f2a
3 changed files with 10 additions and 4 deletions

View file

@ -250,8 +250,7 @@ function execute() {
.replace("-", "/") .replace("-", "/")
.replace("-", "/") .replace("-", "/")
.replace("-", "/") .replace("-", "/")
.replace(/\./g, "-") .replace(/\.md$/, ".html");
.replace(/\-md$/, ".html");
const result = readMetadata.extractMetadata( const result = readMetadata.extractMetadata(
fs.readFileSync(file, { encoding: "utf8" }) fs.readFileSync(file, { encoding: "utf8" })
); );

View file

@ -340,8 +340,7 @@ function generateMetadataBlog() {
.replace("-", "/") .replace("-", "/")
.replace("-", "/") .replace("-", "/")
.replace("-", "/") .replace("-", "/")
.replace(/\./g, "-") .replace(/\.md$/, ".html");
.replace(/\-md$/, ".html");
const result = extractMetadata( const result = extractMetadata(
fs.readFileSync(file, { encoding: "utf8" }) fs.readFileSync(file, { encoding: "utf8" })
); );

View file

@ -0,0 +1,8 @@
---
title: New Version 1.0.0
author: Eric Nakagawa
authorURL: http://twitter.com/ericnakagawa
authorFBID: 661277173
---
This blog post will test file name parsing issues when periods are present.