Skip to content

Commit ddf95d2

Browse files
committed
docs(vuepress): publish modulo guide under docs/mod
Move mod.md into the VuePress source tree and link it in the sidebar so the comparison page is built with the rest of the site.
1 parent e14d74c commit ddf95d2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

mod.md renamed to docs/mod.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: 取模(%)行为对比
3+
---
4+
15
# 取模(%)行为对比
26

37
用同一组表达式 `(10, 3)``(10, -3)``(-10, 3)``(-10, -3)` 对比四种语言的 `%` 结果(见各语言源码)。
@@ -11,7 +15,7 @@
1115
| `-10 % 3` | -1 | -1 | -1 | **2** |
1216
| `-10 % -3`| -1 | -1 | -1 | -1 |
1317

14-
源码:[js/mod-test.js](js/mod-test.js) · [golang/mod_test.go](golang/mod_test.go) · [java/ModTest.java](java/ModTest.java) · [python/mod_test.py](python/mod_test.py)
18+
源码:[js/mod-test.js](https://github.com/Huauauaa/cheat-sheet/blob/main/js/mod-test.js) · [golang/mod_test.go](https://github.com/Huauauaa/cheat-sheet/blob/main/golang/mod_test.go) · [java/ModTest.java](https://github.com/Huauauaa/cheat-sheet/blob/main/java/ModTest.java) · [python/mod_test.py](https://github.com/Huauauaa/cheat-sheet/blob/main/python/mod_test.py)
1519

1620
## 规律
1721

vuepress.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default defineUserConfig({
1919
link: '/guide/',
2020
children: [
2121
'/guide',
22+
'/mod',
2223
'/book-review',
2324
'/fiction',
2425
{

0 commit comments

Comments
 (0)