11# Configuration for Devsite to Hugo Converter
22
3- # Source repository settings
3+ # Docsy Theme Configuration
44source_repo :
5- owner : " bazelbuild"
6- name : " bazel"
7- branch : " master"
8- path : " site/en"
5+ owner : " alan707"
6+ name : " bazel-docs"
7+ branch : " main"
98
109# Hugo site settings
1110hugo :
@@ -15,47 +14,103 @@ hugo:
1514 languageCode : " en-us"
1615 theme : " docsy"
1716
18- # Content mapping - map Devsite sections to Hugo content types
17+ # Content mapping - organized into 4 main categories
1918content_mapping :
20- concepts :
21- type : " docs"
19+ # TUTORIALS - Step-by-step guides for users
20+ tutorials :
21+ type : " tutorials"
2222 weight : 10
23- basics :
24- type : " docs"
23+ category : " Tutorials"
24+ start :
25+ type : " tutorials"
2526 weight : 20
26- tutorials :
27- type : " docs"
27+ category : " Tutorials"
28+ basics :
29+ type : " tutorials"
2830 weight : 30
31+ category : " Tutorials"
32+
33+ # HOW-TO GUIDES - Practical instructions for specific tasks
34+ install :
35+ type : " how-to-guides"
36+ weight : 10
37+ category : " How-To Guides"
38+ configure :
39+ type : " how-to-guides"
40+ weight : 20
41+ category : " How-To Guides"
2942 build :
30- type : " docs"
43+ type : " how-to-guides"
44+ weight : 30
45+ category : " How-To Guides"
46+ run :
47+ type : " how-to-guides"
3148 weight : 40
32- configure :
33- type : " docs"
49+ category : " How-To Guides"
50+ remote :
51+ type : " how-to-guides"
3452 weight : 50
35- extending :
36- type : " docs"
53+ category : " How-To Guides"
54+ migrate :
55+ type : " how-to-guides"
3756 weight : 60
38- external :
39- type : " docs"
57+ category : " How-To Guides"
58+ rules :
59+ type : " how-to-guides"
4060 weight : 70
41- remote :
42- type : " docs"
61+ category : " How-To Guides"
62+ docs :
63+ type : " how-to-guides"
4364 weight : 80
44- query :
45- type : " docs"
46- weight : 90
47- reference :
48- type : " docs"
49- weight : 100
65+ category : " How-To Guides"
66+
67+ # EXPLANATIONS - In-depth articles explaining concepts and features
68+ concepts :
69+ type : " explanations"
70+ weight : 10
71+ category : " Explanations"
72+ extending :
73+ type : " explanations"
74+ weight : 20
75+ category : " Explanations"
76+ external :
77+ type : " explanations"
78+ weight : 30
79+ category : " Explanations"
80+ about :
81+ type : " explanations"
82+ weight : 40
83+ category : " Explanations"
5084 community :
51- type : " community"
52- weight : 200
85+ type : " explanations"
86+ weight : 50
87+ category : " Explanations"
5388 contribute :
54- type : " community"
55- weight : 210
56- about :
57- type : " about"
58- weight : 300
89+ type : " explanations"
90+ weight : 60
91+ category : " Explanations"
92+ release :
93+ type : " explanations"
94+ weight : 70
95+ category : " Explanations"
96+
97+ # REFERENCE - Detailed reference material for advanced users
98+ reference :
99+ type : " reference"
100+ weight : 10
101+ category : " Reference"
102+ query :
103+ type : " reference"
104+ weight : 20
105+ category : " Reference"
106+ versions :
107+ type : " reference"
108+ weight : 30
109+ category : " Reference"
110+ advanced :
111+ type : " reference"
112+ weight : 40
113+ category : " Reference"
59114
60115# CSS conversion settings
61116css_conversion :
@@ -99,3 +154,156 @@ file_patterns:
99154 - " *.bzl"
100155 - " .git/**"
101156 - " node_modules/**"
157+
158+ # Used to automatically detect language for code blocks without explicit language identifiers
159+ code_language_patterns :
160+ starlark :
161+ - " cc_binary("
162+ - " cc_library("
163+ - " java_library("
164+ - " py_binary("
165+ - " py_library("
166+ - " load("
167+ - " BUILD"
168+ - " WORKSPACE"
169+ - " bazel-"
170+ - " name ="
171+ - " srcs ="
172+ - " deps ="
173+ - " cc_toolchain("
174+ - " toolchain("
175+ - " filegroup("
176+ - " exports_files("
177+ bash :
178+ - " bazel "
179+ - " bazel help"
180+ - " bazel build"
181+ - " bazel test"
182+ - " bazel run"
183+ - " bazel query"
184+ - " #!/bin/bash"
185+ - " #!/bin/sh"
186+ - " echo "
187+ - " export "
188+ - " source "
189+ - " $("
190+ - " ${"
191+ - " $"
192+ - " npm "
193+ - " yarn "
194+ - " git "
195+ - " cd "
196+ - " mkdir "
197+ - " rm "
198+ - " cp "
199+ python :
200+ - " def "
201+ - " class "
202+ - " import "
203+ - " from "
204+ - " print("
205+ - " __init__"
206+ - " self."
207+ - " @"
208+ - " lambda "
209+ - " return "
210+ - " if __name__"
211+ - " try:"
212+ - " except:"
213+ cpp :
214+ - " #include"
215+ - " int main"
216+ - " std::"
217+ - " namespace "
218+ - " cout <<"
219+ - " void "
220+ - " template<"
221+ - " nullptr"
222+ - " .cc"
223+ - " .cpp"
224+ - " .h"
225+ - " cin >>"
226+ - " using namespace"
227+ - " printf("
228+ - " scanf("
229+ java :
230+ - " public class"
231+ - " private "
232+ - " protected "
233+ - " import java"
234+ - " package "
235+ - " extends "
236+ - " implements "
237+ - " @Override"
238+ - " System.out.println"
239+ - " new "
240+ - " throw new"
241+ - " catch ("
242+ javascript :
243+ - " function "
244+ - " const "
245+ - " let "
246+ - " var "
247+ - " =>"
248+ - " console.log"
249+ - " require("
250+ - " export "
251+ - " import "
252+ - " async "
253+ - " await "
254+ - " document."
255+ - " window."
256+ - " addEventListener"
257+ typescript :
258+ - " interface "
259+ - " type "
260+ - " : string"
261+ - " : number"
262+ - " : boolean"
263+ - " enum "
264+ - " readonly "
265+ - " as "
266+ yaml :
267+ - " name:"
268+ - " type:"
269+ - " - name:"
270+ - " kind:"
271+ - " apiVersion:"
272+ - " metadata:"
273+ - " spec:"
274+ json :
275+ - ' {"'
276+ - ' ":'
277+ - ' ": '
278+ - ' ['
279+ - ' ],'
280+ xml :
281+ - " <?xml"
282+ - " <"
283+ - " />"
284+ - " xmlns"
285+ html :
286+ - " <!DOCTYPE"
287+ - " <html"
288+ - " <body"
289+ - " <div"
290+ - " <span"
291+ - " <p>"
292+ - " <h1"
293+ css :
294+ - " body {"
295+ - " div {"
296+ - " .class"
297+ - " #id"
298+ - " color:"
299+ - " background:"
300+ - " @media"
301+ sql :
302+ - " SELECT "
303+ - " FROM "
304+ - " WHERE "
305+ - " INSERT INTO"
306+ - " UPDATE "
307+ - " DELETE FROM"
308+ - " CREATE TABLE"
309+ - " DROP TABLE"
0 commit comments