feat: rewrite to Astro - #165
Conversation
|
Thanks @DLakomy. This is an interesting experiment. I will have a look. Can you sell me on Astro? I assume its a static site generator. But why this one specifically? I will try it out locally... and report back. |
|
A few more questions and comments:
|
Sure. Some background: I'm not a frontend dev, so take what I say with a grain of salt (or a bucket of salt). I sometimes have to write a frontend, though, and in these cases I like solutions that are easy to learn and have a simple tooling. Since I know I won't be able to maintain this site long-term after this experiment, I wanted to make the codebase as approachable as possible for the existing team. I chose Astro because:
What alternatives I've rejected:
I've been rewriting page by page. The first one, Renders as In terms of verification, I've been carefully scrolling flix.dev and localhost next to each other (visually and the effective html) and checking if it's now identical. The rest (the pages after
I think so (I've checked for instance
The renderer is Shiki and Prism is an option. I have no idea what is Prism, but Shiki, if I understand correctly, renders on the server and is kind of built-in. So we could use
It depends. The code I've submitted uses exactly zero JavaScript, because everything is rendered during |
|
Thanks-- I am on vacation but I will revisit this when i am back (August) |
|
Thanks @DLakomy for your write up and hard work. I've looked into Astro and it seems like a good choice, so I would like to proceed towards merging this PR! :-) What I will do is to review it and give some feedback. I then suggest that some feedback is fixed now and some feedback can be resolved in follow-up PRs. Are you up for that? |
|
First things first: I need you to add your name to |
magnus-madsen
left a comment
There was a problem hiding this comment.
Overall just a few minor comments and questions.
I will now take a look at the content page-by-page.
|
A few more comments:
|
|
Overall this looks great! I don't think much remains to be done before it can be merged. Just chasing a few loose ends. |
|
Thank you for the review. I plan to to work on it this weekend. For now, some quick answers (apart from the ones I've answered in the relevant threads; hopefully I've answered all of them, except for inline/not inline cosmetics, I address them here):
BTW I'm not marking the comments where I've answered as |
And thank you for your efforts.
Great!
How about we leave this for later, and just show a single screenshot?
I don't really care so much about the specific icons; I care more about reducing the usage of code we don't control. I am not a webdev, so I am not entirely sure what is best practice here.
Its not the same font on my machine, but a good question is what font it should actually be. The CSS inspector in firefox shows:
Sounds good. We can create some follow-up issues once this PR is merged.
Thanks and good plan. |
|
Today I've managed to fix the most tricky parts (at least from my point of view).
BTW I've updated my knowledge on CDNs vs npm packages. For now, CDNs are good for prototyping (it's worth adding integrity, though), but they don't have the advantages they used to. Browsers no longer cache assets across domains (due to user tracking concerns). Additionally, the npm package approach allows for better tree-shaking - only the icons actually used are shipped. I plan to address the rest of tomorrow. |
|
Hopefully I've covered everything. Please let me know if I missed something, or something more needs to be done. |

Fixes #117
Hello.
I've learned Astro yesterday and thought I might try rewriting your webpage to a static one. I've got nothing against JavaScript on your page, but saw an issue on GitHub.
What I optimized for:
masterduring a full rewrite).documentationsubpage. I guess it's a matter of fontawesome's version.npm run buildyou can runfind ./dist -name '*.js'and see no results).Some notes:
src/components/InlineEditor.astro. It's not blocking this merge, just a suggestion for the future. I guess this would help make Flix more popular (which I hope will happen!).Visual Studio Code Supportsection on thehomesubpage) with a simple grid. I can try to make a pure CSS carousel, but maybe it should be removed and just point to the VSCode webpage. What do you think?How to test:
npm run build.distsubdir. For examplecd dist && python -m http.server 8000and openhttp://localhost:8000/in your browser. Actually, now you can even read that withcurl:DIf you're interested in merging, I'm waiting for your feedback and can check again before merging, to make sure no text is lost.