Skip to content

Commit 2421124

Browse files
committed
feat: Add manual anchor links
1 parent 993180e commit 2421124

5 files changed

Lines changed: 56 additions & 19 deletions

File tree

README.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,28 @@ Website link: [https://chebread.github.io/](https://chebread.github.io/)
1313
- [License](#license)
1414

1515
## Features
16-
- **Custom Go SSG**: The site is not built with off-the-shelf frameworks like Hugo or Jekyll. The entire build logic—from parsing Markdown files to rendering HTML—is handled by a custom Go.
16+
- Custom Go SSG
1717

18-
- **Markdown-Based Content**: All posts and pages are written in Markdown with YAML front matter for metadata.
18+
- Markdown-Based Content
1919

20-
- **Build-Time Syntax Highlighting**: Code blocks are highlighted at build time using the pure-Go Chroma library, ensuring fast page loads with no client-side JavaScript dependency for styling.
20+
- Build-Time Syntax Highlighting
2121

22-
- **Image Zooming**: Integrated the medium-zoom library to allow users to click and zoom into images for a better viewing experience.
22+
- Image Zooming
2323

24-
- **Frontend Tooling**: The project uses pnpm to manage a modern frontend pipeline featuring Sass for advanced styling and esbuild for fast TypeScript bundling and minification.
24+
- Frontend Tooling
2525

26-
- **Automated CI/CD Pipeline**: The build and deployment process is fully automated with GitHub Actions. Pushing a specially formatted Git tag triggers the workflow, which builds the site and deploys it to GitHub Pages.
26+
- Automated CI/CD Pipeline
27+
28+
- Manual Anchor Links for Headings
2729

2830
## Tech Stack
29-
- **Static Site Generator (SSG)**: Go
30-
- **Content**: Markdown with YAML Front Matter parsed with Goldmark
31-
- **Styling**: SCSS compiled with Dart Sass
32-
- **JavaScript**: TypeScript (bundled with esbuild)
33-
- **Image Zoom**: medium-zoom
34-
- **Package Manager**: pnpm
35-
- **Deployment**: GitHub Actions
31+
- Static Site Generator (SSG): Go
32+
- Content: Markdown with YAML Front Matter parsed with Goldmark
33+
- Styling: SCSS compiled with Dart Sass
34+
- JavaScript: TypeScript (bundled with esbuild)
35+
- Image Zoom: medium-zoom
36+
- Package Manager: pnpm
37+
- Deployment: GitHub Actions
3638

3739
## How to Run
3840
### Install Dependencies
@@ -75,6 +77,40 @@ devd -ol DIR_NAME # Run the server and open a browser using livereload
7577
killall devd # Kill devd process
7678
```
7779

80+
## How to Create Manual Anchor Links
81+
You can create links that jump to specific headings within a page. This is useful for building a table of contents.
82+
83+
### Assign a Custom ID to a Heading
84+
Append {#your-custom-id} directly after your heading text. This ID will be the target for your link.
85+
86+
```md
87+
## My Awesome Section {#section-1}
88+
```
89+
90+
### Link to the Heading
91+
Use the standard Markdown link syntax. The URL part should be a # followed by the custom ID you created.
92+
93+
```md
94+
[Go to my awesome section](#section-1)
95+
```
96+
97+
### Example
98+
99+
```md
100+
## Table of Contents
101+
- [Go to Section 1](#section-1)
102+
- [Go to Section 2](#section-2)
103+
104+
## My Awesome Section {#section-1}
105+
Here is the content for the first section.
106+
107+
## Another Awesome Section {#section-2}
108+
Here is the content for the second section.
109+
```
110+
111+
### Note
112+
It is recommended to use only letters, numbers, and hyphens (-) for IDs to ensure URL compatibility. Special characters (like ?, &) should be avoided. Korean characters are also supported.
113+
78114
## How to Deploy
79115
To publish a new post or deploy changes, you must push a specially formatted Git tag. The deployment is handled automatically by GitHub Actions.
80116

content/WeMos/WeMos D1 R1 보드 (ESP8266) 설정 방법.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2025-09-15
33
category: [Arduino]
4-
published: true
4+
published: false
55
fixed: false
66
---
77

content/WeMos/WeMos 보드란 무엇인가?.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2025-10-01
33
category: [Arduino]
4-
published: true
4+
published: false
55
fixed: false
66
---
77

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
22
date: 2025-09-26
33
category: [개발 회고]
4-
published: false
4+
published: true
55
fixed: false
66
---
77

88
![](/assets/gopher.png)
99

10-
작성 중...
11-
12-
GitHub Repo 구경가기: https://github.com/chebread/chebread.github.io
10+
## 왜 직접 만들었는가?

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ func main() {
4343
),
4444
),
4545
),
46+
goldmark.WithParserOptions(
47+
parser.WithAttribute(), // 수동 id 지정 기능
48+
),
4649
)
4750
_ = md
4851

0 commit comments

Comments
 (0)