Readit News logoReadit News
jpjuni0r commented on The Joy of Mixing Custom Elements, Web Components, and Markdown   deanebarker.net/tech/blog... · Posted by u/deanebarker
xfeeefeee · 19 days ago
I recently discovered a static site generator called Astro, which supports many syntaxes but the .astro is a nice mix of TypeScript and JSX-like syntax. Content can use MDX which is like Markdown but with {JSX} style markup for variables and etc. The static components are used very similar to React, with familiar import statements and <ComponentName props=etc> patterns. It is extremely easy to pick up. Best of all, it has plugins to support all sorts of other interactivity, so you can create interactive 'islands' of content using React or Preact or SolidJS or Vue etc. That way you have most of your content statically generated, and then the dynamic parts can be done from the client side.

Best of all, if you use simple unchanged files for other dynamic stuff like JSON etc, you can just generate those on build and serve those files in the host directly as the 'response' to a simple REST request, which is sometimes overlooked despite being the most fundamental form of a REST API.

https://astro.build/

I came across this after researching various options for a website that had, mostly for my own entertainment, restrictions on wanting to be mostly statically generated but customizable easily without learning a lot of new syntax / etc, something JSX-like with Markdown support etc, and MDX was an immediate find - and astro was the easiest SSG I found for it after trying with 11ty and several others. Actually felt like a delight playing with it.

jpjuni0r · 19 days ago
> if you use simple unchanged files for other dynamic stuff like JSON etc, you can just generate those on build and serve those files in the host directly

Other web frameworks support this too, if you look for "static export" options. Next.js, for example, supports this via the getInitialProps function.

What I like especially about Astro, that you perform this data loading during build time from any component/file on your page. With Next.js, this is only possible via the top level Page component.

jpjuni0r commented on Open Terms Archive – Follow changes to terms of service   opentermsarchive.org/... · Posted by u/Reventlov
wdb · 4 years ago
"The tracking opt-out feature requires cookies to be enabled."

Why not opt-in via cookies?

jpjuni0r · 4 years ago
That way the site can hide the cookie banner for you and continue to show it for new visitors (which have no cookies set)
jpjuni0r commented on Show HN: Screentop.gg – a platform for tabletop games   screentop.gg... · Posted by u/davidye
davidye · 6 years ago
Author here.

Screentop is a tabletop sandbox that supports cards, dice, boards, counters, and hidden player state. In the future I'd like to add scripting support so that more complex game mechanics and rules can be implemented.

Client stack: Typescript, React, Apollo, and a custom react-reconciler renderer that targets canvas

Server stack: Elixir, Phoenix, Absinthe

Happy to answer any questions and would love your feedback! Also I have two asks for HN:

1) Content - if you know any designers or publishers that would be interested in creating digital versions of their games please direct them my way!

2) Individual(s) to team up with - this is a solo side project right now but I'm interested in working with others, technical or non-technical, to see where this goes.

Discord: https://discordapp.com/invite/wva8ebh Email: david@screentop.gg

jpjuni0r · 6 years ago
I'm curious what made you decide against Phoenix live view with an elixir backend
jpjuni0r commented on Banned C standard library functions in Git source code   github.com/git/git/blob/m... · Posted by u/susam
slovenlyrobot · 6 years ago
That's a surprisingly small list, missing e.g. sscanf / gets / strtok / all the other "usual suspects" at least
jpjuni0r · 6 years ago
I'm curious how sscanf is considered bad?

u/jpjuni0r

KarmaCake day5December 12, 2018View Original