Skip to content

Commit

Permalink
smol design change (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
timomeh committed Mar 3, 2024
1 parent 37780a8 commit 33b79e4
Show file tree
Hide file tree
Showing 276 changed files with 7,462 additions and 228,209 deletions.
18 changes: 17 additions & 1 deletion .eslintrc.json
@@ -1,3 +1,19 @@
{
"extends": "next/core-web-vitals"
"extends": ["next/core-web-vitals", "plugin:prettier/recommended"],
"plugins": ["simple-import-sort", "unused-imports"],
"rules": {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
]
}
}
59 changes: 36 additions & 23 deletions next.config.mjs
@@ -1,10 +1,11 @@
import withPlaiceholder from '@plaiceholder/next'

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
experimental: {
esmExternals: 'loose',
serverComponentsExternalPackages: ['shiki', 'vscode-oniguruma'],
},
images: {
remotePatterns: [
Expand All @@ -15,38 +16,50 @@ const nextConfig = {
},
],
},
async rewrites() {
return {
beforeFiles: [
{
source: '/posts',
destination: '/posts/page/1',
},
{
source: '/offtopic',
destination: '/offtopic/page/1',
},
{
source: '/',
destination: '/offtopic/page/1',
},
],
}
},
async redirects() {
return [
{
source: '/posts/page/1',
destination: '/posts',
source: '/offtopic/feed.atom',
destination: '/posts/feed.atom',
permanent: true,
},
{
source: '/offtopic/feed.json',
destination: '/posts/feed.json',
permanent: true,
},
{
source: '/offtopic/feed.rss',
destination: '/posts/feed.rss',
permanent: true,
},
{
source: '/posts',
destination: '/',
permanent: true,
},
{
source: '/offtopic/page/1',
source: '/posts/page/:num*',
destination: '/',
permanent: true,
},
{
source: '/offtopic',
destination: '/',
permanent: true,
},
{
source: '/offtopic/page/:num*',
destination: '/',
permanent: true,
},
{
source: '/offtopic/:slug*',
destination: '/posts/:slug*',
permanent: true,
},
]
},
}

export default nextConfig
export default withPlaiceholder(nextConfig)

0 comments on commit 33b79e4

Please sign in to comment.