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

Gatsby → Astro #829

Merged
merged 151 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
462f7a6
basic astro setup, kick out all gatsby configs
kremalicious Aug 29, 2023
c872153
move content folder
kremalicious Aug 29, 2023
5827511
src/pages setup
kremalicious Aug 29, 2023
c491b01
more file reorg
kremalicious Aug 29, 2023
8a01ef9
more config updates
kremalicious Aug 30, 2023
84ea68a
more reorgs
kremalicious Aug 30, 2023
fc7cb88
refactor
kremalicious Aug 30, 2023
9d301a4
refactor
kremalicious Aug 30, 2023
d88f242
bump astro
kremalicious Aug 30, 2023
6d4e7f3
refactor
kremalicious Aug 31, 2023
73bc1bd
svg icon build system, theme switch
kremalicious Sep 2, 2023
620fa8c
remark plugin for lead paragraph, more refactor
kremalicious Sep 3, 2023
e5376ef
make images work
kremalicious Sep 3, 2023
d87ddd3
post meta
kremalicious Sep 3, 2023
3973834
custom Picture component
kremalicious Sep 3, 2023
62b94b2
Pagination, More component, 404 fixes
kremalicious Sep 3, 2023
0064473
linking fixes
kremalicious Sep 3, 2023
735a48c
add table of contents
kremalicious Sep 4, 2023
ea7eec9
post actions fixes
kremalicious Sep 4, 2023
3adb682
tag fixes
kremalicious Sep 4, 2023
053df74
content changes
kremalicious Sep 4, 2023
9da4f82
content changes: move media files to their posts
kremalicious Sep 4, 2023
9c78dfa
more content moving, remove media folder
kremalicious Sep 4, 2023
7b7260e
refactor remark-lead-paragraph
kremalicious Sep 4, 2023
c0bb9d6
link css file when defined in post frontmatter
kremalicious Sep 4, 2023
a157dbc
move content up again
kremalicious Sep 4, 2023
8a25e06
kbd post update
kremalicious Sep 4, 2023
5335b40
allow js
kremalicious Sep 4, 2023
cafb952
downloads solution
kremalicious Sep 4, 2023
f713f5f
add astro check
kremalicious Sep 4, 2023
610dbde
redirect_from solution
kremalicious Sep 4, 2023
9984105
githubLink solution
kremalicious Sep 4, 2023
a219076
reorg
kremalicious Sep 4, 2023
edea2b3
exif solution as prebuild step
kremalicious Sep 5, 2023
59334b9
exif solution on each post during build
kremalicious Sep 5, 2023
6f20d0a
isolate lead paragraph extraction to articles
kremalicious Sep 5, 2023
fc9db9c
restore Exif components
kremalicious Sep 5, 2023
6521188
deploy script update
kremalicious Sep 5, 2023
fb0d2b2
fix redirects
kremalicious Sep 5, 2023
ca4c66c
xml & json feeds
kremalicious Sep 5, 2023
7d71aea
build fix
kremalicious Sep 5, 2023
440640d
fix exif readout in production
kremalicious Sep 5, 2023
1be5995
head and seo tweaks, add feeds
kremalicious Sep 5, 2023
5e5d3ce
tweak image display
kremalicious Sep 5, 2023
7136aa7
archive pages with single layout
kremalicious Sep 5, 2023
7454736
restore tags archive
kremalicious Sep 5, 2023
432c332
sitemap setup
kremalicious Sep 5, 2023
e9a4c92
restore thanks page functionality
kremalicious Sep 6, 2023
50dec0f
reorg
kremalicious Sep 6, 2023
1f0204f
cleanup
kremalicious Sep 6, 2023
ca2acb3
parallel scripts during prebuild
kremalicious Sep 6, 2023
506c253
restore jest setup
kremalicious Sep 6, 2023
fd6337b
remove jest, switch to vitest as test runner
kremalicious Sep 6, 2023
55c83b2
adapt CI
kremalicious Sep 6, 2023
662e6ac
test refactor
kremalicious Sep 6, 2023
44b4ecb
typescript tweaks
kremalicious Sep 6, 2023
59c16d5
avatar fixes
kremalicious Sep 6, 2023
aef44f3
typings
kremalicious Sep 7, 2023
130ef00
restore search functionality
kremalicious Sep 7, 2023
d1e04ab
theme switch with nanostores
kremalicious Sep 7, 2023
9d35b27
fixes
kremalicious Sep 7, 2023
417f55e
test fixes
kremalicious Sep 7, 2023
5581b74
restore changelog functionality
kremalicious Sep 7, 2023
0a449a1
umami script
kremalicious Sep 8, 2023
d26d267
border color tweak
kremalicious Sep 8, 2023
39eed83
related posts with fuse.js
kremalicious Sep 8, 2023
64d7d8c
plawright e2e testing setup
kremalicious Sep 8, 2023
b27df17
search tweaks
kremalicious Sep 8, 2023
d4c82a5
simplify typekit loading
kremalicious Sep 8, 2023
648d5e7
photo fix
kremalicious Sep 8, 2023
b5e59ce
e2e tests
kremalicious Sep 8, 2023
09db22b
related posts fix
kremalicious Sep 8, 2023
ef49e0a
fix tags archive
kremalicious Sep 8, 2023
9ae1ca2
tweaks
kremalicious Sep 8, 2023
ce0d781
tweaks
kremalicious Sep 8, 2023
6c56b2c
linux snapshots
kremalicious Sep 8, 2023
66f930b
fix header test
kremalicious Sep 9, 2023
e083430
new symlink tactic
kremalicious Sep 9, 2023
6843cc9
fix dev server in codespaces
kremalicious Sep 9, 2023
b8de792
fix yaml
kremalicious Sep 9, 2023
2debfad
ci fixes
kremalicious Sep 9, 2023
3eaace7
changelog loading tweaks
kremalicious Sep 9, 2023
2756c73
e2e against dev server on ci
kremalicious Sep 9, 2023
8146579
changelog tweaks
kremalicious Sep 9, 2023
4f05ed7
ci tweaks
kremalicious Sep 9, 2023
7e521bb
ci tweaks
kremalicious Sep 9, 2023
bcf97e3
ci tweaks
kremalicious Sep 9, 2023
a171b2c
docs updates
kremalicious Sep 9, 2023
72cd50f
ci tweaks
kremalicious Sep 9, 2023
1a115a5
refactor photo creation script
kremalicious Sep 9, 2023
a068fc7
package updates
kremalicious Sep 9, 2023
295234d
refactor search
kremalicious Sep 9, 2023
86c79eb
ci tweak
kremalicious Sep 9, 2023
b042f89
ci tweaks
kremalicious Sep 9, 2023
0507493
test tweaks, more unit tests
kremalicious Sep 10, 2023
1b1470a
more unit tests
kremalicious Sep 10, 2023
257fc6e
post creation script tweaks
kremalicious Sep 10, 2023
74508c4
refactor new scripts, test them for real life
kremalicious Sep 11, 2023
42a73be
more tests
kremalicious Sep 11, 2023
ace17be
refactor
kremalicious Sep 11, 2023
fd1e12f
codeclimate-action update
kremalicious Sep 11, 2023
4bd71c6
uses update
kremalicious Sep 11, 2023
5b1ef46
limit ci runs
kremalicious Sep 11, 2023
61f0c86
fix theme toggle, test it
kremalicious Sep 11, 2023
166693b
more tests
kremalicious Sep 11, 2023
0e0fd83
favicon files cleanup
kremalicious Sep 11, 2023
9245610
icon components location change
kremalicious Sep 11, 2023
d659fac
type checking through ci
kremalicious Sep 11, 2023
3a3c916
command fixes
kremalicious Sep 11, 2023
6807803
ci fix
kremalicious Sep 11, 2023
8d95b0d
search tweaks
kremalicious Sep 12, 2023
7e02ac3
ci tweaks
kremalicious Sep 12, 2023
fcd7f77
revised favicons, write post draft about it
kremalicious Sep 12, 2023
03862c1
drafts filtering fix
kremalicious Sep 12, 2023
d730dcf
lint fix, favicon fixes
kremalicious Sep 13, 2023
0ae0e3f
copy changes
kremalicious Sep 13, 2023
54e7e69
fix related search images
kremalicious Sep 13, 2023
355ec25
content updates
kremalicious Sep 13, 2023
1afcce5
new codeblock styles, copy tweaks, fixes
kremalicious Sep 14, 2023
d0d1e04
package updates
kremalicious Sep 14, 2023
d941a7a
typing fixes
kremalicious Sep 14, 2023
7d18908
lint fix
kremalicious Sep 14, 2023
2093410
content updates
kremalicious Sep 14, 2023
7b71658
restore link posts
kremalicious Sep 14, 2023
23a76c2
faster theme switching
kremalicious Sep 14, 2023
5c1b37c
split up astro utils
kremalicious Sep 14, 2023
ef3e6d5
related posts fixes
kremalicious Sep 14, 2023
4bc3fad
fix
kremalicious Sep 14, 2023
4e65838
refactor
kremalicious Sep 15, 2023
f177298
fixes
kremalicious Sep 15, 2023
b26c14b
copy tweaks
kremalicious Sep 15, 2023
b14119a
fixes
kremalicious Sep 15, 2023
fef03b9
picture tweaks
kremalicious Sep 15, 2023
9251c4f
image fixes
kremalicious Sep 17, 2023
9581432
feed fixes, adapt for json feed v1.1
kremalicious Sep 17, 2023
358c1bc
e2e test updates
kremalicious Sep 17, 2023
bd00cc2
layout tweaks
kremalicious Sep 17, 2023
5a707c9
update snaphots
kremalicious Sep 17, 2023
a7ea295
migrate to createMarkdownProcessor
kremalicious Sep 17, 2023
af5c352
ci cache tweaks
kremalicious Sep 17, 2023
2e2e381
activate more browsers for e2e testing
kremalicious Sep 17, 2023
6cfa43d
switch to macos-13 images
kremalicious Sep 17, 2023
cb62728
build caching tweaks
kremalicious Sep 17, 2023
e0f98d9
markdown fix
kremalicious Sep 17, 2023
a4498e3
set image quality
kremalicious Sep 17, 2023
7571556
remove avif generation
kremalicious Sep 17, 2023
9bfa168
picture tweaks
kremalicious Sep 17, 2023
b70958f
head fixes
kremalicious Sep 17, 2023
c5e3268
add og:image:alt
kremalicious Sep 17, 2023
81d9e98
create-icons test
kremalicious Sep 18, 2023
ea3f540
new post: Favicon Generation with Astro
kremalicious Sep 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
File renamed without changes.
55 changes: 55 additions & 0 deletions .config/astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { defineConfig } from 'astro/config'
import remarkLeadParagraph from '../src/lib/remark-lead-paragraph'
import remarkToc from '../src/lib/remark-toc'
import react from '@astrojs/react'
import sitemap from '@astrojs/sitemap'
import expressiveCode from 'astro-expressive-code'
import redirects from './redirects.json'
import config from './blog.config'

// https://astro.build/config
export default defineConfig({
site: config.siteUrl,
output: 'static',
cacheDir: '.astro',
markdown: {
remarkPlugins: [remarkLeadParagraph, remarkToc as any],
shikiConfig: {
// https://github.com/shikijs/shiki/blob/main/docs/themes.md
theme: 'nord',
langs: [],
wrap: true
}
},
server: { host: true },
redirects,
vite: {
resolve: {
// for making content -> src/content symlink work
// https://www.eliostruyf.com/symlink-content-astro-portability/#fix-the-content-issues
preserveSymlinks: true
}
},
integrations: [
react(),
expressiveCode({
theme: 'nord',
// https://github.com/expressive-code/expressive-code/blob/ad08cf74095b30055e841d59497990fade634c86/packages/%40expressive-code/core/src/common/core-styles.ts
styleOverrides: {
borderRadius: 'var(--border-radius)',
borderWidth: 'var(--border-width)',
uiFontFamily: 'var(--font-family-monospace)',
uiFontSize: 'var(--font-size-mini)',
codeFontFamily: 'var(--font-family-monospace)',
codeFontSize: '0.8rem'
}
}),
sitemap({
filter: (page) =>
!page.includes('page/') &&
!page.includes('tags/') &&
!page.includes('archive/') &&
!page.includes('404')
})
]
})
74 changes: 74 additions & 0 deletions .config/aws_redirects.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<!--
AWS S3 routing rules for old content
needs to be manually added to S3 bucket
-->
<RoutingRules>
<RoutingRule>
<Condition>
<KeyPrefixEquals>lab/</KeyPrefixEquals>
</Condition>
<Redirect>
<HostName>lab.kremalicious.com</HostName>
<ReplaceKeyWith></ReplaceKeyWith>
</Redirect>
</RoutingRule>
<RoutingRule>
<Condition>
<KeyPrefixEquals>lab</KeyPrefixEquals>
</Condition>
<Redirect>
<HostName>lab.kremalicious.com</HostName>
<ReplaceKeyWith></ReplaceKeyWith>
</Redirect>
</RoutingRule>
<RoutingRule>
<Condition>
<KeyPrefixEquals>csspaperstack/</KeyPrefixEquals>
</Condition>
<Redirect>
<HostName>lab.kremalicious.com</HostName>
</Redirect>
</RoutingRule>
<RoutingRule>
<Condition>
<KeyPrefixEquals>csspaperstack</KeyPrefixEquals>
</Condition>
<Redirect>
<HostName>lab.kremalicious.com</HostName>
</Redirect>
</RoutingRule>
<RoutingRule>
<Condition>
<KeyPrefixEquals>download/</KeyPrefixEquals>
</Condition>
<Redirect>
<ReplaceKeyPrefixWith>media/</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
<RoutingRule>
<Condition>
<KeyPrefixEquals>feed/</KeyPrefixEquals>
</Condition>
<Redirect>
<ReplaceKeyPrefixWith>feed.xml</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
<RoutingRule>
<Condition>
<KeyPrefixEquals>portfolio/</KeyPrefixEquals>
</Condition>
<Redirect>
<HostName>matthiaskretschmann.com</HostName>
<ReplaceKeyWith></ReplaceKeyWith>
</Redirect>
</RoutingRule>
<RoutingRule>
<Condition>
<KeyPrefixEquals>portfolio</KeyPrefixEquals>
</Condition>
<Redirect>
<HostName>matthiaskretschmann.com</HostName>
<ReplaceKeyWith></ReplaceKeyWith>
</Redirect>
</RoutingRule>
</RoutingRules>
41 changes: 41 additions & 0 deletions .config/blog.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export default {
siteTitle: 'kremalicious',
siteDescription: 'Blog of designer & developer Matthias Kretschmann',
siteUrl: 'https://kremalicious.com',
author: {
name: 'Matthias Kretschmann',
email: 'm@kretschmann.io',
url: 'https://matthiaskretschmann.com',
twitter: 'https://twitter.com/kremalicious',
mastodon: 'https://mas.to/@krema',
github: 'https://github.com/kremalicious',
bitcoin: '171qDmKEXm9YBgBLXyGjjPvopP5o9htQ1V',
ether: '0xf50F267b5689b005FE107cfdb34619f24c014457'
},
rss: '/feed.xml',
jsonfeed: '/feed.json',
itemsPerPage: 30,
repoContentPath: 'https://github.com/kremalicious/blog/tree/main/content',
menu: [
{
title: 'Articles',
link: '/archive'
},
{
title: 'Photos',
link: '/photos'
},
{
title: 'Goodies',
link: '/tags/goodies'
},
{
title: 'Tags',
link: '/tags'
},
{
title: '/Uses',
link: '/uses'
}
]
}
12 changes: 6 additions & 6 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GITHUB_TOKEN=xxx
GATSBY_MAPBOX_ACCESS_TOKEN=xxx
GATSBY_TYPEKIT_ID=xxx
GATSBY_UMAMI_SCRIPT_URL=xxx
GATSBY_UMAMI_WEBSITE_ID=xxx
GATSBY_INFURA_ID=xxx
GATSBY_WALLETCONNECT_ID="xxx"
PUBLIC_MAPBOX_ACCESS_TOKEN=xxx
PUBLIC_TYPEKIT_ID=xxx
PUBLIC_UMAMI_SCRIPT_URL=xxx
PUBLIC_UMAMI_WEBSITE_ID=xxx
PUBLIC_INFURA_ID=xxx
PUBLIC_WALLETCONNECT_ID="xxx"
43 changes: 0 additions & 43 deletions .eslintrc

This file was deleted.

54 changes: 54 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"root": true,
"env": {
"es6": true,
"browser": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": { "jsx": true },
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:astro/recommended",
"plugin:prettier/recommended"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off"
},
"settings": { "react": { "version": "detect" } },
"overrides": [
{
// Define the configuration for `.astro` file.
"files": ["*.astro"],
// Allows Astro components to be parsed.
"parser": "astro-eslint-parser",
// Parse the script in `.astro` as TypeScript by adding the following configuration.
// It's the setting you need when using TypeScript.
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [".astro"]
},
"rules": {
// override/add rules settings here, such as:
// "astro/no-set-html-directive": "error"
}
},
{
"files": ["**/?(*.)+(spec|test).[jt]sx"],
"extends": ["plugin:testing-library/react"],
"rules": {
"testing-library/no-node-access": "off",
"testing-library/no-container": "off"
}
}
]
}
Loading