Skip to content

Commit

Permalink
edit bundling:NODE_ENV=production
Browse files Browse the repository at this point in the history
  • Loading branch information
songdaegeun committed May 3, 2024
1 parent a9305d6 commit 49ff731
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ package-lock.json
# Misc
assets/js/dist
.DS_Store
assets/js/dist
2 changes: 1 addition & 1 deletion _javascript/commons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';

basic();
initSidebar();
initTopbar();
basic();
18 changes: 18 additions & 0 deletions _posts/2024-04-02-execute_jekyll_post.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@ jekyll.yml을 커밋한다.
이전의 gitblog내용이 대신 나오는 경우가 있다. 웹캐시가 남아있기 때문인데, [웹캐시제거](https://sukyungdev.github.io/posts/Post-03/)방법을 따라\
ctrl+shift+R로 강한 새로고침을 해주면 캐시적용없는 새로고침이 가능해서 도메인이 가리키는 진짜 gitblog내용을 볼 수 있다.

- Toc, darkmode 문제

멀쩡히 작동하는 것같은데 local gitblog에서 새로고침을 할 때마다 jekyll serve를 돌리는 terminal에 아래와 같은 문구가 떳다.
```
[2024-05-03 20:21:16] ERROR `/assets/js/dist/post.min.js' not found.
```

알고보니 이거때문에 toc랑 mode-watcher가 안되고 있었다. 이에 대한 issue는 다음과 같다.\
[issue](https://github.com/cotes2020/jekyll-theme-chirpy/issues/1090)

일단 .gitignore에 assets/js/dist을 추가한다.
그리고 다음과 같은 명령을 수행한다.
```
$ npm install
$ NODE_ENV=production npx rollup -c --bundleConfigAsCjs
```
이제 toc랑 mode-watcher(dork/white mode toggle)가 정상작동한다.

### 2.1. jekyll-compose 설치

이거 안하면 jekyll post실행 안된다.
Expand Down
38 changes: 36 additions & 2 deletions _posts/2024-05-03-markdown-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,40 @@ math: true
```
Grammar is similar with LaTex.

## References
### 줄바꿈 (테이블 내에서 줄바꿈할 때 유용)
```
<br>
```

### 일반 텍스트에서 줄바꿈

```
1. 문장 끝에 공백 2개 이상
2. \n바로 앞에 \을 한번 더 붙히기
```
### 블럭 인용구

```
>, >>, >>>, ..
```

### 링크
```
기본 링크 : [홈으로](https://www.irgroup.org/)
새창으로 : [홈으로 새창](https://www.irgroup.org/){:target="_blank"}
```

### 이미지

```
기본 형식 : ![설명](링크)
속성 부여 : ![설명](링크){:style="border:1px solid #eaeaea; border-radius: 7px; padding: 0px;" }
```
_참고 : `{}` 사이에 html attribute를 마음대로 넣을 수 있다_

### 참고문서

[Chripy docs](https://chirpy.cotes.page/)
[Chripy docs](https://chirpy.cotes.page/)\
[kramdown syntax](https://kramdown.gettalong.org/syntax.html){:target="_blank"}\
[kramdown 사용법](http://gjchoi.github.io/env/Kramdown%28%EB%A7%88%ED%81%AC%EB%8B%A4%EC%9A%B4%29-%EC%82%AC%EC%9A%A9%EB%B2%95/){:target="_blank"}\
[Front Matter](https://jekyllrb.com/docs/front-matter/){:target="_blank"}
7 changes: 4 additions & 3 deletions _sass/addon/commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -785,13 +785,13 @@ $btn-mb: 0.5rem;

ul {
margin-bottom: 2rem;

li.nav-item {
// opacity: 0.9;
width: 100%;
padding-left: 1.5rem;
padding-right: 1.5rem;

a.nav-link {
@include pt-pb(0.6rem);

Expand Down Expand Up @@ -839,7 +839,6 @@ $btn-mb: 0.5rem;

.sidebar-bottom {
padding-left: 2rem;
padding-right: 1rem;
margin-bottom: 1.5rem;

$btn-size: 1.75rem;
Expand Down Expand Up @@ -878,6 +877,7 @@ $btn-mb: 0.5rem;
}

i {

line-height: $btn-size;
}

Expand Down Expand Up @@ -1554,6 +1554,7 @@ search {
padding-left: 2.75rem;
margin-bottom: 1.75rem;


a:not(:last-child) {
margin-right: $sb-btn-gap-lg;
}
Expand Down

0 comments on commit 49ff731

Please sign in to comment.