mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 19:22:52 +02:00
style: add image to figure plugin
- Improve styles for images, blockquotes, tables and more - Fix unexpected line breaks
This commit is contained in:
parent
018f1c9b6c
commit
4ff44f9ac4
14 changed files with 126 additions and 59 deletions
|
@ -11,7 +11,8 @@ import remarkMath from 'remark-math'
|
|||
import UnoCSS from 'unocss/astro'
|
||||
import { themeConfig } from './src/config'
|
||||
import { langMap } from './src/i18n/config'
|
||||
import { remarkReadingTime } from './src/plugins/remark-reading-time'
|
||||
import { rehypeImgToFigure } from './src/plugins/rehype-img-to-figure.mjs'
|
||||
import { remarkReadingTime } from './src/plugins/remark-reading-time.mjs'
|
||||
|
||||
const url = themeConfig.site.url
|
||||
const locale = themeConfig.global.locale
|
||||
|
@ -24,9 +25,9 @@ const imageConfig = imageHostURL
|
|||
image: {
|
||||
domains: [imageHostURL],
|
||||
remotePatterns: [{ protocol: 'https' }],
|
||||
}
|
||||
},
|
||||
}
|
||||
: {};
|
||||
: {}
|
||||
|
||||
export default defineConfig({
|
||||
site: url,
|
||||
|
@ -66,6 +67,7 @@ export default defineConfig({
|
|||
rehypePlugins: [
|
||||
rehypeSlug,
|
||||
rehypeKatex,
|
||||
rehypeImgToFigure,
|
||||
[
|
||||
rehypeExternalLinks,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue