test more!
This commit is contained in:
parent
259440290a
commit
50461e3a46
2
docs/.gitignore
vendored
2
docs/.gitignore
vendored
@ -3,3 +3,5 @@ index.html
|
|||||||
|
|
||||||
book
|
book
|
||||||
#theme
|
#theme
|
||||||
|
|
||||||
|
README-en.html
|
@ -41,6 +41,9 @@ page-break = true # insert page-break after each chapter
|
|||||||
[rust]
|
[rust]
|
||||||
edition = "2021" # the default edition for code blocks
|
edition = "2021" # the default edition for code blocks
|
||||||
|
|
||||||
|
# 从本地运行一些东西拿到 markdown 里来
|
||||||
|
[preprocessor.cmdrun]
|
||||||
|
|
||||||
### 扩展部分
|
### 扩展部分
|
||||||
|
|
||||||
# 检查文档内链接
|
# 检查文档内链接
|
||||||
@ -55,12 +58,10 @@ edition = "2021" # the default edition for code blocks
|
|||||||
|
|
||||||
# 添加右侧目录
|
# 添加右侧目录
|
||||||
[preprocessor.theme]
|
[preprocessor.theme]
|
||||||
|
turn-off = true
|
||||||
pagetoc = true
|
pagetoc = true
|
||||||
pagetoc-width = "13%"
|
pagetoc-width = "13%"
|
||||||
sidebar-width = "300px"
|
sidebar-width = "300px"
|
||||||
|
|
||||||
# 从本地运行一些东西拿到 markdown 里来
|
|
||||||
[preprocessor.cmdrun]
|
|
||||||
|
|
||||||
# 在新页面中打开链接
|
# 在新页面中打开链接
|
||||||
[preprocessor.external-links]
|
[preprocessor.external-links]
|
||||||
|
@ -18,3 +18,5 @@
|
|||||||
- `python -m pip install -r requre`
|
- `python -m pip install -r requre`
|
||||||
3. 使用 `build_rs.ps1` 尝试编译一次 `DR_rs`
|
3. 使用 `build_rs.ps1` 尝试编译一次 `DR_rs`
|
||||||
- `./build_rs.ps1` 38/39/310/311
|
- `./build_rs.ps1` 38/39/310/311
|
||||||
|
|
||||||
|
<!-- cmdrun test.ps1 -->
|
||||||
|
8
docs/src/test.ps1
Normal file
8
docs/src/test.ps1
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
# ls 之后将每一行输出包裹在 ` 里面
|
||||||
|
echo "``````"
|
||||||
|
Get-ChildItem . | ForEach-Object {
|
||||||
|
echo $_
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "``````"
|
25
docs/theme/index.hbs
vendored
25
docs/theme/index.hbs
vendored
@ -110,12 +110,34 @@
|
|||||||
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<!-- Track and set sidebar scroll position -->
|
||||||
|
<script>
|
||||||
|
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
||||||
|
sidebarScrollbox.addEventListener('click', function(e) {
|
||||||
|
if (e.target.tagName === 'A') {
|
||||||
|
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
||||||
|
}
|
||||||
|
}, { passive: true });
|
||||||
|
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
||||||
|
sessionStorage.removeItem('sidebar-scroll');
|
||||||
|
if (sidebarScrollTop) {
|
||||||
|
// preserve sidebar scroll position when navigating via links within sidebar
|
||||||
|
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
||||||
|
} else {
|
||||||
|
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
||||||
|
var activeSection = document.querySelector('#sidebar .active');
|
||||||
|
if (activeSection) {
|
||||||
|
activeSection.scrollIntoView({ block: 'center' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<div id="page-wrapper" class="page-wrapper">
|
<div id="page-wrapper" class="page-wrapper">
|
||||||
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
{{> header}}
|
{{> header}}
|
||||||
<div id="menu-bar-hover-placeholder"></div>
|
<div id="menu-bar-hover-placeholder"></div>
|
||||||
<div id="menu-bar" class="menu-bar sticky bordered">
|
<div id="menu-bar" class="menu-bar sticky">
|
||||||
<div class="left-buttons">
|
<div class="left-buttons">
|
||||||
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||||
<i class="fa fa-bars"></i>
|
<i class="fa fa-bars"></i>
|
||||||
@ -183,7 +205,6 @@
|
|||||||
|
|
||||||
<div id="content" class="content">
|
<div id="content" class="content">
|
||||||
<main>
|
<main>
|
||||||
<!-- Page table of contents -->
|
|
||||||
<div class="sidetoc"><nav class="pagetoc"></nav></div>
|
<div class="sidetoc"><nav class="pagetoc"></nav></div>
|
||||||
|
|
||||||
{{{ content }}}
|
{{{ content }}}
|
||||||
|
Loading…
Reference in New Issue
Block a user