mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 19:22:52 +02:00
feat: enhance typography and image handling
- Add Heti typography plugin for improved Chinese text layout - Implement rehype plugin to convert images to figure elements with captions - Update UnoCSS configuration by removing typography preset - Modify file extensions for consistency (.mjs to .js) - Add new plugins for admonition, GitHub card, and reading time components - Improve image and text styling with Heti CSS
This commit is contained in:
parent
c549814c7e
commit
9d6de20b6a
19 changed files with 1006 additions and 556 deletions
|
@ -20,11 +20,12 @@ import remarkSectionize from 'remark-sectionize'
|
|||
import UnoCSS from 'unocss/astro'
|
||||
import { themeConfig } from './src/config.js'
|
||||
// Local plugins
|
||||
import { AdmonitionComponent } from './src/plugins/rehype-component-admonition.mjs'
|
||||
import { GithubCardComponent } from './src/plugins/rehype-component-github-card.mjs'
|
||||
import { AdmonitionComponent } from './src/plugins/rehype-component-admonition.js'
|
||||
import { GithubCardComponent } from './src/plugins/rehype-component-github-card.js'
|
||||
import { rehypeImgToFigure } from './src/plugins/rehype-img-to-figure.js'
|
||||
import { parseDirectiveNode } from './src/plugins/remark-directive-rehype.js'
|
||||
import { remarkExcerpt } from './src/plugins/remark-excerpt.js'
|
||||
import { remarkReadingTime } from './src/plugins/remark-reading-time.mjs'
|
||||
import { remarkReadingTime } from './src/plugins/remark-reading-time.js'
|
||||
import { langMap } from './src/utils/ui'
|
||||
|
||||
const { url } = themeConfig.site
|
||||
|
@ -82,6 +83,7 @@ export default defineConfig({
|
|||
rehypePlugins: [
|
||||
rehypeSlug,
|
||||
rehypeKatex,
|
||||
rehypeImgToFigure,
|
||||
[
|
||||
rehypePrettyCode,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue