File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1111 < script type ="text/javascript " src ="../menu.js "> </ script >
1212 < script type ="text/javascript " src ="../mainmenu.js "> </ script >
1313 < script type ="text/javascript " src ="../markdown.js "> </ script >
14- < script type ="text/javascript " src ="../markdownview.js "> </ script >
1514 < script type ="text/javascript " src ="./submenu.js "> </ script >
16- < script type ="text/javascript " src ="./page .js "> </ script >
15+ < script type ="text/javascript " src ="./pageN .js "> </ script >
1716
1817</ head >
1918< body >
3332
3433 </ div >
3534
35+ < script >
36+ function getMarkDownFileURL ( ) {
37+ const params = new URLSearchParams ( window . location . search ) ;
38+ const page = params . get ( "page" ) ;
39+ return page ? `./${ page } .md` : "./page1.md" ;
40+ }
41+
42+ function initializeMarkdwonView ( ) {
43+ const view = document . getElementById ( "page-markdown-view" ) ;
44+ if ( ! view ) {
45+ return ;
46+ }
47+
48+ const markdownFileURL = getMarkDownFileURL ( ) ;
49+
50+ loadMarkDownScript (
51+ function ( ) {
52+ renderMarkdwon ( "page-markdown-view" , markdownFileURL ) ;
53+ }
54+ ) ;
55+ }
56+ initializeMarkdwonView ( ) ;
57+ </ script >
3658</ body >
3759</ html >
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class SubMenu {
1818 }
1919
2020 registerMenuDataItem ( ) {
21- this . _Menu . addDataItem ( "/git" , "./page.html" ) ;
21+ this . _Menu . addDataItem ( "/git" , "./page.html?page=pag1 " ) ;
2222 this . _Menu . addDataItem ( "/git/자주사용하는 명령어" , "./page1.html" ) ;
2323 this . _Menu . addDataItem ( "/git/rebase" , "./page2.html" ) ;
2424 this . _Menu . addDataItem ( "/git/branch 이름 규칙" , "./page3.html" ) ;
You can’t perform that action at this time.
0 commit comments