Skip to content

Commit c339e49

Browse files
committed
feat : Toc
1 parent 792c078 commit c339e49

File tree

9 files changed

+1088
-108
lines changed

9 files changed

+1088
-108
lines changed

gatsby-config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ module.exports = {
8686
{
8787
resolve: `gatsby-transformer-remark`,
8888
options: {
89+
tableOfContents: {
90+
absolute: false,
91+
pathToSlugField: "fields.slug",
92+
maxDepth: 6,
93+
heading: null,
94+
},
8995
plugins: [
9096
{
9197
resolve: `gatsby-remark-images`,
@@ -105,7 +111,17 @@ module.exports = {
105111
wrapperStyle: `margin-bottom: 1.0725rem`,
106112
},
107113
},
114+
{
115+
resolve: `gatsby-remark-autolink-headers`,
116+
options: {
117+
offsetY: `100`,
118+
maintainCase: false, // 소문자로 통일
119+
removeAccents: true, // 특수문자 제거
120+
icon: `<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>`,
121+
},
122+
},
108123
`gatsby-remark-prismjs`,
124+
`gatsby-remark-copy-relative-linked-files`,
109125
],
110126
},
111127
},

0 commit comments

Comments
 (0)