clone url: git://git.m455.casa/m455.casa
posts/yet-another-website-generator.txt
1 | title: yet another website generator! |
2 |
|
3 | 2023-02-01 00:18 |
4 |
|
5 | woa, it's late as fuck. didn't realize the time. anyway, i've been working on |
6 | another website generator because my [https://git.m455.casa/lol|lol] project |
7 | felt too... "for general use". i admit this thought was triggered after chatting |
8 | with some friends on tilde.town about how they refound that spark of joy you get |
9 | when you first start programming by programming for personal use, rather than |
10 | for a large, general user base. |
11 |
|
12 | i think what makes it fun, for me, is that i don't focus so much on nice code. |
13 | i'm just hyper focused on having fun programming, and making things do stuff. i |
14 | think i started getting into writing for a general audience because i probably |
15 | subconsciously cared about what other people thought of my code, but now i'd |
16 | rather focus on fun, rather than face, since this is a hobby i do that makes me |
17 | happy afterall. programming for fun, and not for face, kind of feels more like |
18 | painting, rather than sitting down at a table and writing an entire blueprint |
19 | for a wood working project or something. i don't do wood work, but it felt like |
20 | a decent analogy? haha. |
21 |
|
22 | some bonuses that arose out of this project also came up: |
23 |
|
24 | - my rss feed now provides the content from my blog |
25 | - the links in my rss feed get converted from `/some/link` to |
26 | `https://m455.casa/some/link`, so rss feed readers don't try to open the local |
27 | link. i'm sure most readers know how to convert the links, but it was a fun |
28 | regex exercise. you can view the `relative-links->urls` function that does |
29 | that |
30 | [https://git.m455.casa/m455.casa/html/src/generate-rss-feed.scm.html#9|here]. |
31 | - this is probably the biggest one, and i definitely want to do a write-up of |
32 | how it works, but i now use both my own very unthought out markup language, |
33 | and a parser that takes the markup language and converts it into html! |
34 |
|
35 | regarding the markup language as being unthought out, i guess it was more of a |
36 | "how can i make a markup language as easy to parse as possible" haha. an aspect |
37 | of this can be found in how i parse the syntax for links. originally, i wanted |
38 | the link syntax to be `[link title here|link url here]`, but since i'm doing a |
39 | line-by-line and then character-by-character parsing approach, i had to keep the |
40 | order of the link title and link url in the same order that they occur in html, |
41 | which is link url first, and then link title later lmao. |
42 |
|
43 | this is also why my ordered and unordered lists need to keep each list element |
44 | on one line, because i'm not in the mood to implement multi-line list elements |
45 | lol. it results in really long lines in the middle of |
46 | [https://git.m455.casa/m455.casa/html/posts/yet-another-website-generator.txt.html#25|a nicely formatted 80 character-width text file], |
47 | but whatever lol. hmmm after typing that last sentence, and adding that last |
48 | link, i guess the same goes for links too, you can't split them across multiple |
49 | lines, which result in random fingers of text jolting out from the nicely |
50 | formatted text `:big_shrug:`. (*update*: |
51 | [https://git.m455.casa/m455.casa/html/posts/yet-another-website-generator.txt.html#51|now it's just links that need to be on one line], |
52 | haha!) |
53 |
|
54 | i've also decided to only use included modules in chicken scheme, instead of |
55 | external ones for fun... uh. i guess i do include the utf8 egg, but whatever, |
56 | that's because chicken scheme developers are still working on making chicken |
57 | scheme utf8 aware by default, so let's pretend the utf8 egg is included haha. |
58 |
|
59 | because i've decided to only use included modules, i've replaced my spiffy egg |
60 | dependency with |
61 | [https://git.m455.casa/m455.casa/html/Makefile.html|a makefile command] |
62 | that spins up python's built-in http server for previewing changes. |
63 |
|
64 | i was able to remove my lowdown egg dependency as well, because i'm using my own |
65 | markup language and parser, so that was pretty sweet too. |
66 |
|
67 | anyway, i'm super stoked that i'm using both my own markup language, |
68 | [https://git.m455.casa/m455.casa/html/src/parser.scm.html|markup parser], and |
69 | that i've made my website generator more personal. |
70 |
|
71 | long live the personal web and personal computing! |
72 |
|
73 | oh, uhhh if you want to view the source of my new website generating tools, just |
74 | look at the files under the `src` directory in |
75 | [https://git.m455.casa/m455.casa|this git repository] under the `src` directory. |