You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a markdown file which stores the page content and a simple html template for head,header and footer.
I currently use var htmlContent = fs.readFileSync('./build/index.content.html', 'utf8'); to get the created html from markdown. I was wondering if there is a way to get this directly as string and don't use the filesystem (in functioninjectMarkdownHtmlInIndex)?
My 2 steps below are:
convert markdown file to html file in build/ folder
inject the created html source in .html file, therefore I use fs.readFileSync
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey everyone,
I programmed a one page which takes a markdown file as content-source (live: https://schnelldurchlauf.eu/klimakrise/ | repository: https://github.com/programmieraffe/klimakriseschnelldurchlauf)
I have a markdown file which stores the page content and a simple html template for head,header and footer.
I currently use
var htmlContent = fs.readFileSync('./build/index.content.html', 'utf8');
to get the created html from markdown. I was wondering if there is a way to get this directly as string and don't use the filesystem (in functioninjectMarkdownHtmlInIndex
)?My 2 steps below are:
Full source code of gulpfile:
https://github.com/programmieraffe/klimakriseschnelldurchlauf/blob/master/gulpfile.js
Maybe there is a better/cleaner way. Thanks in advance for all suggestions!
Best regards & stay safe!
Beta Was this translation helpful? Give feedback.
All reactions