From 49ff73114cfb137ec360c654f2f34018542ab14d Mon Sep 17 00:00:00 2001 From: sdg Date: Fri, 3 May 2024 20:34:03 +0900 Subject: [PATCH] edit bundling:NODE_ENV=production --- .gitignore | 1 + _javascript/commons.js | 2 +- _posts/2024-04-02-execute_jekyll_post.md | 18 +++++++++++ _posts/2024-05-03-markdown-script.md | 38 ++++++++++++++++++++++-- _sass/addon/commons.scss | 7 +++-- 5 files changed, 60 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index e455113..1bec8db 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ package-lock.json # Misc assets/js/dist .DS_Store +assets/js/dist diff --git a/_javascript/commons.js b/_javascript/commons.js index 64701a1..05a9765 100644 --- a/_javascript/commons.js +++ b/_javascript/commons.js @@ -1,5 +1,5 @@ import { basic, initSidebar, initTopbar } from './modules/layouts'; +basic(); initSidebar(); initTopbar(); -basic(); \ No newline at end of file diff --git a/_posts/2024-04-02-execute_jekyll_post.md b/_posts/2024-04-02-execute_jekyll_post.md index c3961b5..5e90873 100644 --- a/_posts/2024-04-02-execute_jekyll_post.md +++ b/_posts/2024-04-02-execute_jekyll_post.md @@ -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실행 안된다. diff --git a/_posts/2024-05-03-markdown-script.md b/_posts/2024-05-03-markdown-script.md index 382353e..e2dfbce 100644 --- a/_posts/2024-05-03-markdown-script.md +++ b/_posts/2024-05-03-markdown-script.md @@ -70,6 +70,40 @@ math: true ``` Grammar is similar with LaTex. -## References +### 줄바꿈 (테이블 내에서 줄바꿈할 때 유용) +``` +
+``` + +### 일반 텍스트에서 줄바꿈 + +``` +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/) \ No newline at end of file +[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"} diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 2409b12..4313f4e 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -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); @@ -839,7 +839,6 @@ $btn-mb: 0.5rem; .sidebar-bottom { padding-left: 2rem; - padding-right: 1rem; margin-bottom: 1.5rem; $btn-size: 1.75rem; @@ -878,6 +877,7 @@ $btn-mb: 0.5rem; } i { + line-height: $btn-size; } @@ -1554,6 +1554,7 @@ search { padding-left: 2.75rem; margin-bottom: 1.75rem; + a:not(:last-child) { margin-right: $sb-btn-gap-lg; }