Skip to content

Instantly share code, notes, and snippets.

View harrytran998's full-sized avatar
๐Ÿ’Ž
Build right things what matters!

Harry Tran harrytran998

๐Ÿ’Ž
Build right things what matters!
View GitHub Profile
@harrytran998
harrytran998 / reset.css
Created June 25, 2022 06:06 — forked from EllyLoel/reset.css
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/[email protected]/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@harrytran998
harrytran998 / [lang]slash[slug].astro
Created July 10, 2022 15:01 — forked from IanVS/[lang]slash[slug].astro
Redirecting i18n pages in Astro
---
import Layout from '../../layouts/MainLayout.astro';
import {getLanguageFromFilename, getSlugFromFilename} from '../../languages';
export async function getStaticPaths() {
/**
* This builds up a set of params using the filename (which is always in english) as the slug,
* and adds a redirect prop to the proper internationalized slug.
*/
function getRedirects(allPages) {