Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ npm run clean docs # cleans the docs directory
```

See all build jobs and their specifications with `npm run.`

## License

This work is released under the ISC license.
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 47 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boringproxy.io",
"version": "0.1.0",
"version": "0.2.0",
"description": "",
"main": "ssg.js",
"directories": {
Expand All @@ -17,6 +17,6 @@
"devDependencies": {
"highlight.js": "^10.3.2",
"highlightjs": "^9.16.2",
"marked": "^1.2.2"
"marked": "^4.0.12"
}
}
2 changes: 1 addition & 1 deletion partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="/styles.css">
<link rel="icon" href="/logo.png">
</head>

<body>
<div class='content'>
<header>
Expand Down
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions ssg.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs');
const path = require('path');
const marked = require('marked');
const { marked } = require('marked');
const hljs = require('highlightjs');

marked.setOptions({
Expand All @@ -13,7 +13,7 @@ marked.setOptions({
});

const inDir = './';
const outDir = (process.argv.length !== 3) ? './' : `./${process.argv[2]}/`;
const outDir = (process.argv.length !== 3) ? 'docs' : `./${process.argv[2]}/`;
fs.mkdirSync(outDir, { recursive: true });

const partialsDir = path.join(inDir, 'partials');
Expand All @@ -32,7 +32,7 @@ for (const pageMd of pagesFiles) {
}

const mdText = fs.readFileSync(path.join(pagesDir, pageMd.name), 'utf-8');
const htmlText = headerHtml + marked(mdText) + footerHtml;
const htmlText = headerHtml + marked.parse(mdText) + footerHtml;
const pageName = path.parse(pageMd.name).name;

let htmlDir;
Expand All @@ -48,7 +48,7 @@ for (const pageMd of pagesFiles) {
}

if (outDir != './') {
for (file of ["styles.css", "logo.svg", "screenshot.png"]) {
for (file of ["styles.css", "logo.svg", "logo.png", "screenshot.png"]) {
fs.copyFileSync(`${file}`, path.join(outDir, file))
}
}