Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
malkosta
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
91.
▲
by
malkosta
5y ago
Hahaha cool!
92.
▲
by
malkosta
5y ago
Something like this does the job for you...basically applies the template and whatever metadata you give to the .md file. for file in *.md; do pandoc --quiet --template template.html $file -o "${file%.*}.html" done Bu
93.
▲
by
malkosta
5y ago
for file in *.md; do pandoc --quiet --template layout.html $file -o "${file%.*}.html" done
94.
▲
by
malkosta
5y ago
Here is the shortest I can get while keeping markdown support - 3 lines, with 1 dependency: for file in *.md; do pandoc --quiet --template layout.html $file -o "${file%.*}.html" done
95.
▲
by
malkosta
5y ago
Here is my toy tool for this: https://alexxx.co/static-site-generator.html
96.
▲
by
malkosta
5y ago
That's nice! Completely different approach...
97.
▲
by
malkosta
5y ago
I liked!
98.
▲
by
malkosta
5y ago
That's possible, not sure if I want. I would have to: 1. drop markdown support, and posts in HTML 2. find a way to parse HTML via regex, which is doable if I use a different notation than a tag for `<partial src=...` 3. use a langua
99.
▲
by
malkosta
5y ago
How does it handle the most important part? <partial src="partials/layout.html"> My fancy content </partial>
100.
▲
by
malkosta
5y ago
I wanted to be able to create new layouts without touching the precompiler. To rely only on HTML/CSS/Markdown to code the frontend. You can't code partials within the HTML file with your solution.
101.
▲
by
malkosta
5y ago
Thanks! That made it easier to handle this usecase: <partial src="partials/layout.html"> My fancy content </partial> Because I can use HTML parsers. But now I'm thinking of a way to remove a
102.
▲
by
malkosta
5y ago
Live Reload should be easy. I prefer pure CSS and pure HTML. But opened an exception for Markdown, for the sake of writing posts. I don't know what you mean by 1, I thought I achieved that with: <partial src="partials/
103.
▲
by
malkosta
5y ago
Yes. I'm looking to remove NodeJS dependency, but I will probably have to switch languages since JS itself doesn't let me read files from disk, to run the preprocessing.
104.
▲
by
malkosta
5y ago
Yes I wanna get rid of all dependencies...just finding my way through it.
105.
▲
by
malkosta
5y ago
Read Hugo/Wordpress documentation takes longer than write something like this. I got this blog running faster that I would if I had to learn a new tool.
106.
▲
by
malkosta
5y ago
That's possible, not sure if I want. I would have to: 1. drop markdown support, and posts in HTML 2. find a way to parse HTML via regex, which is doable if I use a different notation than a tag for `<partial src=...` 3. use a langua
107.
▲
by
malkosta
5y ago
Oh, good to know! I had no idea about this...
108.
▲
by
malkosta
5y ago
Hey guys, I wrote this very simple SSG, and would like to receive feedback on how to simplify code. Also, I would be happy to fix any bug.
109.
▲
Static Site Generator in 86 Lines
(alexxx.co)
48 points
by
malkosta
5y ago
|
62 comments
110.
▲
by
malkosta
5y ago
Nice! I’m looking for ideas to reduce LOC, but I’m resistant to learn template systems: either too complicated or don’t support markdown.
111.
▲
by
malkosta
5y ago
I replaced Hugo with 80 lines of code. https://alexxx.co/static-site-generator.html Features partial templates, markdown/html, mustache variables, html prettified, dead simple. PS.: please give me ideas to reduce LOC o
112.
▲
by
malkosta
5y ago
Manjaro i3wm version is just like this. It’s out there for years, so it’s more mature. Also, it is built on top of arch linux, so it’s much less bloated, and you get the arch linux guides which are the easiest and most polished I’ve found o
113.
▲
by
malkosta
5y ago
mod + 1: toggle Firefox mod + 2: toggle Terminal That’s the most useful I have.
114.
▲
by
malkosta
5y ago
I really like DWM: https://git.suckless.org/dwm/ If you have a Linux machine, you can compile and install manually by just following the instructions on the README. Then you can customize the window manager by copying
115.
▲
by
malkosta
5y ago
- workout 3x/week - publish 5 libs developed at workplace - write blog posts about some crazy optimizations we did to get attention and boost hiring - kite wave at least once a month - live with $1000/month, save and invest everyt
116.
▲
by
malkosta
5y ago
> Functional programming is less popular because no major successful platform has adopted a functional language as the preferred language. WhatsApp backend is written in Erlang. A large part of the world's telecom infra is written i
117.
▲
by
malkosta
5y ago
Is it possible to send a file via Bluetooth yet?
118.
▲
by
malkosta
5y ago
I guess I'm the only person in the world who smoked for 15 years, and stopped on a beautiful day, without suffering. I still smoke very occasionally, socially, once a month maybe, but I definitely stopped having daily cravings to smoke
119.
▲
by
malkosta
6y ago
My advice is to work for the brazilian government. If you don't do anything, nobody will ever notice.
120.
▲
by
malkosta
6y ago
Ctrl + space (browser) Alt + space (terminal) On Firefox: Spacebar (pagedown) | Shift + spacebar (pageup) | Ctrl + tab (cycle between last recent opened tabs) | Cmd + number (go to tab of number) | Cmd + K (go to search box) | Cmd + L (go t
More ›