add view-source link to posts
All checks were successful
ci/woodpecker/push/build-and-deploy Pipeline was successful

This commit is contained in:
sorrel 2024-01-21 20:32:54 -05:00
parent f44b4f36fa
commit 7a0172ae64
11 changed files with 26 additions and 15 deletions

View file

@ -3,7 +3,6 @@
- fix footer styling (tagged section is cramped with flex-row - fix footer styling (tagged section is cramped with flex-row
especially on mobile) especially on mobile)
- pick a license - pick a license
START HERE:
- add view source link to every page (git forge of source/resource - add view source link to every page (git forge of source/resource
not static/resource; we're here for the sexprs) not static/resource; we're here for the sexprs)
TODO: TODO:

View file

@ -9,7 +9,7 @@
(only-in csv-reading csv->list) (only-in csv-reading csv->list)
(only-in xml read-xml) (only-in xml read-xml)
(only-in "./utils.rkt" list->csv resource-link atom-table-entry add-atom-entry (only-in "./utils.rkt" list->csv resource-link atom-table-entry add-atom-entry
make-feed archive-file)) make-feed archive-file git-forge source-url))
(define-namespace-anchor anc) (define-namespace-anchor anc)
(define ns (namespace-anchor->namespace anc)) (define ns (namespace-anchor->namespace anc))
@ -247,12 +247,12 @@
;; resource-replacement ;; resource-replacement
;; -------------------- ;; --------------------
;; replace resource in source/<type>/id ;; replace resource in source/<type>/id
(define (append-post-footer post-xexpr tag-list history-list) (define (append-post-footer post-xexpr source-url tag-list history-list)
(let ([post-footer (let ([post-footer
(read (open-input-file "source/post-footer.scm"))]) (read (open-input-file "source/post-footer.scm"))])
`(body `(body
,post-xexpr ,post-xexpr
,((eval post-footer ns) tag-list history-list)))) ,((eval post-footer ns) source-url tag-list history-list))))
;; returns lambda that takes res-table to be passed into replace-resource ;; returns lambda that takes res-table to be passed into replace-resource
@ -264,7 +264,7 @@
(findf (lambda (row) (equal? (first row) id)) (findf (lambda (row) (equal? (first row) id))
res-table) res-table)
3)]) 3)])
(append-post-footer new-content-sans-footer tag-list history-list))))) (append-post-footer new-content-sans-footer (source-url r-type id) tag-list history-list)))))
;; replace-resource compose chain expression ;; replace-resource compose chain expression

View file

@ -5,7 +5,7 @@
(only-in racket/format ~a) (only-in racket/format ~a)
(only-in racket/list append* first second third fourth fifth rest flatten add-between take) (only-in racket/list append* first second third fourth fifth rest flatten add-between take)
(only-in xml xexpr->string) (only-in xml xexpr->string)
(only-in "./utils.rkt" homepage list->csv add-atom-entry atom-table-entry make-feed archive-file) (only-in "./utils.rkt" homepage git-forge source-url list->csv add-atom-entry atom-table-entry make-feed archive-file)
csv-reading) csv-reading)
(define-namespace-anchor anc) (define-namespace-anchor anc)
@ -73,12 +73,12 @@
(let ([l (eval (read (open-input-file "tag-lookup.rkt")))]) (let ([l (eval (read (open-input-file "tag-lookup.rkt")))])
(print l))) (print l)))
(define (append-post-footer post-xexpr tag-list history-list) (define (append-post-footer post-xexpr s-url tag-list history-list)
(let ([post-footer (let ([post-footer
(read (open-input-file "source/post-footer.scm"))]) (read (open-input-file "source/post-footer.scm"))])
`(body `(body
,post-xexpr ,post-xexpr
,((eval post-footer ns) tag-list history-list)))) ,((eval post-footer ns) s-url tag-list history-list))))
(define (make-output-file-handle x-test r-type #:headline [l-headline ""] #:res-id [r-id 0]) (define (make-output-file-handle x-test r-type #:headline [l-headline ""] #:res-id [r-id 0])
(define (make-root-file-handle x l) (define (make-root-file-handle x l)
@ -240,6 +240,7 @@
(define resource (append-post-footer (read (open-input-file i)) (define resource (append-post-footer (read (open-input-file i))
(source-url r res-id)
t t
(list publish-time))) (list publish-time)))

View file

@ -1 +1 @@
'(body (section (h2 "a λ.functional λ.gay") (p "i'm a gay lil nerd who's learning everyday about community, and ecology,\n and computer; and trying hard to be good for the world with my gay lil\n friends") (p "i was named after " (a ((href "https://plants.usda.gov/home/plantProfile?symbol=OXOR")) "a plant called sorrel") " and i live in the mountains of southern appalachia on " (span ((lang "chr")) "ᏣᎳᎩ") " (tsalagi/cherokee) land. i live with some cats and a whole mess of plants\n (most of them food) and a cordswain and i have sweet neighbors") (p "i have never identified with the term 'hacker' but i have learned, in the\n past few years, that i do like to orchestrate computer machines and i do\n that with some cute friends at " (a ((href "https://bunk.computer")) "bunk computer club")) (p "some random things i believe/ i like/ i am/etc (in no particular order") (ul (li (p "i like linguistics a whole lot. " (span ((class "hx-target")) (a ((href "/tagged/conlang") (hx-get "/hx/tagged/conlang") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "i make languages (the human kind) for fun.")) " there's a whole bunch of people who do this! " (a ((href "https://conlang.org/")) "the language creation society") " i'm even working on a " (span ((class "hx-target")) (a ((href "/tagged/latl") (hx-get "/hx/tagged/latl") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "language (computer) to make languages (human)")))) (li (p "mmt, but make it anarchist " (small "and get rid of all that \"sovereignty\" stuff, ew"))) (li (p "got a spicy brained, trans lady-fied experience. \n i have feelings about these things that inevitably weave thru\n my projects and art and all that")) (li (p "i used to make a lot more visual art than i do these days. some\n sort of smth'll wind up here at some point")))) (footer (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T21:56:45")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license"))))) '(body (section (h2 "a λ.functional λ.gay") (p "i'm a gay lil nerd who's learning everyday about community, and ecology,\n and computer; and trying hard to be good for the world with my gay lil\n friends") (p "i was named after " (a ((href "https://plants.usda.gov/home/plantProfile?symbol=OXOR")) "a plant called sorrel") " and i live in the mountains of southern appalachia on " (span ((lang "chr")) "ᏣᎳᎩ") " (tsalagi/cherokee) land. i live with some cats and a whole mess of plants\n (most of them food) and a cordswain and i have sweet neighbors") (p "i have never identified with the term 'hacker' but i have learned, in the\n past few years, that i do like to orchestrate computer machines and i do\n that with some cute friends at " (a ((href "https://bunk.computer")) "bunk computer club")) (p "some random things i believe/ i like/ i am/etc (in no particular order") (ul (li (p "i like linguistics a whole lot. " (span ((class "hx-target")) (a ((href "/tagged/conlang") (hx-get "/hx/tagged/conlang") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "i make languages (the human kind) for fun.")) " there's a whole bunch of people who do this! " (a ((href "https://conlang.org/")) "the language creation society") " i'm even working on a " (span ((class "hx-target")) (a ((href "/tagged/latl") (hx-get "/hx/tagged/latl") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "language (computer) to make languages (human)")))) (li (p "mmt, but make it anarchist " (small "and get rid of all that \"sovereignty\" stuff, ew"))) (li (p "got a spicy brained, trans lady-fied experience. \n i have feelings about these things that inevitably weave thru\n my projects and art and all that")) (li (p "i used to make a lot more visual art than i do these days. some\n sort of smth'll wind up here at some point")))) (footer (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/source/about.scm")) "view source") (hr) (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T21:56:45")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license")))))

View file

@ -1 +1 @@
'(body (section (h2 "contact") (p (code "email [at] [this domain]") " to send me a good ol' fashioned email") (p "i have avoided 'online' for a long time, but i'm getting hip to it. i'm\n on the mastodon.social server @oxaliq")) (footer (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:21:26")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license"))))) '(body (section (h2 "contact") (p (code "email [at] [this domain]") " to send me a good ol' fashioned email") (p "i have avoided 'online' for a long time, but i'm getting hip to it. i'm\n on the mastodon.social server @oxaliq")) (footer (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/source/contact.scm")) "view source") (hr) (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:21:26")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license")))))

View file

@ -1 +1 @@
'(body (section (hgroup (h2 "now") (p "a snapshot of the (mostly) non-computer things of import")) (section (hgroup (h3 "read") (p "stuff i'm taking in")) (ul (li "the paying guests, sarah waters") (li "females, andrea long chu") (li "palo alto, malcolm harris") (li "desolation's flower, ragana") (li "his happiness shall come first even though we are suffering, backxwash") (li "salesforce, lauren bousfield") (li "el mal querer, rosalía") (li "land and freedom, alex knight") (li "guacamelee, drinkbox"))) (section (hgroup (h3 "eval") (p "stuff i'm crunching on")) (ul (li "winter garden chores") (li "winter sweets cooking and eating") (li "starting a community maker space") (li "going on more hikes") (li "body stuff"))) (section (hgroup (h3 "print") (p "stuff i'm putting out")) (ul (li "some basic sewing stuff") (li "relearning how to draw"))) (section (hgroup (h3 "loop") (p "stuff what's on the horizon")) (ul (li "being in the northeastern us") (li "putting my labor on the market") (li "maybe making some music again?")))) (footer (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:22:03")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license"))))) '(body (section (hgroup (h2 "now") (p "a snapshot of the (mostly) non-computer things of import")) (section (hgroup (h3 "read") (p "stuff i'm taking in")) (ul (li "the paying guests, sarah waters") (li "females, andrea long chu") (li "palo alto, malcolm harris") (li "desolation's flower, ragana") (li "his happiness shall come first even though we are suffering, backxwash") (li "salesforce, lauren bousfield") (li "el mal querer, rosalía") (li "land and freedom, alex knight") (li "guacamelee, drinkbox"))) (section (hgroup (h3 "eval") (p "stuff i'm crunching on")) (ul (li "winter garden chores") (li "winter sweets cooking and eating") (li "starting a community maker space") (li "going on more hikes") (li "body stuff"))) (section (hgroup (h3 "print") (p "stuff i'm putting out")) (ul (li "some basic sewing stuff") (li "relearning how to draw"))) (section (hgroup (h3 "loop") (p "stuff what's on the horizon")) (ul (li "being in the northeastern us") (li "putting my labor on the market") (li "maybe making some music again?")))) (footer (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/source/now.scm")) "view source") (hr) (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:22:03")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license")))))

View file

@ -1,6 +1,9 @@
(lambda (tag-list history-list) (lambda (source-url tag-list history-list)
(let ([class-sec `(ul ((class "tag-list")))]) (let ([class-sec `(ul ((class "tag-list")))])
`(footer `(footer
(a ((href ,source-url))
"view source")
(hr)
(section (section
(h5 "tagged") (h5 "tagged")
,(begin ,(begin

View file

@ -1 +1 @@
'(body (section (hgroup (h2 "how this site") (p "some kind of colophon")) (p "all of the code for the website is hosted and deployed from tree, " (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net")) "bunk computer club's git forge") "i do almost everything in the main branch, cause it's just me and that way\n i can add links below to the in-progress stuff real easy") (p "first, this website doesn't do anything to know who you are or anything.\n this website is a ~20MB binary and some static resources. it is built\n primarily with " (a ((href "https://docs.racket-lang.org/web-server/")) "racket web-server")) (p "this website serves ~46kB of javascript in the form of " (a ((href "https://htmx.org/")) "the htmx library (minified.)") " i don't love serving minified code. forking the library and removing\n features that are of no use to me is on the agenda for 2024") (p "everything here is hosted on turtle, " (a ((href "https://wiki.bunk.computer/hypha/servers")) "bunk computer club's shared application server")) (p "there's some racket scripts i use for tooling that were made with " (a ((href "https://docs.racket-lang.org/cli/")) "#lang cli")) (p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/.dev-log")) "you can read about development here")) (p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/.idea-log")) "you can read about my vague plans here")) (p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/in-progress")) "or read works in progress here")) (p "the image in the header is a crop of the work " (em "'Oxalis acetosella', Otto Wilhelm Thomé (1885)") " run through a generation tool on " (a ((href "https://www.asciiart.eu/")) "this art archive"))) (footer (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:19:43")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license"))))) '(body (section (hgroup (h2 "how this site") (p "some kind of colophon")) (p "all of the code for the website is hosted and deployed from tree, " (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net")) "bunk computer club's git forge") "i do almost everything in the main branch, cause it's just me and that way\n i can add links below to the in-progress stuff real easy") (p "first, this website doesn't do anything to know who you are or anything.\n this website is a ~20MB binary and some static resources. it is built\n primarily with " (a ((href "https://docs.racket-lang.org/web-server/")) "racket web-server")) (p "this website serves ~46kB of javascript in the form of " (a ((href "https://htmx.org/")) "the htmx library (minified.)") " i don't love serving minified code. forking the library and removing\n features that are of no use to me is on the agenda for 2024") (p "everything here is hosted on turtle, " (a ((href "https://wiki.bunk.computer/hypha/servers")) "bunk computer club's shared application server")) (p "there's some racket scripts i use for tooling that were made with " (a ((href "https://docs.racket-lang.org/cli/")) "#lang cli")) (p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/.dev-log")) "you can read about development here")) (p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/.idea-log")) "you can read about my vague plans here")) (p (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/in-progress")) "or read works in progress here")) (p "the image in the header is a crop of the work " (em "'Oxalis acetosella', Otto Wilhelm Thomé (1885)") " run through a generation tool on " (a ((href "https://www.asciiart.eu/")) "this art archive"))) (footer (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/source/this.scm")) "view source") (hr) (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:19:43")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license")))))

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
'(body (section (h2 "a very earnest disclaimer") (p "i like to talk about computation with ppl! but it is important for me that\n you know: i am new to all this! i did not think computers or software were\n ^for me^ and then i had to get good at spreadsheets at my first email-factory\n job and then i got curious about webdev and now i have reached terminal\n velocity down a very λ.particular.rabbit[hole]") (p "i think computation is both fascinating on its own terms and as a substrate\n for pro-social infrastructure. i am motivated to work on projects that\n engage with this possiblity") (p "i'm not very good at many things. i don't even have a math education or a\n degree in anything. have you ever met someone who *is* good at _all_ ^this^\n ~stuff~ ???") (p "i like thinking in public, but please be patient! with me and with\n everyone else you talk about things you care about with") (p "let's hold our strong opinions loosely!") (p "and first assume good faith from each other!") (br) (br) (p ((class "ascii but-normal-size")) " ⃔‥̺⃝⃕") (br)) (footer (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:20:50")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license"))))) '(body (section (h2 "a very earnest disclaimer") (p "i like to talk about computation with ppl! but it is important for me that\n you know: i am new to all this! i did not think computers or software were\n ^for me^ and then i had to get good at spreadsheets at my first email-factory\n job and then i got curious about webdev and now i have reached terminal\n velocity down a very λ.particular.rabbit[hole]") (p "i think computation is both fascinating on its own terms and as a substrate\n for pro-social infrastructure. i am motivated to work on projects that\n engage with this possiblity") (p "i'm not very good at many things. i don't even have a math education or a\n degree in anything. have you ever met someone who *is* good at _all_ ^this^\n ~stuff~ ???") (p "i like thinking in public, but please be patient! with me and with\n everyone else you talk about things you care about with") (p "let's hold our strong opinions loosely!") (p "and first assume good faith from each other!") (br) (br) (p ((class "ascii but-normal-size")) " ⃔‥̺⃝⃕") (br)) (footer (a ((href "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/source/very-earnest-disclaimer.scm")) "view source") (hr) (section (h5 "tagged") (ul ((class "tag-list")) (li ((class "tag-item")) (span ((class "hx-target")) (a ((href "/tagged/about") (hx-get "/hx/tagged/about") (hx-target "closest span.hx-target") (hx-swap "innerHTML")) "about"))))) (hr) (p ((class "doc-history")) (small "published: 2024-01-18T22:20:50")) (p ((class "license-info")) (small (a ((href "static/license/license.txt")) "license")))))

View file

@ -6,6 +6,14 @@
(define homepage "https://oxaliq.net") (define homepage "https://oxaliq.net")
(define git-forge "https://git.bunk.computer/oxaliq/oxaliq.net/src/branch/main/")
(define (source-url resource-type resource-id)
(~a git-forge
(if (equal? resource-type "root")
"source/"
(~a "source/" resource-type))
resource-id ".scm"))
;; takes a parsed table as a list of lists and formats for writing as a .csv file ;; takes a parsed table as a list of lists and formats for writing as a .csv file
(define (list->csv l) (define (list->csv l)