Skip to content

Commit

Permalink
feat: ✨ v3.1.4
Browse files Browse the repository at this point in the history
Merge pull request #22 from cworld1/v3-1-4
  • Loading branch information
cworld1 authored Dec 3, 2024
2 parents 8ec43d5 + ec2ced6 commit 69cf0ec
Show file tree
Hide file tree
Showing 96 changed files with 1,883 additions and 809 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ node_modules/
.DS_Store
old_blog
ignore.*
/scripts/*.sh
bunfig.toml
/src/content/post/test.*
61 changes: 35 additions & 26 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
// @ts-check

import { defineConfig } from 'astro/config'

// Adapter
// 1. Vercel (serverless)
import vercelServerless from '@astrojs/vercel/serverless'
// 2. Vercel (static)
// import vercelStatic from '@astrojs/vercel/static';
// 3. Local (standalone)
// import node from '@astrojs/node'
// ---

// Integrations
import { rehypeHeadingIds } from '@astrojs/markdown-remark'
import mdx from '@astrojs/mdx'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
// Adapter
import vercelServerless from '@astrojs/vercel/serverless'
// Integrations
import icon from 'astro-icon'
import { defineConfig } from 'astro/config'
// Rehype & remark packages
import rehypeExternalLinks from 'rehype-external-links'
import rehypeKatex from 'rehype-katex'
import remarkMath from 'remark-math'

// Local rehype & remark plugins
import rehypeAutolinkHeadings from './src/plugins/rehypeAutolinkHeadings.ts'
// Markdown
import {
remarkReadingTime,
remarkAddZoomable,
remarkGithubCards,
remarkArxivCards
remarkArxivCards,
remarkReadingTime
} from './src/plugins/remarkPlugins.ts'
import rehypeExternalLinks from 'rehype-external-links'
import rehypeKatex from 'rehype-katex'
import remarkMath from 'remark-math'
import { siteConfig } from './src/site.config.ts'
// Shiki
import {
addCopyButton,
addTitle,
addLanguage,
updateStyle,
transformerNotationDiff
addTitle,
transformerNotationDiff,
transformerNotationHighlight,
updateStyle
} from './src/plugins/shikiTransformers.ts'
import { integrationConfig, siteConfig } from './src/site.config.ts'

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -80,10 +78,12 @@ export default defineConfig({
markdown: {
remarkPlugins: [
remarkReadingTime,
remarkAddZoomable,
remarkMath,
remarkGithubCards,
remarkArxivCards
remarkArxivCards,
// @ts-ignore
...(integrationConfig.mediumZoom.enable
? [[remarkAddZoomable, integrationConfig.mediumZoom.options]] // Wrap in array to ensure it's iterable
: [])
],
rehypePlugins: [
[rehypeKatex, {}],
Expand All @@ -94,9 +94,17 @@ export default defineConfig({
target: '_blank',
rel: ['nofollow, noopener, noreferrer']
}
],
rehypeHeadingIds,
[
rehypeAutolinkHeadings,
{
behavior: 'append',
properties: { className: ['anchor'] },
content: { type: 'text', value: '#' }
}
]
],
// remarkRehype: { },
// https://docs.astro.build/en/guides/syntax-highlighting/
shikiConfig: {
themes: {
Expand All @@ -105,6 +113,7 @@ export default defineConfig({
},
transformers: [
transformerNotationDiff(),
transformerNotationHighlight(),
updateStyle(),
addTitle(),
addLanguage(),
Expand Down
Binary file modified bun.lockb
Binary file not shown.
27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"new-post": "node scripts/new-post.js",
"check": "astro check",
"format": "prettier --write '**/*.{js,jsx,ts,tsx,md,mdx,astro}'",
"lint": "eslint --fix 'src/**/*.{js,ts,jsx,tsx,astro}'",
Expand All @@ -23,36 +24,32 @@
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "^5.1.2",
"@astrojs/vercel": "^7.8.2",
"@waline/client": "^3.3.2",
"astro": "^4.16.13",
"astro-icon": "^1.1.2",
"@waline/client": "^3.4.1",
"astro": "^4.16.16",
"astro-icon": "^1.1.4",
"fuse.js": "^7.0.0",
"hast-util-select": "^6.0.3",
"katex": "^0.16.11",
"node-html-parser": "^6.1.13",
"reading-time": "^1.5.0",
"rehype-external-links": "^3.0.0",
"rehype-katex": "^7.0.0",
"rehype-katex": "^7.0.1",
"remark-math": "^6.0.0",
"remark-rehype": "^11.1.0",
"sharp": "^0.33.5",
"tailwind-merge": "^2.5.4",
"tailwind-merge": "^2.5.5",
"tailwindcss": "^3.4.15",
"typescript": "^5.7.2",
"unist-util-visit": "^5.0.0",
"xmldom": "^0.6.0"
"typescript": "^5.7.2"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
"@eslint/js": "^9.16.0",
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
"@playform/compress": "^0.1.6",
"@tailwindcss/typography": "^0.5.15",
"@types/xmldom": "^0.1.34",
"eslint": "^9.15.0",
"eslint": "^9.16.0",
"eslint-plugin-astro": "^1.3.1",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.8",
"typescript-eslint": "^8.15.0"
"prettier-plugin-tailwindcss": "^0.6.9",
"typescript-eslint": "^8.17.0"
}
}
3 changes: 2 additions & 1 deletion prettier.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default {
'@ianvs/prettier-plugin-sort-imports'
],
importOrder: [
'^(astro/(:*)$)|^(astro$)',
'^(astro$)|^(astro/(:*)$)',
'^@astrojs/.*$',
'<THIRD_PARTY_MODULES>',
'',
'^@/types/(.*)$',
Expand Down
6 changes: 6 additions & 0 deletions public/icons/copyright-sponsor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 0 additions & 64 deletions public/icons/footer.svg

This file was deleted.

13 changes: 13 additions & 0 deletions public/icons/github-card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 69cf0ec

Please sign in to comment.