Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from Gatsby to Astro #29

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Switch from Gatsby to Astro #29

wants to merge 9 commits into from

Conversation

john-kurkowski
Copy link
Owner

@john-kurkowski john-kurkowski commented May 4, 2024

Gatsby felt like overkill for this project: a small, static site, that doesn't even use a runtime framework like React.

Changes

  • Ensure consistent frontmatter schema across all posts
    • Always write description, instead of relying on automatic excerpt calculation
  • Find and replace straight quotes with smart quotes
    • While there, replace most incorrect prose uses of "&" with "and"
    • Remark and Smartypants used to do smart quote replacement automatically at HTML generation time. With Astro and MDX, supposedly the parser only sees 1 quote character at a time, zero context, and Smartypants becomes useless.
    • I did a bulk replace via a combination of smartypants <file> and recode html..utf-8 <file> and manual review.

Discussion

The find-and-replace of smart quotes is the riskiest change in this PR, potentially losing words, like "&".

TODO

  • Fix FOUC when navigating between pages in the nav bar
    • I added Astro's <ViewTransition /> to every page. It helps a little.
    • It doesn't seem to happen with links within the site not in the nav, e.g. links from blog post to blog post, or blog post to blog post index.
    • The problem seems to be magnified in production. See the review app here.

* Ensure consistent frontmatter schema across all posts
  * Always write description, instead of relying on automatic excerpt calculation
Remark and Smartypants used to do smart quote replacement automatically at HTML generation time. With Astro and MDX, supposedly the parser only sees 1 quote character at a time, zero context, and Smartypants becomes useless.

I did a bulk replace via a combination of `smartypants <file>` and `recode html..utf-8 <file>` and manual review.
@john-kurkowski john-kurkowski marked this pull request as ready for review May 4, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant