Browse Source

rebuilt from the ground

master
nukashimika 2 years ago
parent
commit
83c1bb672f
  1. 2
      .gitignore
  2. 5
      Makefile
  3. 5
      server.lisp
  4. 23
      src/index.lisp
  5. 2
      src/index.md
  6. 13
      src/template.html

2
.gitignore vendored

@ -1,2 +1,2 @@
src/*.html src/index.html
src/*.css src/*.css

5
Makefile

@ -1,8 +1,5 @@
LISP ?= sbcl
default: default:
$(LISP) --load src/index.lisp \ pandoc --standalone --metadata title="nuka.works" --template src/template.html src/index.md -o src/index.html
--eval '(write-html-to-file)'
.PHONY: default .PHONY: default

5
server.lisp

@ -1,5 +0,0 @@
(ql:quickload "hunchentoot")
(defvar *acceptor* (make-instance 'hunchentoot:easy-acceptor :port 4242))
(hunchentoot:start *acceptor*)

23
src/index.lisp

@ -1,23 +0,0 @@
(ql:quickload "spinneret")
(ql:quickload "lass")
(defun generate-html ()
(spinneret:with-html-string
(:html
(:head
(:link :rel "stylesheet" :href "style.css")
(:body
(:div :class "body"
(:h1 "welcome")
(:p "hello, im cath and i exist")))))))
(defun write-html-to-file ()
(with-open-file (output "index.html"
:direction :output
:if-exists :overwrite
:if-does-not-exist :create)
(format output (generate-html))))

2
src/index.md

@ -0,0 +1,2 @@
# test
ooo sample text i have burned this damn project and remade it ooo

13
src/template.html

@ -0,0 +1,13 @@
<!-- "Borrowed from": https://www.arthurkoziel.com/convert-md-to-html-pandoc/" -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="date" content='$date-meta$'>
<title>$title$</title>
</head>
<body>
<p>Date: $date$</p>
$body$
</body>
</html>
Loading…
Cancel
Save