@@ -8,43 +8,46 @@ import remarkUnwrapImages from "remark-unwrap-images";
8
8
// @ts -ignore:next-line
9
9
import { remarkReadingTime } from "./src/utils/remark-reading-time.mjs" ;
10
10
11
- import opengraphImages from "astro-opengraph-images" ;
12
-
13
11
// https://astro.build/config
14
12
export default defineConfig ( {
15
- site : "https://adikris.in" ,
16
- base : "/blog" ,
17
- markdown : {
18
- remarkPlugins : [ remarkUnwrapImages , remarkReadingTime ] ,
19
- remarkRehype : { footnoteLabelProperties : { className : [ "" ] } } ,
20
- shikiConfig : {
21
- theme : "dracula" ,
22
- wrap : true ,
23
- } ,
24
- } ,
25
- integrations : [ mdx ( { } ) , tailwind ( {
26
- applyBaseStyles : false ,
27
- } ) , sitemap ( ) , prefetch ( ) , opengraphImages ( ) ] ,
28
- vite : {
29
- plugins : [ rawFonts ( [ ".ttf" ] ) ] ,
30
- optimizeDeps : {
31
- exclude : [ "@resvg/resvg-js" ] ,
32
- } ,
33
- } ,
13
+ site : "https://adikris.in" ,
14
+ base : "/blog" ,
15
+ markdown : {
16
+ remarkPlugins : [ remarkUnwrapImages , remarkReadingTime ] ,
17
+ remarkRehype : { footnoteLabelProperties : { className : [ "" ] } } ,
18
+ shikiConfig : {
19
+ theme : "dracula" ,
20
+ wrap : true ,
21
+ } ,
22
+ } ,
23
+ integrations : [
24
+ mdx ( { } ) ,
25
+ tailwind ( {
26
+ applyBaseStyles : false ,
27
+ } ) ,
28
+ sitemap ( ) ,
29
+ prefetch ( ) ,
30
+ ] ,
31
+ vite : {
32
+ plugins : [ rawFonts ( [ ".ttf" ] ) ] ,
33
+ optimizeDeps : {
34
+ exclude : [ "@resvg/resvg-js" ] ,
35
+ } ,
36
+ } ,
34
37
} ) ;
35
38
36
39
function rawFonts ( ext : Array < string > ) {
37
- return {
38
- name : "vite-plugin-raw-fonts" ,
39
- // @ts -ignore:next-line
40
- transform ( _ , id ) {
41
- if ( ext . some ( ( e ) => id . endsWith ( e ) ) ) {
42
- const buffer = fs . readFileSync ( id ) ;
43
- return {
44
- code : `export default ${ JSON . stringify ( buffer ) } ` ,
45
- map : null ,
46
- } ;
47
- }
48
- } ,
49
- } ;
40
+ return {
41
+ name : "vite-plugin-raw-fonts" ,
42
+ // @ts -ignore:next-line
43
+ transform ( _ , id ) {
44
+ if ( ext . some ( ( e ) => id . endsWith ( e ) ) ) {
45
+ const buffer = fs . readFileSync ( id ) ;
46
+ return {
47
+ code : `export default ${ JSON . stringify ( buffer ) } ` ,
48
+ map : null ,
49
+ } ;
50
+ }
51
+ } ,
52
+ } ;
50
53
}
0 commit comments