commit 20140bdf4a1091d36dd845e42b6b01cdf2cfc2fb
parent 18862ca68960145ea43a6a646e1ad144bf0d9de9
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date: Fri, 11 Feb 2022 22:23:38 -0800
Officially move site content out of the repo.
Diffstat:
11 files changed, 14 insertions(+), 187 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -207,4 +207,5 @@ dist
# End of https://www.toptal.com/developers/gitignore/api/node
# Typescript output directory.
-bin/-
\ No newline at end of file
+bin/
+views/partials/content+
\ No newline at end of file
diff --git a/content/partials/figlet.handlebars b/content/partials/figlet.handlebars
@@ -1,15 +0,0 @@
-<pre id="main-page-title">
-
- ____ _
-| _ \ _ _ __ _ _ __ ( )___
-| |_) | | | |/ _` | '_ \|// __|
-| _ <| |_| | (_| | | | | \__ \
-|_| \_\\__, |\__,_|_| |_| |___/
- |___/
- _ _
-| | | | ___ _ __ ___ ___ _ __ __ _ __ _ ___
-| |_| |/ _ \| '_ ` _ \ / _ \ '_ \ / _` |/ _` |/ _ \
-| _ | (_) | | | | | | __/ |_) | (_| | (_| | __/
-|_| |_|\___/|_| |_| |_|\___| .__/ \__,_|\__, |\___|
- |_| |___/
-</pre>
diff --git a/content/partials/front.handlebars b/content/partials/front.handlebars
@@ -1,23 +0,0 @@
-<p>This site is a celebration of old computers and technology (or, what is old and
- nostalgic to me). Everything here is designed to look like a late 2000's
- or early 2010's Linux desktop since that was the last time you could still feel
- 90's era optimism about technology (or the future in general).
-<br>
-</p>
-
-<p>
- In current year it's impossible to feel anything but disgust and disappointment
- over the state of technology. Social media has enabled conformism in a way
- never before thought possible. Every electronic device is a government surveillance
- machine. Unix is <span class="underline">still</span> using X11. Perhaps
- the Vi guy was right <a href="https://www.wired.com/2000/04/joy-2/">to go full AnPrim</a>.
-</p>
-
-<p>
- But this site at www.ryanmj.xyz <span class="underline">is not</span> about that.
- Instead, this is a place to LARP and pretend it's still 2008.
-</p>
-
-<p>
- <a href="https://openlibrary.org/works/OL2286765W/Atomised?edition=atomised00houe">This website is dedicated to mankind.</a>
-</p>
diff --git a/content/partials/index.json b/content/partials/index.json
@@ -1,24 +0,0 @@
-{
- "wins" : [
- {
- "cmds" : [
- {
- "type" : "cat",
- "where" : "figlet.handlebars",
- "trim" : true
- },
- {
- "type" : "ls",
- "where" : "~",
- "what" : ["software.handlebars", "posts"],
- "display-path" : "~"
- },
- {
- "type" : "cat",
- "where" : "front",
- "trim" : true
- }
- ]
- }
- ]
-}
diff --git a/content/partials/posts/manjaro_sucks.handlebars b/content/partials/posts/manjaro_sucks.handlebars
@@ -1,36 +0,0 @@
-<h3>Manjaro Sucks (Linux these days...)</h3>
-
-<p>
-Created: Oct 31, 2021 Last Updated: Feb 7, 2022
-</p>
-
-<p>
- Friend of mine installed M*njaro Linux about a year ago and hasn't used it since.
- He called me for help when his system just failed to boot. Being a Linux user for
- many years I thought it would be pretty easy to diagnose and fix the issue, especially
- since my friend is a Linux noob and so would most likely have a stock, unconfigured install.
-</p>
-
-<p>
- To make this post brief I'll just say that debugging the system took hours because
- of various annoyances and bizzare idiosyncrasies. There was no boot output because the
- Linux kernel is called with "quiet" option. This one is baffling to me because there's
- no downside to seeing the kernel's boot messages but every distro turns them off by
- default these days. I guess they're afraid of scaring the normies.
-</p>
-
-<p>
- Also the Linux kernel and Nvidia drivers are managed seperately from other packages.
- This I'm pretty sure caused the problem in the first place. Something nvidia related
- got updated but the driver did not. This caused a black screen, but the system kept
- trying to restart X over and over, so not even switching to a different TTY worked.
- We were able to fix the problem by getting Linux to use the free noveau drivers via
- GRUB. From there, we were able to fix Manjaro's package issues.
-</p>
-
-<p>
- Manjaro's bizzare way of managing the kernel has casued me problems as well. Years ago,
- when trying manjaro for the first time, my system became unbootable because my kernel was
- updated but Linux-Firmware was not... very normie friendly!
-</p>
-
diff --git a/content/partials/software.handlebars b/content/partials/software.handlebars
diff --git a/src/main/rmjxyz/app.cljs b/src/main/rmjxyz/app.cljs
@@ -89,9 +89,7 @@
:lsList (ls-list dir ext paths)})
;; Cat.
([the-path trim-path] {:args (if trim-path (get-file-name the-path) the-path)
- :markup (if trim-path
- (get-file-name the-path)
- the-path)}))
+ :markup the-path}))
(defn create-ls
"Create a ls-listing from a pre-existing set of files."
@@ -134,11 +132,11 @@
(for [^js cmd (.-cmds win)]
(cond
(= (.-type cmd) "cat") (create-command (.-where cmd)
- (when (.-trim cmd) (.-trim cmd)))
- (= (.-type cmd) "ls") (create-command (. path dirname json-path)
+ (when (.-trim cmd) true))
+ (= (.-type cmd) "ls") (create-command (.dirname path json-path)
(if (.-ext cmd) (.-ext cmd) "")
(.-what cmd)
- (when (.-display-path cmd) (.-display-path cmd)))))))))))
+ (when (.-where cmd) (.-where cmd)))))))))))
(defn init-server
"Set the server's routes."
@@ -149,24 +147,24 @@
(.use server (.static express (.join path (.cwd process) "public")))
(.use server (.static express (.join path (.cwd process) "external")))
(.use server (.json express))
- (.engine server "handlebars" (engine (clj->js { :defaultLayout "main" })))
+ (.engine server "handlebars" (engine (clj->js {:defaultLayout "main"})))
(.set server "view engine" "handlebars")
- (.set server "views" "./views")
+ (.set server "views" (.join path (.cwd process) "views"))
;; Server paths.
(.get server "/posts/:post" (fn [^js req res next]
(let [post (.toLowerCase (.-post (.-params req)))]
(if (some #(= post (get % :basename)) (get @post-items :content))
(serve-200 "index" res (index-information
- (create-windows [[(create-command (.join path "posts" post) false)]])))
+ (create-windows [[(create-command (.join path "content/posts" post) false)]])))
(serve-404 post res)))))
(.get server "/posts" (fn [^js req res next]
(serve-200 "index" res (index-information @post-windows))))
(.get server "/:item" (fn [^js req res next]
(let [item (.toLowerCase (.-item (.-params req)))]
;; TODO fix file stat situation.
- (if (some #(= item (get % :basename)) (ls-list "./content/partials/" ".handlebars" ["software"]))
- (serve-200 "index" res (index-information (create-windows [[(create-command item false)]])))
+ (if (some #(= item (get % :basename)) (ls-list "./views/partials/content/" ".handlebars" ["software"]))
+ (serve-200 "index" res (index-information (create-windows [[(create-command (.join path "content/" item) true)]])))
(serve-404 item res)))))
(.get server "/" (fn [^js req res next]
(serve-200 "index" res (index-information @index-items))))
@@ -177,10 +175,10 @@
"Start the server."
[]
(reset! app (init-server))
- (reset! post-items {:when (js/Date.) :content (ls-dir "./content/partials/posts" ".handlebars")})
+ (reset! post-items {:when (js/Date.) :content (ls-dir "./views/partials/content/posts" ".handlebars")})
(reset! post-windows (create-windows [[(create-ls "posts" (get @post-items :content))]]))
;; TODO put these in a json object.
- (reset! index-items (json-create-windows "./content/partials/index.json"))
+ (reset! index-items (json-create-windows "./views/partials/content/index.json"))
(reset! all-bkg-scripts (let [files (.readdirSync fs "./external/site-bkgs/bin/")]
(for [file files
diff --git a/views/partials/figlet.handlebars b/views/partials/figlet.handlebars
@@ -1,15 +0,0 @@
-<pre id="main-page-title">
-
- ____ _
-| _ \ _ _ __ _ _ __ ( )___
-| |_) | | | |/ _` | '_ \|// __|
-| _ <| |_| | (_| | | | | \__ \
-|_| \_\\__, |\__,_|_| |_| |___/
- |___/
- _ _
-| | | | ___ _ __ ___ ___ _ __ __ _ __ _ ___
-| |_| |/ _ \| '_ ` _ \ / _ \ '_ \ / _` |/ _` |/ _ \
-| _ | (_) | | | | | | __/ |_) | (_| | (_| | __/
-|_| |_|\___/|_| |_| |_|\___| .__/ \__,_|\__, |\___|
- |_| |___/
-</pre>
diff --git a/views/partials/front.handlebars b/views/partials/front.handlebars
@@ -1,23 +0,0 @@
-<p>This site is a celebration of old computers and technology (or, what is old and
- nostalgic to me). Everything here is designed to look like a late 2000's
- or early 2010's Linux desktop since that was the last time you could still feel
- 90's era optimism about technology (or the future in general).
-<br>
-</p>
-
-<p>
- In current year it's impossible to feel anything but disgust and disappointment
- over the state of technology. Social media has enabled conformism in a way
- never before thought possible. Every electronic device is a government surveillance
- machine. Unix is <span class="underline">still</span> using X11. Perhaps
- the Vi guy was right <a href="https://www.wired.com/2000/04/joy-2/">to go full AnPrim</a>.
-</p>
-
-<p>
- But this site at www.ryanmj.xyz <span class="underline">is not</span> about that.
- Instead, this is a place to LARP and pretend it's still 2008.
-</p>
-
-<p>
- <a href="https://openlibrary.org/works/OL2286765W/Atomised?edition=atomised00houe">This website is dedicated to mankind.</a>
-</p>
diff --git a/views/partials/posts/manjaro_sucks.handlebars b/views/partials/posts/manjaro_sucks.handlebars
@@ -1,36 +0,0 @@
-<h3>Manjaro Sucks (Linux these days...)</h3>
-
-<p>
-Created: Oct 31, 2021 Last Updated: Feb 7, 2022
-</p>
-
-<p>
- Friend of mine installed M*njaro Linux about a year ago and hasn't used it since.
- He called me for help when his system just failed to boot. Being a Linux user for
- many years I thought it would be pretty easy to diagnose and fix the issue, especially
- since my friend is a Linux noob and so would most likely have a stock, unconfigured install.
-</p>
-
-<p>
- To make this post brief I'll just say that debugging the system took hours because
- of various annoyances and bizzare idiosyncrasies. There was no boot output because the
- Linux kernel is called with "quiet" option. This one is baffling to me because there's
- no downside to seeing the kernel's boot messages but every distro turns them off by
- default these days. I guess they're afraid of scaring the normies.
-</p>
-
-<p>
- Also the Linux kernel and Nvidia drivers are managed seperately from other packages.
- This I'm pretty sure caused the problem in the first place. Something nvidia related
- got updated but the driver did not. This caused a black screen, but the system kept
- trying to restart X over and over, so not even switching to a different TTY worked.
- We were able to fix the problem by getting Linux to use the free noveau drivers via
- GRUB. From there, we were able to fix Manjaro's package issues.
-</p>
-
-<p>
- Manjaro's bizzare way of managing the kernel has casued me problems as well. Years ago,
- when trying manjaro for the first time, my system became unbootable because my kernel was
- updated but Linux-Firmware was not... very normie friendly!
-</p>
-
diff --git a/views/partials/software.handlebars b/views/partials/software.handlebars