Skip to content

Commit 35c5b0e

Browse files
Oleksandr Kulkovadamant-pwn
Oleksandr Kulkov
authored andcommitted
Add literate-nav plugin
1 parent 908e656 commit 35c5b0e

File tree

7 files changed

+214
-430
lines changed

7 files changed

+214
-430
lines changed

.github/workflows/deploy-prod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: '3.8'
1919
- name: Install mkdocs-material
2020
run: |
21-
pip install mkdocs-material mkdocs-macros-plugin
21+
pip install mkdocs-material mkdocs-macros-plugin mkdocs-literate-nav
2222
- name: Build pages
2323
run: |
2424
mkdocs build --strict

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
python-version: '3.8'
1515
- name: Install mkdocs-material
1616
run: |
17-
pip install mkdocs-material mkdocs-macros-plugin
17+
pip install mkdocs-material mkdocs-macros-plugin mkdocs-literate-nav
1818
- name: Set up C++
1919
run: |
2020
sudo apt install -y --no-install-recommends build-essential

mkdocs.yml

+3-206
Original file line numberDiff line numberDiff line change
@@ -50,213 +50,10 @@ markdown_extensions:
5050
plugins:
5151
- search
5252
- macros
53+
- literate-nav:
54+
nav_file: navigation.md
5355

5456
extra:
5557
analytics:
5658
provider: google
57-
property: UA-85220282-1
58-
nav:
59-
- 'Home':
60-
- 'index.md'
61-
- 'navigation.md'
62-
- 'contrib.md'
63-
- 'preview.md'
64-
- 'Algebra':
65-
- 'Fundamentals':
66-
- 'algebra/binary-exp.md'
67-
- 'algebra/factoring-exp.md'
68-
- 'algebra/euclid-algorithm.md'
69-
- 'algebra/extended-euclid-algorithm.md'
70-
- 'algebra/linear-diophantine-equation.md'
71-
- 'algebra/fibonacci-numbers.md'
72-
- 'Prime numbers':
73-
- 'algebra/sieve-of-eratosthenes.md'
74-
- 'algebra/prime-sieve-linear.md'
75-
- 'algebra/primality_tests.md'
76-
- 'algebra/factorization.md'
77-
- 'Number-theoretic functions':
78-
- 'algebra/phi-function.md'
79-
- 'algebra/divisors.md'
80-
- 'Modular arithmetic':
81-
- 'algebra/module-inverse.md'
82-
- 'algebra/linear_congruence_equation.md'
83-
- 'algebra/chinese-remainder-theorem.md'
84-
- 'algebra/factorial-modulo.md'
85-
- 'algebra/discrete-log.md'
86-
- 'algebra/primitive-root.md'
87-
- 'algebra/discrete-root.md'
88-
- 'algebra/montgomery_multiplication.md'
89-
- 'Number systems':
90-
- 'algebra/balanced-ternary.md'
91-
- 'algebra/gray-code.md'
92-
- 'Miscellaneous':
93-
- 'algebra/all-submasks.md'
94-
- 'algebra/big-integer.md'
95-
- 'algebra/fft.md'
96-
- 'algebra/polynomial.md'
97-
- 'algebra/continued-fractions.md'
98-
- 'Data Structures':
99-
- 'Fundamentals':
100-
- 'data_structures/stack_queue_modification.md'
101-
- 'data_structures/sparse-table.md'
102-
- 'Trees':
103-
- 'data_structures/disjoint_set_union.md'
104-
- 'data_structures/fenwick.md'
105-
- 'data_structures/sqrt_decomposition.md'
106-
- 'data_structures/segment_tree.md'
107-
- 'data_structures/treap.md'
108-
- 'data_structures/sqrt-tree.md'
109-
- 'data_structures/randomized_heap.md'
110-
- 'Advanced':
111-
- 'data_structures/deleting_in_log_n.md'
112-
- 'Dynamic Programming':
113-
- 'DP optimizations':
114-
- 'dynamic_programming/divide-and-conquer-dp.md'
115-
- 'dynamic_programming/knuth-optimization.md'
116-
- 'Tasks':
117-
- 'dynamic_programming/profile-dynamics.md'
118-
- 'dynamic_programming/zero_matrix.md'
119-
- 'String Processing':
120-
- 'Fundamentals':
121-
- 'string/string-hashing.md'
122-
- 'string/rabin-karp.md'
123-
- 'string/prefix-function.md'
124-
- 'string/z-function.md'
125-
- 'string/suffix-array.md'
126-
- 'string/aho_corasick.md'
127-
- 'Advanced':
128-
- 'string/suffix-tree-ukkonen.md'
129-
- 'string/suffix-automaton.md'
130-
- 'string/lyndon_factorization.md'
131-
- 'Tasks':
132-
- 'string/expression_parsing.md'
133-
- 'string/manacher.md'
134-
- 'string/main_lorentz.md'
135-
136-
- 'Linear Algebra':
137-
- 'Matrices':
138-
- 'linear_algebra/linear-system-gauss.md'
139-
- 'linear_algebra/determinant-gauss.md'
140-
- 'linear_algebra/determinant-kraut.md'
141-
- 'linear_algebra/rank-matrix.md'
142-
- 'Combinatorics':
143-
- 'Fundamentals':
144-
- 'algebra/factorial-divisors.md'
145-
- 'combinatorics/binomial-coefficients.md'
146-
- 'combinatorics/catalan-numbers.md'
147-
- 'Techniques':
148-
- 'combinatorics/inclusion-exclusion.md'
149-
- 'combinatorics/burnside.md'
150-
- 'combinatorics/stars_and_bars.md'
151-
- 'combinatorics/generating_combinations.md'
152-
- 'Tasks':
153-
- 'combinatorics/bishops-on-chessboard.md'
154-
- 'combinatorics/bracket_sequences.md'
155-
- 'combinatorics/counting_labeled_graphs.md'
156-
- 'Numerical Methods':
157-
- 'Search':
158-
- 'num_methods/ternary_search.md'
159-
- 'num_methods/roots_newton.md'
160-
- 'Integration':
161-
- 'num_methods/simpson-integration.md'
162-
- 'Geometry':
163-
- 'Elementary operations':
164-
- 'geometry/basic-geometry.md'
165-
- 'geometry/segment-to-line.md'
166-
- 'geometry/lines-intersection.md'
167-
- 'geometry/check-segments-intersection.md'
168-
- 'geometry/segments-intersection.md'
169-
- 'geometry/circle-line-intersection.md'
170-
- 'geometry/circle-circle-intersection.md'
171-
- 'geometry/tangents-to-two-circles.md'
172-
- 'geometry/length-of-segments-union.md'
173-
- 'Polygons':
174-
- 'geometry/oriented-triangle-area.md'
175-
- 'geometry/area-of-simple-polygon.md'
176-
- 'geometry/point-in-convex-polygon.md'
177-
- 'geometry/minkowski.md'
178-
- 'geometry/picks-theorem.md'
179-
- 'geometry/lattice-points.md'
180-
- 'Convex hull':
181-
- 'geometry/convex-hull.md'
182-
- 'geometry/convex_hull_trick.md'
183-
- 'Sweep-line':
184-
- 'geometry/intersecting_segments.md'
185-
- 'geometry/point-location.md'
186-
- 'Miscellaneous':
187-
- 'geometry/nearest_points.md'
188-
- 'geometry/delaunay.md'
189-
- 'geometry/vertical_decomposition.md'
190-
- 'geometry/halfplane-intersection.md'
191-
- 'Graphs':
192-
- 'Graph traversal':
193-
- 'graph/breadth-first-search.md'
194-
- 'graph/depth-first-search.md'
195-
- 'Connected components, bridges, articulations points':
196-
- 'graph/search-for-connected-components.md'
197-
- 'graph/bridge-searching.md'
198-
- 'graph/bridge-searching-online.md'
199-
- 'graph/cutpoints.md'
200-
- 'graph/strongly-connected-components.md'
201-
- 'graph/strong-orientation.md'
202-
- 'Single-source shortest paths':
203-
- 'graph/dijkstra.md'
204-
- 'graph/dijkstra_sparse.md'
205-
- 'graph/bellman_ford.md'
206-
- 'graph/01_bfs.md'
207-
- 'graph/desopo_pape.md'
208-
- 'All-pairs shortest paths':
209-
- 'graph/all-pair-shortest-path-floyd-warshall.md'
210-
- 'graph/fixed_length_paths.md'
211-
- 'Spanning trees':
212-
- 'graph/mst_prim.md'
213-
- 'graph/mst_kruskal.md'
214-
- 'graph/mst_kruskal_with_dsu.md'
215-
- 'graph/second_best_mst.md'
216-
- 'graph/kirchhoff-theorem.md'
217-
- 'graph/pruefer_code.md'
218-
- 'Cycles':
219-
- 'graph/finding-cycle.md'
220-
- 'graph/finding-negative-cycle-in-graph.md'
221-
- 'graph/euler_path.md'
222-
- 'Lowest common ancestor':
223-
- 'graph/lca.md'
224-
- 'graph/lca_binary_lifting.md'
225-
- 'graph/lca_farachcoltonbender.md'
226-
- 'graph/rmq_linear.md'
227-
- 'graph/lca_tarjan.md'
228-
- 'Flows and related problems':
229-
- 'graph/edmonds_karp.md'
230-
- 'graph/push-relabel.md'
231-
- 'graph/push-relabel-faster.md'
232-
- 'graph/dinic.md'
233-
- 'graph/mpm.md'
234-
- 'graph/flow_with_demands.md'
235-
- 'graph/min_cost_flow.md'
236-
- 'graph/Assignment-problem-min-flow.md'
237-
- 'Matchings and related problems':
238-
- 'graph/bipartite-check.md'
239-
- 'graph/kuhn_maximum_bipartite_matching.md'
240-
- 'Miscellaneous':
241-
- 'graph/topological-sort.md'
242-
- 'graph/edge_vertex_connectivity.md'
243-
- 'graph/tree_painting.md'
244-
- 'graph/2SAT.md'
245-
- 'graph/hld.md'
246-
- 'Miscellaneous':
247-
- 'Sequences':
248-
- 'sequences/rmq.md'
249-
- 'sequences/longest_increasing_subsequence.md'
250-
- 'others/maximum_average_segment.md'
251-
- 'sequences/k-th.md'
252-
- 'Game Theory':
253-
- 'game_theory/games_on_graphs.md'
254-
- 'game_theory/sprague-grundy-nim.md'
255-
- 'Schedules':
256-
- 'schedules/schedule_one_machine.md'
257-
- 'schedules/schedule_two_machines.md'
258-
- 'schedules/schedule-with-completion-duration.md'
259-
- 'Miscellaneous':
260-
- 'others/josephus_problem.md'
261-
- 'others/15-puzzle.md'
262-
- 'others/stern_brocot_tree_farey_sequences.md'
59+
property: UA-85220282-1

preview/main.py

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def render(markdown: str, directory: str) -> str:
4646
- pymdownx.emoji:
4747
emoji_index: !!python/name:materialx.emoji.twemoji
4848
emoji_generator: !!python/name:materialx.emoji.to_svg
49+
50+
plugins:
51+
- macros
4952
""")
5053
(tmp_path / "docs" / "index.md").write_text(markdown)
5154

preview/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
mkdocs-material>=8.1.7
2+
mkdocs-macros-plugin>=0.7.0
23
watchdog==2.1.
34
beautifulsoup4>=4.10.0

src/contrib.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ If you are unfamiliar with the workflow, read [Step-by-step guide to contributin
2121

2222
If you're making a new article or moving existing one to a different place, please make sure that your changes are reflected in
2323

24-
- The list of all articles in [index.md](https://github.com/e-maxx-eng/e-maxx-eng/blob/master/src/index.md);
25-
- The list of all articles in [mkdocs.yml](https://github.com/e-maxx-eng/e-maxx-eng/blob/master/mkdocs.yml);
26-
- The list of new articles in [index.md](https://github.com/e-maxx-eng/e-maxx-eng/blob/master/src/index.md) and [README.md](https://github.com/e-maxx-eng/e-maxx-eng/blob/master/README.md) (if it is a new article).
24+
- The list of all articles in [navigation.md](https://github.com/e-maxx-eng/e-maxx-eng/blob/master/src/navigation.md);
25+
- The list of new articles in [index_body](https://github.com/e-maxx-eng/e-maxx-eng/blob/master/src/index_body) (if it is a new article).
2726

2827
## Syntax
2928

0 commit comments

Comments
 (0)