diff options
Diffstat (limited to 'hipis/packages/source')
| -rw-r--r-- | hipis/packages/source/hwp/hwp-build | 8 | ||||
| -rw-r--r-- | hipis/packages/source/hwp/hwp.scm | 13 | ||||
| -rw-r--r-- | hipis/packages/source/hwp/hwp/site.scm | 32 | ||||
| -rw-r--r-- | hipis/packages/source/hwp/hwp/ui.scm | 17 |
4 files changed, 70 insertions, 0 deletions
diff --git a/hipis/packages/source/hwp/hwp-build b/hipis/packages/source/hwp/hwp-build new file mode 100644 index 0000000..cf1e97e --- /dev/null +++ b/hipis/packages/source/hwp/hwp-build | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #!/usr/bin/guile --no-auto-compile | ||
| 2 | -*- scheme -*- | ||
| 3 | !# | ||
| 4 | |||
| 5 | (use-modules (hwp)) | ||
| 6 | |||
| 7 | (hwp-run (command-line)) | ||
| 8 | |||
diff --git a/hipis/packages/source/hwp/hwp.scm b/hipis/packages/source/hwp/hwp.scm new file mode 100644 index 0000000..6770b5b --- /dev/null +++ b/hipis/packages/source/hwp/hwp.scm | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | (define-module (hwp) | ||
| 2 | #:use-module (hwp site) | ||
| 3 | #:use-module (hwp ui) | ||
| 4 | #:use-module (ice-9 match) | ||
| 5 | #:export (hwp-run)) | ||
| 6 | |||
| 7 | (define (hwp-run args) | ||
| 8 | (match args | ||
| 9 | ((cmd) | ||
| 10 | (display "To create site: hwp-build [input-path] [output-path]") | ||
| 11 | (newline)) | ||
| 12 | ((cmd in out) | ||
| 13 | (hipis-site in out)))) | ||
diff --git a/hipis/packages/source/hwp/hwp/site.scm b/hipis/packages/source/hwp/hwp/site.scm new file mode 100644 index 0000000..7fdb2f0 --- /dev/null +++ b/hipis/packages/source/hwp/hwp/site.scm | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | (define-module (hwp site) | ||
| 2 | #:use-module (haunt asset) | ||
| 3 | #:use-module (haunt builder blog) | ||
| 4 | #:use-module (haunt builder atom) | ||
| 5 | #:use-module (haunt builder assets) | ||
| 6 | #:use-module (haunt reader commonmark) | ||
| 7 | #:use-module (haunt site) | ||
| 8 | |||
| 9 | #:use-module (ice-9 match) | ||
| 10 | |||
| 11 | #:export (hipis-site)) | ||
| 12 | |||
| 13 | |||
| 14 | (define (hipis-site site-directory build-directory) | ||
| 15 | (build-site | ||
| 16 | (site #:title "Built with Guile" | ||
| 17 | #:domain "jdlugosz.com" | ||
| 18 | #:default-metadata | ||
| 19 | '((author . "Jakub Długosz") | ||
| 20 | (email . "jdlugosz963@gmail.com")) | ||
| 21 | #:readers (list commonmark-reader) | ||
| 22 | #:builders (list (blog) | ||
| 23 | (atom-feed) | ||
| 24 | (atom-feeds-by-tag) | ||
| 25 | (static-directory (string-append site-directory | ||
| 26 | "/assets/images") | ||
| 27 | "/assets/images")) | ||
| 28 | #:build-directory build-directory | ||
| 29 | #:posts-directory (string-append site-directory | ||
| 30 | "/posts")))) | ||
| 31 | |||
| 32 | |||
diff --git a/hipis/packages/source/hwp/hwp/ui.scm b/hipis/packages/source/hwp/hwp/ui.scm new file mode 100644 index 0000000..ec11a31 --- /dev/null +++ b/hipis/packages/source/hwp/hwp/ui.scm | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | (define-module (hwp ui) | ||
| 2 | #:use-module (srfi srfi-9)) | ||
| 3 | |||
| 4 | (define-record-type <theme-configuration> | ||
| 5 | (make-theme-configuration primary-color | ||
| 6 | secondary-color) | ||
| 7 | theme-configuration? | ||
| 8 | (primary-color theme-configuration-primary-color) | ||
| 9 | (secondary-color theme-configuration-secondary-color)) | ||
| 10 | |||
| 11 | |||
| 12 | (define* (theme-configuration #:key | ||
| 13 | (primary-color "#000") | ||
| 14 | (secondary-color "#111")) | ||
| 15 | (make-theme-configuration primary-color | ||
| 16 | secondary-color)) | ||
| 17 | |||
