Added mdbook-pagetoc preprocessor

This commit is contained in:
Unisko PENG, 2023-03-28 21:43:16 +08:00
parent 85ccc5ef97
commit eb3da86fe9
3 changed files with 13 additions and 3 deletions

4
.gitignore vendored
View File

@ -1 +1,5 @@
book
theme/index.hbs
theme/pagetoc.css
theme/pagetoc.js

View File

@ -4,3 +4,8 @@ language = "zh-CN"
multilingual = false
src = "src"
title = "CCNA60D Chinese, 中文版 CCNA 60 days"
[preprocessor.pagetoc]
[output.html]
additional-css = ["theme/pagetoc.css"]
additional-js = ["theme/pagetoc.js"]

View File

@ -29,6 +29,7 @@
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
<link rel="stylesheet" href="theme/pagetoc.css">
</head>
<body>
@ -143,9 +144,8 @@
</script>
<div id="content" class="content">
<main>
<h1 id="60-天通过-ccna-考试"><a class="header" href="#60-天通过-ccna-考试">60 天通过 CCNA 考试</a></h1>
<h1 id="60-天通过-ccna-考试-"><a class="header" href="#60-天通过-ccna-考试-">60 天通过 CCNA 考试 🖧</a></h1>
<main><div class="sidetoc"><nav class="pagetoc"></nav></div>
<h1 id="60-天通过-ccna-考试-"><a class="header" href="#60-天通过-ccna-考试-">60 天通过 CCNA 考试 🖧</a></h1>
<p><strong>Cisco CCNA in 60 Days</strong></p>
<ul>
<li>
@ -257,6 +257,7 @@
<script src="book.js"></script>
<!-- Custom JS scripts -->
<script src="theme/pagetoc.js"></script>
</div>