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": {
|
||||||
|
|
138
yiki.css
138
yiki.css
|
@ -1,69 +1,69 @@
|
||||||
body {
|
body {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
color: yellow;
|
color: #ccc;
|
||||||
background: black;
|
background: black;
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
border: solid 2px yellow;
|
border: solid 2px yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
a:visited {
|
a:visited {
|
||||||
text-decoration: underline magenta;
|
text-decoration: underline magenta;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline lime;
|
text-decoration: underline lime;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline aqua;
|
text-decoration: underline aqua;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-anchor {
|
.header-anchor {
|
||||||
color: gray;
|
color: gray;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
a.header-anchor:hover {
|
a.header-anchor:hover {
|
||||||
color: lightgray;
|
color: lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
@media (prefers-color-scheme: light) {
|
||||||
body {
|
body {
|
||||||
color: black;
|
color: black;
|
||||||
background: lightyellow;
|
background: lightyellow;
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
border-color: black;
|
border-color: black;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
color: black
|
color: black
|
||||||
}
|
}
|
||||||
a:visited {
|
a:visited {
|
||||||
text-decoration: underline purple;
|
text-decoration: underline purple;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline green;
|
text-decoration: underline green;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline teal;
|
text-decoration: underline teal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media only print {
|
@media only print {
|
||||||
body {
|
body {
|
||||||
color: black;
|
color: black;
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
border-color: black;
|
border-color: black;
|
||||||
}
|
}
|
||||||
a, a:visited {
|
a, a:visited {
|
||||||
color: black;
|
color: black;
|
||||||
text-decoration: underline black;
|
text-decoration: underline black;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue