Browse Source

Merge pull request #80 from jrtechs/dockerScript

Docker Script
pull/84/head
Jeffery Russell 4 years ago
committed by GitHub
parent
commit
162d237809
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 6 deletions
  1. +11
    -6
      blog/renderBlogPost.js
  2. +16
    -0
      docker-compose.yml

+ 11
- 6
blog/renderBlogPost.js View File

@ -4,7 +4,7 @@ const utils = require('../utils/utils.js');
const sql = require('../utils/sql');
const argsFull = '--from markdown-markdown_in_html_blocks+raw_html --base-header-level=1 --toc --toc-depth=3 -N --mathjax -t html5';
const argsFull = '--from markdown-markdown_in_html_blocks+raw_html --toc --toc-depth=3 -N --mathjax -t html5';
const argsPreview = '--mathjax -t html5';
@ -198,14 +198,19 @@ module.exports=
reject(err);
}
html = html.split("<img").join("<img style=\"max-width: 100%;\" ");
html = html.split("<code>").join("<code class='hljs cpp'>");
resolve(html);
if(html === undefined)
{
resolve("");
}
else
{
html = html.split("<img").join("<img style=\"max-width: 100%;\" ");
html = html.split("<code>").join("<code class='hljs cpp'>");
resolve(html);
}
};
pandoc(markdownContents, pandocArgs, callback);
});
},

+ 16
- 0
docker-compose.yml View File

@ -0,0 +1,16 @@
version: '3'
# mysql --port=3306 --host=127.0.0.1 -u root --password=password
services:
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
ports:
- "3306:3306"
volumes:
- "./db:/var/lib/mysql"

Loading…
Cancel
Save