mirror of
https://github.com/youwen5/blog.git
synced 2024-11-24 18:03:50 -08:00
Compare commits
No commits in common. "b20e4a981d01e2962c8c8e775cfaf81308bf3b01" and "394718bcd4428feca1da19f094ac5a5d39ccc0ed" have entirely different histories.
b20e4a981d
...
394718bcd4
9 changed files with 40 additions and 49 deletions
|
@ -1,4 +1,4 @@
|
|||
# conditional finality - yet another developer blog
|
||||
# gradient ascent - yet another developer blog
|
||||
|
||||
This repository hosts the source code for my blog, written in Haskell and
|
||||
powered by [hakyll](https://jaspervdj.be/hakyll/) and
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "conditional finality";
|
||||
description = "gradient ascent";
|
||||
|
||||
nixConfig = {
|
||||
allow-import-from-derivation = "true";
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
@layer utilities {
|
||||
.external-link {
|
||||
@apply underline decoration-solid decoration-2 underline-offset-2 hover:text-love-light dark:hover:text-love-dark decoration-love-light decoration-love-dark;
|
||||
@apply dark:text-violet-500 text-indigo-600 hover:bg-indigo-200 pr-3 rounded-sm dark:hover:bg-violet-950 transition-colors duration-300 relative;
|
||||
}
|
||||
.external-link-muted {
|
||||
@apply underline decoration-solid decoration-2 underline-offset-2 hover:text-love-light dark:hover:text-love-dark decoration-accent-light decoration-accent-dark;
|
||||
.external-link::after {
|
||||
@apply absolute top-1 right-[6px] w-2 h-2 border-2 border-indigo-600 dark:border-violet-600 rounded-full translate-x-1/2 -translate-y-1/2;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.small-caps {
|
||||
font-variant: all-small-caps;
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 43 KiB |
BIN
src/images/gradient-ascent.jpg
Normal file
BIN
src/images/gradient-ascent.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
|
@ -2,21 +2,25 @@
|
|||
author: "Youwen Wu"
|
||||
authorTwitter: "@youwen"
|
||||
desc: "a purely functional...blog?"
|
||||
image: "./images/conditional-finality.png"
|
||||
image: "./images/gradient-ascent.jpg"
|
||||
keywords: "haskell, blog, functional programming"
|
||||
lang: "en"
|
||||
title: "a haskellian blog"
|
||||
title: "why I made my blog in haskell"
|
||||
updated: "2024-05-25T12:00:00Z"
|
||||
---
|
||||
|
||||
Welcome! This is the first post on _conditional finality_ and also one that tests all
|
||||
Welcome! This is the first post on _gradient ascent_ and also one that tests all
|
||||
of the features.
|
||||
|
||||
<img
|
||||
alt="conditional finality"
|
||||
src="./images/conditional-finality.png"
|
||||
alt="gradient ascent"
|
||||
src="./images/gradient-ascent.jpg"
|
||||
style="height: 200px; width: 100%; object-fit: cover"
|
||||
/>
|
||||
|
||||
I'll be writing about computers, code, math, video games, and whatever else
|
||||
here.
|
||||
|
||||
> A monad is just a monoid in the category of endofunctors, what's the problem?
|
||||
|
||||
## haskell?
|
||||
|
@ -55,6 +59,11 @@ The code highlighting is also generated by hakyll.
|
|||
Haskell is a purely functional language with no mutable state. Its syntax
|
||||
actually makes it pretty elegant for declaring routes and "rendering" pipelines.
|
||||
|
||||
I originally wanted to build this entire blog myself. I had a working version
|
||||
with the Svelte framework, complete with GFM rendering, table of contents, KaTeX
|
||||
math, code highlighting, static generation, and other goodies. However, it
|
||||
seemed like a little too much work to maintain. I switched to hakyll because
|
||||
|
||||
1. Haskell is cool.
|
||||
2. It comes with enough features that I don't feel like I have to build
|
||||
everything from scratch.
|
||||
|
@ -68,7 +77,7 @@ actually makes it pretty elegant for declaring routes and "rendering" pipelines.
|
|||
### speaking of math
|
||||
|
||||
We can have math inline, like so:
|
||||
$\int_{-\infty}^\infty \, e^{-x^2}\,dx = \sqrt{\pi}$. This site ships semantic
|
||||
$\int_\infty^\infty \, e^{-x^2}\,dx = \sqrt{\pi}$. This site ships semantic
|
||||
MathML math with its HTML, and the MathJax script to the client.
|
||||
|
||||
It'd be nice if MathML could just be used and supported across all browsers, but
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!doctype html>
|
||||
<html lang="$lang$">
|
||||
<head>
|
||||
<title>$title$ | conditional finality</title>
|
||||
<title>$title$ | gradient ascent</title>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
@ -116,7 +116,7 @@
|
|||
<a
|
||||
href="/"
|
||||
class="dark:hover:text-muted-dark hover:text-muted-light transition-all duration-500 text-nowrap tracking-wide"
|
||||
><em>Conditional Finality.</em></a
|
||||
><em>Gradient Ascent.</em></a
|
||||
>
|
||||
</h1>
|
||||
<div
|
||||
|
@ -126,18 +126,18 @@
|
|||
<p class="mt-8 mb-3 px-1 italic font-light">
|
||||
a web-log about computers, math, hacks, and all the rest.
|
||||
</p>
|
||||
<a class="text-sm text-iris-light dark:text-iris-dark hover:text-love-light dark:hover:text-love-dark" href="https://youwen.dev"
|
||||
<a class="text-sm external-link" href="https://youwen.dev"
|
||||
><em>by </em>Youwen Wu</a
|
||||
>
|
||||
<span class="ml-2 font-serif">|</span>
|
||||
<button
|
||||
id="theme-toggle"
|
||||
class="ml-2 text-sm hover:text-accent-light dark:hover:text-muted-dark"
|
||||
class="ml-2 text-sm hover:bg-indigo-200 dark:hover:bg-violet-950 rounded-sm transition-colors p-1 duration-500"
|
||||
></button>
|
||||
<span class="ml-2 font-serif">|</span>
|
||||
<button
|
||||
id="font-toggle"
|
||||
class="ml-2 text-sm hover:text-accent-light dark:hover:text-muted-dark"
|
||||
class="ml-2 text-sm hover:bg-indigo-200 dark:hover:bg-violet-950 rounded-sm transition-colors p-1 duration-500"
|
||||
></button>
|
||||
</header>
|
||||
$body$
|
||||
|
@ -149,14 +149,14 @@
|
|||
© 2024 Youwen Wu. Generated by
|
||||
<a
|
||||
href="https://jaspervdj.be/hakyll/"
|
||||
class="external-link-muted"
|
||||
class="external-link"
|
||||
target="__blank"
|
||||
>Hakyll.</a
|
||||
>
|
||||
View the source
|
||||
<a
|
||||
href="https://github.com/couscousdude/blog"
|
||||
class="external-link-muted"
|
||||
class="external-link"
|
||||
target="__blank"
|
||||
>on GitHub.</a
|
||||
>
|
||||
|
@ -164,7 +164,7 @@
|
|||
<p class="text-sm leading-relaxed mt-2">
|
||||
Content freely available under
|
||||
<a
|
||||
class="external-link-muted"
|
||||
class="external-link"
|
||||
target="__blank"
|
||||
href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en"
|
||||
><span class="smallcaps">CC BY-NC-SA</span> 4.0</a
|
||||
|
|
|
@ -28,13 +28,13 @@ import Text.Pandoc.Options (
|
|||
-- PERSONALIZATION
|
||||
|
||||
mySiteName :: String
|
||||
mySiteName = "conditional finality"
|
||||
mySiteName = "gradient ascent"
|
||||
|
||||
mySiteRoot :: String
|
||||
mySiteRoot = "https://blog.youwen.dev"
|
||||
|
||||
myFeedTitle :: String
|
||||
myFeedTitle = "conditional finality"
|
||||
myFeedTitle = "gradient ascent"
|
||||
|
||||
myFeedDescription :: String
|
||||
myFeedDescription = "on computers, hacks, math, and life"
|
||||
|
|
|
@ -10,42 +10,24 @@ module.exports = {
|
|||
},
|
||||
colors: {
|
||||
primary: {
|
||||
//dark: "#e7e5e4",
|
||||
dark: "#e7e5e4",
|
||||
light: "#44403c",
|
||||
dark: "#e0def4",
|
||||
//light: "#575279",
|
||||
},
|
||||
secondary: {
|
||||
//dark: "#4c1d95",
|
||||
//light: "#4338ca",
|
||||
dark: "#1f1d2e",
|
||||
light: "#fffaf3",
|
||||
dark: "#4c1d95",
|
||||
light: "#4338ca",
|
||||
},
|
||||
accent: {
|
||||
//dark: "#9ca3af",
|
||||
//light: "#78716c",
|
||||
dark: "#908caa",
|
||||
light: "#797593",
|
||||
dark: "#9ca3af",
|
||||
light: "#78716c",
|
||||
},
|
||||
muted: {
|
||||
//dark: "#6b7280",
|
||||
//light: "#a8a29e",
|
||||
dark: "#6e6a86",
|
||||
light: "#9893a5",
|
||||
dark: "#6b7280",
|
||||
light: "#a8a29e",
|
||||
},
|
||||
background: {
|
||||
//light: "#d6d3d1",
|
||||
//dark: "#101017",
|
||||
dark: "#191724",
|
||||
light: "#faf4ed",
|
||||
},
|
||||
iris: {
|
||||
dark: "#c4a7e7",
|
||||
light: "#907aa9",
|
||||
},
|
||||
love: {
|
||||
dark: "#eb6f92",
|
||||
light: "#b4637a",
|
||||
light: "#d6d3d1",
|
||||
dark: "#101017",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue