0.0.2 - "you like sausages?"
added way to change the wiki name without hardcoding it * converted yiki.css to LF-only since i forgot i managed to save it as CR-LF oops - lowered the rate of gakking[1] in production AC: kind of expected this i made yiki in 4 hours lol [1]: <https://dictionary.cambridge.org/dictionary/norwegian-english/gakking>
This commit is contained in:
parent
748a536ae2
commit
c10aa967d1
|
@ -31,6 +31,12 @@ Otherwise, if you just want to use `yiki` to render one file:
|
||||||
|
|
||||||
`node compile source.md target.htm`
|
`node compile source.md target.htm`
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
`WIKINAME` Specify what the "A new yiki!" text should be replaced with.
|
||||||
|
|
||||||
|
Example: `gmake WIKINAME="I love options!"`
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
I request (but not require) that you modify files without Carriage Returns,
|
I request (but not require) that you modify files without Carriage Returns,
|
||||||
|
|
|
@ -40,8 +40,12 @@ function render(input, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function format(data, name) {
|
function format(data, name) {
|
||||||
|
var wikiName = "A new yiki!";
|
||||||
|
if(process.env["WIKINAME"]) {
|
||||||
|
wikiName = process.env["WIKINAME"];
|
||||||
|
}
|
||||||
// probably should bring in a better templating engine but whatever
|
// probably should bring in a better templating engine but whatever
|
||||||
return (`<!doctype html>\r\n<html><head<meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>${name} - Documentation</title><link rel="stylesheet" type="text/css" href="yiki.css"></head><body><nav><span>A new yiki!</span><span> | </span><a href="home.htm">home</a></nav><hr>${data}</body></html>`);
|
return (`<!doctype html>\r\n<html><head<meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>${name} - Documentation</title><link rel="stylesheet" type="text/css" href="/yiki.css"></head><body><nav><span>${wikiName}</span><span> | </span><a href="/index.htm">home</a></nav><hr>${data}</body></html>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let content = render(Filesystem.readFileSync(Process.argv[2]).toString());
|
let content = render(Filesystem.readFileSync(Process.argv[2]).toString());
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "yiki",
|
"name": "yiki",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "yiki",
|
"name": "yiki",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"description": "The yellows111 wiki system",
|
"description": "The yellows111 wiki system",
|
||||||
"main": "compile.js",
|
"main": "compile.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue