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:
yellows111 2024-04-16 22:50:07 +01:00
parent 748a536ae2
commit c10aa967d1
5 changed files with 82 additions and 72 deletions

View File

@ -31,6 +31,12 @@ Otherwise, if you just want to use `yiki` to render one file:
`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
I request (but not require) that you modify files without Carriage Returns,

View File

@ -40,8 +40,12 @@ function render(input, options) {
}
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
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());

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "yiki",
"version": "0.0.1",
"version": "0.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {

View File

@ -1,6 +1,6 @@
{
"name": "yiki",
"version": "0.0.1",
"version": "0.0.2",
"description": "The yellows111 wiki system",
"main": "compile.js",
"scripts": {

View File

@ -1,6 +1,6 @@
body {
font-family: sans-serif;
color: yellow;
color: #ccc;
background: black;
}
hr {