Skip to content

Commit e172f22

Browse files
docs(docusaurus): freeze v1.9.0 documentation snapshot and fix local dev build (#60)
Signed-off-by: Debjeet Banerjee <debjeetbanerjee48@gmail.com> Co-authored-by: Lucas Amaral <lucaaamaral@gmail.com>
1 parent 835da2f commit e172f22

475 files changed

Lines changed: 29994 additions & 21 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ precommit: ## Run docs precommit checks
99
precommit_fix: ## Try to fix existing precommit issues
1010
make -C readmes precommit_fix
1111

12-
sidebar_check: ## Check if all pages are implemented with sidebars for 1.7.0, 1.8.0, and latest
12+
sidebar_check: ## Check if all pages are implemented with sidebars
1313
python3 check_sidebars.py
1414

1515
# Ref: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html

check_sidebars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def main():
136136
"""
137137
Check if all pages are implemented in the sidebar.
138138
"""
139-
versions = ("latest", "1.8.0", "1.7.0")
139+
versions = ("latest", "1.9.0", "1.8.0", "1.7.0")
140140
pages_not_implemented = {v: set() for v in versions}
141141
for v in versions:
142142
all_pages = get_all_pages(version=v)

docusaurus/create_docusaurus_website.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set -e
1515

1616
function exit_timeout() {
1717
echo ''
18-
docker compose logs docusaurus
18+
docker compose logs dev
1919
echo ''
2020
echo "Timed out after ${1}s waiting for Docusaurus container to build. See logs above for more info."
2121
echo "Possible remedies:"
@@ -39,8 +39,8 @@ function spin() {
3939
}
4040

4141
docker compose down
42-
docker build -t magma_docusaurus .
43-
docker compose --compatibility up -d
42+
docker compose build dev
43+
docker compose up -d dev
4444

4545
echo ''
4646
echo 'NOTE: README changes will live-reload. Sidebar changes require re-running this script.'
@@ -50,4 +50,4 @@ echo 'If you want to follow the build logs, run docker compose logs -f docusauru
5050
spin
5151
echo 'Navigate to http://localhost:3000/ to see the docs.'
5252

53-
# xdg-open 'http://localhost:3000/docs/next/basics/introduction.html' || true
53+
xdg-open 'http://localhost:3000/docs/next/basics/introduction.html' || true

docusaurus/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "magma-documentation",
3-
"version": "1.8.0",
3+
"version": "1.9.0",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
# Source: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
2+
# Ref: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
3+
4+
# Default state for all rules
5+
default: true
6+
7+
# MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time
8+
MD001: true
9+
10+
# MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading
11+
MD002:
12+
# Heading level
13+
level: 1
14+
15+
# MD003/heading-style/header-style - Heading style
16+
MD003:
17+
# Heading style
18+
style: "atx"
19+
20+
# MD004/ul-style - Unordered list style
21+
MD004:
22+
# List style
23+
style: "dash"
24+
25+
# MD005/list-indent - Inconsistent indentation for list items at the same level
26+
MD005: true
27+
28+
# MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line
29+
MD006: true
30+
31+
# MD007/ul-indent - Unordered list indentation
32+
MD007:
33+
# Spaces for indent
34+
indent: 4
35+
# Whether to indent the first level of the list
36+
start_indented: false
37+
38+
# MD009/no-trailing-spaces - Trailing spaces
39+
MD009:
40+
# Spaces for line break
41+
br_spaces: 2
42+
# Allow spaces for empty lines in list items
43+
list_item_empty_lines: false
44+
# Include unnecessary breaks
45+
strict: false
46+
47+
# MD010/no-hard-tabs - Hard tabs
48+
MD010:
49+
# Include code blocks
50+
code_blocks: false
51+
52+
# MD011/no-reversed-links - Reversed link syntax
53+
MD011: true
54+
55+
# MD012/no-multiple-blanks - Multiple consecutive blank lines
56+
MD012:
57+
# Consecutive blank lines
58+
maximum: 1
59+
60+
# MD013/line-length - Line length
61+
MD013:
62+
# Disable line-length checks
63+
line_length: -1
64+
65+
# MD014/commands-show-output - Dollar signs used before commands without showing output
66+
MD014: true
67+
68+
# MD018/no-missing-space-atx - No space after hash on atx style heading
69+
MD018: true
70+
71+
# MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading
72+
MD019: true
73+
74+
# MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading
75+
MD020: true
76+
77+
# MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading
78+
MD021: true
79+
80+
# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
81+
MD022:
82+
# Blank lines above heading
83+
lines_above: 1
84+
# Blank lines below heading
85+
lines_below: 1
86+
87+
# MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line
88+
MD023: true
89+
90+
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
91+
MD024:
92+
# Only check sibling headings
93+
allow_different_nesting: true
94+
# Only check sibling headings
95+
siblings_only: true
96+
97+
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
98+
MD025:
99+
# Heading level
100+
level: 1
101+
# RegExp for matching title in front matter
102+
front_matter_title: ""
103+
104+
# MD026/no-trailing-punctuation - Trailing punctuation in heading
105+
MD026:
106+
# Punctuation characters
107+
punctuation: ".,;:!。,;:!"
108+
109+
# MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol
110+
MD027: true
111+
112+
# MD028/no-blanks-blockquote - Blank line inside blockquote
113+
MD028: true
114+
115+
# MD029/ol-prefix - Ordered list item prefix
116+
MD029:
117+
# List style
118+
style: "one_or_ordered"
119+
120+
# MD030/list-marker-space - Spaces after list markers
121+
MD030:
122+
# Spaces for single-line unordered list items
123+
ul_single: 1
124+
# Spaces for single-line ordered list items
125+
ol_single: 1
126+
# Spaces for multi-line unordered list items
127+
ul_multi: 1
128+
# Spaces for multi-line ordered list items
129+
ol_multi: 1
130+
131+
# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines
132+
MD031:
133+
# Include list items
134+
list_items: true
135+
136+
# MD032/blanks-around-lists - Lists should be surrounded by blank lines
137+
MD032: true
138+
139+
# MD033/no-inline-html - Inline HTML
140+
MD033:
141+
# Allowed elements
142+
allowed_elements: []
143+
144+
# MD034/no-bare-urls - Bare URL used
145+
MD034: true
146+
147+
# MD035/hr-style - Horizontal rule style
148+
MD035:
149+
# Horizontal rule style
150+
style: "---"
151+
152+
# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
153+
MD036:
154+
# Punctuation characters
155+
punctuation: ".,;:!?。,;:!?"
156+
157+
# MD037/no-space-in-emphasis - Spaces inside emphasis markers
158+
MD037: true
159+
160+
# MD038/no-space-in-code - Spaces inside code span elements
161+
MD038: true
162+
163+
# MD039/no-space-in-links - Spaces inside link text
164+
MD039: true
165+
166+
# MD040/fenced-code-language - Fenced code blocks should have a language specified
167+
MD040: true
168+
169+
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
170+
MD041:
171+
# Heading level
172+
level: 1
173+
# RegExp for matching title in front matter
174+
front_matter_title: ""
175+
176+
# MD042/no-empty-links - No empty links
177+
MD042: true
178+
179+
## MD043/required-headings/required-headers - Required heading structure
180+
#MD043:
181+
# # List of headings
182+
# headings: []
183+
# # List of headings
184+
# headers: []
185+
186+
# MD044/proper-names - Proper names should have the correct capitalization
187+
MD044:
188+
# List of proper names
189+
names: []
190+
# Include code blocks
191+
code_blocks: true
192+
193+
# MD045/no-alt-text - Images should have alternate text (alt text)
194+
MD045: true
195+
196+
# MD046/code-block-style - Code block style
197+
MD046:
198+
# Block style
199+
style: "consistent"
200+
201+
# MD047/single-trailing-newline - Files should end with a single newline character
202+
MD047: true
203+
204+
# MD048/code-fence-style - Code fence style
205+
MD048:
206+
# Code fence syle
207+
style: "backtick"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2023 The Magma Authors.
2+
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
FROM node:20.16
13+
14+
RUN mkdir -p /readmes
15+
WORKDIR /readmes
16+
17+
RUN npm install --global markdownlint-cli
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.PHONY: precommit precommit_fix
2+
3+
FILES_TO_IGNORE = --ignore proposals/p010_vendor_neutral_dp.md \
4+
--ignore proposals/p010_subscriber_scaling.md \
5+
--ignore proposals/p015_tech_debt_week.md \
6+
--ignore proposals/p018_control_network_metrics.md
7+
8+
precommit:
9+
docker build -t magma_readmes .
10+
docker compose --compatibility run readmes markdownlint $(FILES_TO_IGNORE) . && echo PASSED
11+
12+
precommit_fix:
13+
docker build -t magma_readmes .
14+
docker compose --compatibility run readmes markdownlint --fix $(FILES_TO_IGNORE) . && echo PASSED
53 KB
154 KB
153 KB

0 commit comments

Comments
 (0)