Skip to content

Commit cf22b93

Browse files
committed
feat: post detail의 heading 태그에 autolink 추가
1 parent c7b6c19 commit cf22b93

File tree

6 files changed

+321
-1
lines changed

6 files changed

+321
-1
lines changed

app/globals.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4+
5+
.prose .autolink-header {
6+
text-decoration: none;
7+
position: relative;
8+
display: flex;
9+
align-items: center;
10+
gap: 1rem;
11+
12+
&::after {
13+
align-self: flex-end;
14+
content: url('/icons/autolink-icon.svg');
15+
width: 24px;
16+
height: 24px;
17+
display: none;
18+
}
19+
20+
&:hover {
21+
&::after {
22+
display: inline;
23+
}
24+
}
25+
}

package-lock.json

Lines changed: 278 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"react": "18.2.0",
2222
"react-dom": "18.2.0",
2323
"react-icons": "^4.11.0",
24+
"rehype-autolink-headings": "^7.0.0",
25+
"rehype-slug": "^6.0.0",
2426
"sharp": "^0.32.6",
2527
"tailwindcss": "3.3.3",
2628
"typescript": "5.2.2"

postcss.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module.exports = {
22
plugins: {
3+
'postcss-import': {},
4+
'tailwindcss/nesting': {},
35
tailwindcss: {},
46
autoprefixer: {},
57
},

public/icons/autolink-icon.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)