tom-wolfe / brewdown Goto Github PK
View Code? Open in Web Editor NEWA markdown parser and stylesheet specifically for D&D homebrew
License: MIT License
A markdown parser and stylesheet specifically for D&D homebrew
License: MIT License
The stats in order are STR, DEX, CON, INT, WIS, CHA. In the readme, the screenshot and HTML output have WIS and INT listed the wrong way around.
When combining stat blocks and bullet points, the bullet font seems to jump back to serif and it looks messy.
Add a way to have a two-column stat blocks
When using this in a project that uses ngAnnotate and browserfy, I get errors due to the ES6 syntax. Any chance you'd consider reworking things a bit so it can be used like other markdown-it plugins?
Hey!
I am currently looking for some tools to write down some notes and found this one. Looks super cool but I have some problems with it. I juse it the following way:
const Markdown = require('markdown-it');
const markdownInclude = require('markdown-it-include');
const brewdown = require('brewdown')
const glob = require('glob')
const fs = require('fs')
const path = require('path')
const args = process.argv.slice(2);
const folder = path.resolve(args[0]);
const md = new Markdown().use(brewdown, { style: "two-col", pageSize: "a4" });
glob(`${folder}/**/*.md`, {}, (err, files) => {
if (err) console.error(err);
files.forEach(file => {
const filename = path.basename(file, path.extname(file));
const folderPath = path.dirname(file);
const content = fs.readFileSync(file, 'utf-8');
const html = md.render(content);
const htmlFilePath = path.resolve(folderPath, `${filename}.html`);
fs.writeFileSync(htmlFilePath, html);
});
});
Basically it iterates over each .md
file and generates the html file alongside of the source used.
Now I tried it with the following content, expecting to get a cover page plus a simple text line on the next one but after opening the file in my browser I simply got the rendered text without any formatting or style.
::: cover
# Lost Mine of Phandelver
#### A smaller tl;dr version of the introduction story line
:::
\newpage
Test1
Hi there,
I wanted to try this, as I usually use markdown for my dnd game notes and content, but I couldn't manage to get the CSS working.
I have a simple script that i run on my md files:
const Markdown = require('markdown-it');
const brewdown = require('brewdown');
var fs = require('fs');
const contentFile = "test.md";
const md = new Markdown().use(brewdown, {style: "two-col", pageSize: "letter"});
var content = fs.readFileSync(contentFile, "utf-8");
const html = md.render(content);
// console.log(html)
fs.writeFile('content.html', html, (err) => {
if (err) throw err;
})
But the result of an example from Your projects looks like this:
Could you point me in the right direction here?
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.