-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.html
1506 lines (1506 loc) · 51.5 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.17">
<title>READ ME</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<link rel="stylesheet" href="./asciidoctor.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body class="article">
<div id="header">
<h1>READ ME</h1>
<div id="toc" class="toc">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#_structure_of_the_curriculum_directory">Structure of the <code>curriculum</code> directory</a>
<ul class="sectlevel2">
<li><a href="#_structure_of_a_lesson_directory">Structure of a lesson directory</a>
<ul class="sectlevel3">
<li><a href="#_the_images_subdirectory">The images/ subdirectory</a></li>
</ul>
</li>
<li><a href="#_structure_of_a_pathway_directory">Structure of a pathway directory</a></li>
</ul>
</li>
<li><a href="#_building_and_deploying_using_the_makefile">Building and deploying using the Makefile</a>
<ul class="sectlevel2">
<li><a href="#_cleaning">Cleaning</a></li>
<li><a href="#_deployment">Deployment</a></li>
<li><a href="#_the_build_wrapper">The build wrapper</a></li>
</ul>
</li>
<li><a href="#_standards_compliance">Standards compliance</a>
<ul class="sectlevel2">
<li><a href="#_other_compliances">Other compliances</a></li>
</ul>
</li>
<li><a href="#_lesson_prerequisites">Lesson prerequisites</a></li>
<li><a href="#_git_basics">Git basics</a>
<ul class="sectlevel2">
<li><a href="#_creating_your_private_branch_in_the_original_repo">Creating your private branch in the original repo</a></li>
</ul>
</li>
<li><a href="#_prerequisites">Prerequisites</a></li>
<li><a href="#_authoring_guidelines">Authoring guidelines</a>
<ul class="sectlevel2">
<li><a href="#_a_brief_introduction_to_asciidoc">A brief introduction to AsciiDoc</a></li>
<li><a href="#_racket_preprocessing">Racket preprocessing</a>
<ul class="sectlevel3">
<li><a href="#_glossary">Glossary</a>
<ul class="sectlevel4">
<li><a href="#_syntax_of_the_glossary_terms_rkt_file">Syntax of the glossary-terms.rkt file</a></li>
</ul>
</li>
<li><a href="#_lesson_descriptions_and_dependencies">Lesson descriptions and dependencies</a></li>
<li><a href="#_exercises">Exercises</a></li>
<li><a href="#_cross_references_and_pagination">Cross-references and pagination</a></li>
<li><a href="#_generic_links">Generic links</a></li>
<li><a href="#_images">Images</a></li>
<li><a href="#_comments">Comments</a></li>
<li><a href="#_programming_language_specific_text">Programming-language specific text</a></li>
<li><a href="#_adding_custom_css_classes">Adding custom CSS classes</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>We describe here the directories and files in the <code>curriculum</code>
directory, and how to use the programs provided.</p>
</div>
<div class="paragraph">
<p>For a generated document tree, please see
<a href="https://bootstrapworld.site/materials/spring2023/en-us" class="bare">https://bootstrapworld.site/materials/spring2023/en-us</a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_structure_of_the_curriculum_directory">Structure of the <code>curriculum</code> directory</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The top directory contains a bunch of scripts and subdirectories.</p>
</div>
<div class="paragraph">
<p>The curriculum content is placed in the subdirectories <code>lessons</code>
and <code>pathways</code>. <code>lessons</code> contains individual lessons, including
the lesson plan, exercises, and workbook pages. <code>pathways</code>
contains pathway directories, each of which defines a collection
of lessons. (It is possible for a lesson to occur in multiple
pathways.)</p>
</div>
<div class="paragraph">
<p>The subdirectories <code>lib</code> and <code>shared</code> contain the components of
the program used to generate web pages and PDFs from the
<code>lessons</code> and <code>pathways</code>. <code>shared</code> contains directories named for
the various natural languages used for instruction, e.g., <code>en-us</code>
for US English, and <code>es-mx</code> for Mexican Spanish. Inside these
dwell centralized educational-standards dictionaries, e.g.,
<code>standards-csta-dictionary.rkt</code> for a list of standards defined
by the CSTA. Also present is a general glossary of terms used in
the lessons: <code>glossary-terms.rkt</code>.</p>
</div>
<div class="paragraph">
<p>The file <code>Makefile</code> is used (via <code>make</code>) to
constructs the web pages and PDFs a directory called
<code>distribution</code>.</p>
</div>
<div class="paragraph">
<p>Here is a skeleton of the <code>curriculum</code> tree, showing the salient
files, with a sample lesson and sample pathway:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>curriculum/
Makefile
lib/
<language-independent implementation files>
*.rkt
*.css
glossary-terms.rkt
glossary-terms-ss.rkt
shared/langs/
en-us/
<language-dependent implementation files, such as>
*.rkt
*.css
Badges/*.{jpg,png}
docroot/*.{html,png}
images/*.png
practices/*.rkt
standards/*.rkt
textbooks/*.rkt
lessons/
sample-lesson/
langs/
en-us/
proglang.txt (optional)
shadow-glossary.txt (optional)
index.adoc
slides.md
images/
*.{png,gif,jpg}
lesson-images.json
pyret/
wescheme/
pages/
*.{adoc,pdf}
workbook-pages.txt
pyret/
wescheme/
solution-pages/
*.{adoc,pdf}
pyret/
wescheme/
xtra/
*.{adoc,pdf}
pyret/
wescheme/
pathways/
sample-pathway/
langs/
en-us/
proglang.txt (optional)
index.adoc
lesson-order.txt
external-index.rkt
images/
*.{png,gif,jpg}
lesson-images.json
front-matter/
pages/
*.{adoc,pdf}
workbook-pages.txt
solution-pages/
*.adoc
workbook-pages.txt
back-matter/
pages/
solution-pages/
resources/
index.adoc
images/
*.{png,gif,jpg}
lesson-images.json
pages/
*.{adoc,pdf}
workbook-pages.txt</pre>
</div>
</div>
<div class="paragraph">
<p>Some standard subdirectory names are used to separate and shadow
content based on (natural) language of instruction, the
programming language used, or whether content is being built for
student or teacher. Thus:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The <code>langs</code> subdirectory uses further subdirectories, e.g.,
<code>en-us</code> for US English, <code>es-mx</code> for Mexican Spanish, and <code>fr</code> for French. Source
documents from the relevant natural language are chosen based on
the value of the environment variable <code>$NATLANG</code> during build.
The default is
<code>en-us</code>. In order to ease transition, if a language other than
<code>en-us</code> is chosen, any content unavailable in the new language is
filled in by what’s in <code>en-us</code>.</p>
</li>
<li>
<p>Some of the directories have <code>pyret</code> and <code>wescheme</code>
subdirectories or both. These contain content that should shadow
the default content (one directory level up) if that
programming language is used.</p>
</li>
<li>
<p>The directory <code>solution-pages</code> is used to house source
that will shadow <code>pages</code>, when the pages meant only for
teacher use are created. Similarly,</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>In all these cases, it is important that the shadowing content
have the same file basename as the content that is being
shadowed. Extensions can vary; thus it is possible for
<code>filename.pdf</code> to shadow <code>filename.adoc</code> and vice versa.</p>
</div>
<div class="sect2">
<h3 id="_structure_of_a_lesson_directory">Structure of a lesson directory</h3>
<div class="paragraph">
<p>Each lesson has a subdirectory, e.g., <code>sample-lesson</code>, under the
<code>lessons</code> directory.</p>
</div>
<div class="paragraph">
<p>A lesson plan is specified by an <code>.adoc</code> file in the language
directory for that lesson, e.g.,
<code>sample-lesson/langs/en-us/index.adoc</code>. While the file basename
doesn’t
have to be <code>index</code>, ensure that there is only one <code>.adoc</code> file at
this level.</p>
</div>
<div class="paragraph">
<p>Images are in subdirectory <code>images</code>.</p>
</div>
<div class="paragraph">
<p>Single workbook pages are in subdirs <code>pages</code>
and <code>solution-pages</code> (some of these can be static PDFs
rather than adoc source files).
(The <code>solution-</code> versions, as already explained, are meant to supply
shadowing content intended for teacher-only documents.)</p>
</div>
<div class="paragraph">
<p>The file <code>pages/workbook-pages.txt</code> lists
the pages — one per line — in the
<code>pages</code> directory in the order in which they should show up in the
final workbook. By default,
these pages are rendered in portrait mode. If you desire a
particular file <code>file.adoc</code> to be in landscape, its entry line in
<code>workbook-pages.txt</code> should be <code>file.adoc landscape</code> rather
than just <code>file.adoc</code>. (The
entry <code>file.adoc</code> is convenient shorthand for <code>file.adoc
portrait</code>.) (The words <code>landscape</code> and <code>portrait</code> may
be in any case.) Supplementary <code>adoc</code> files used by these pages
can be stored in subdirectories, typically named <code>fragments</code>.</p>
</div>
<div class="paragraph">
<p>Lesson pages are paginated by default when they show up in the
workbook. If you don’t want a page to be populated, its entry
line in <code>workbook-pages.txt</code> should be <code>file.adoc portrait
nopagenum</code>. (The aspect should also be mentioned, even if it’s
the default.)</p>
</div>
<div class="paragraph">
<p>(Any of the components in an entry line in <code>workbook-pages.txt</code>
may be enclosed in double-quotes.)</p>
</div>
<div class="sect3">
<h4 id="_the_images_subdirectory">The images/ subdirectory</h4>
<div class="paragraph">
<p>As mentioned above, the images for a lesson are collected in a
subdirectory called <code>images</code>. References to these images in the adoc
files are of the form <code>@image{path-to-image-file, width}</code>, where the
<code>path-to-image-file</code> is the relative pathname of the chosen image file
in <code>images</code>, and the optional <code>width</code> is the desired width of the image.</p>
</div>
<div class="paragraph">
<p>The <code>images</code> also contains a <code>lesson-images.json</code> file that lists all
the image files in the same directory with their associated metadata,
i.e., <em>caption</em>, <em>description</em>, <em>source</em>, and <em>license</em>. The topmost
JSON object in this file maps each image name to an object containing
its metadata.</p>
</div>
<div class="paragraph">
<p>Here is an example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>"louis.png": {
"caption": "Louis",
"description": "A very good standard apricot poodle named Louis",
"source": "Image from Louis's hooman",
"license": "Creative Commons 4.0 - NC - SA"
}</pre>
</div>
</div>
<div class="paragraph">
<p>Captions are optional and will print under the image on the webpage and workbook page. They can be left out if no caption is desired.</p>
</div>
<div class="paragraph">
<p>Descriptions are for visually impaired folks using screenreaders so need to be detailed enough to allow students to engage with our materials. For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>"description" : "pie chart: 44.6% white, 22.8% Black, 19.8% Hispanic/Latinx, 9.9% Asian, Small wedges for some other race alone and 2 or more races",</pre>
</div>
</div>
<div class="paragraph">
<p>If an image is created by us, not derived from other work, and is not a data display, use</p>
</div>
<div class="literalblock">
<div class="content">
<pre>"source" : "Created by the Bootstrap Team.",
"license" : "Creative Commons 4.0 - NC - SA"</pre>
</div>
</div>
<div class="paragraph">
<p>If an image is created by us and derived from other work, indicate that. Here’s an example of how we credit the data cycle images:</p>
</div>
<div class="literalblock">
<div class="content">
<pre> "source" : "Created by the Bootstrap Team based on work from @link{http://introdatascience.org/, Mobilizing IDS project} and @link{https://www.amstat.org/asa/files/pdfs/GAISE/GAISEPreK12_Intro.pdf, GAISE}",
"license" : "Creative Commons 4.0 - NC - SA"
},</pre>
</div>
</div>
<div class="paragraph">
<p>If an image is a data display created by us using real data, please specify the source. For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre> "source" : "Created by the Bootstrap Team using data from https://nces.ed.gov/Programs/Edge/ACSDashboard",
"license" : "Creative Commons 4.0 - NC - SA"
},</pre>
</div>
</div>
<div class="paragraph">
<p>If an image is a data display created using fictitious data, please indicate that.</p>
</div>
<div class="literalblock">
<div class="content">
<pre>"source" : "Created by the Bootstrap Team using contrived data",
"license" : "Creative Commons 4.0 - NC - SA"</pre>
</div>
</div>
<div class="paragraph">
<p>The build will issue warnings for underdefined images when <code>description</code>, <code>source</code>, or <code>license</code> are missing. (You will get warnings even if the value is an empty string. However, for the moment, empty-string captions are ignored.)</p>
</div>
<div class="paragraph">
<p>The build process collects all the image descriptions into a single file
<code>images.js</code> in <code>distribution/en-us</code>.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_structure_of_a_pathway_directory">Structure of a pathway directory</h3>
<div class="paragraph">
<p>Each pathway has a subdirectory, e.g., <code>sample-pathway</code>, under the
<code>pathways</code> directory.</p>
</div>
<div class="paragraph">
<p>A pathway narrative is specified by an <code>.adoc</code> file in the
language directory for that pathway, e.g.,
<code>sample-pathway/langs/en-us/index.adoc</code>. The file basename
doesn’t have to be <code>index</code>, but there should be only one <code>.adoc</code>
file in this directory.</p>
</div>
<div class="paragraph">
<p>There can also be a file <code>external-index.rkt</code> used to expand
pointers to URLs in the pathway narrative (see below).</p>
</div>
<div class="paragraph">
<p>In the same directory, the file <code>lesson-order.txt</code> lists
the names of the lessons (e.g., <code>sample-lesson</code>)
that should be included in the
pathway, in the order in which they should appear in the pathway
workbook. (The filename can be enclosed in double-quotes.)</p>
</div>
<div class="paragraph">
<p>The pathway directory can also contains a <code>resources</code>
subdirectory, where an <code>.adoc</code> file describes the “Teacher
Resources” page. There should be only one such <code>.adoc</code> file, but
it can be named anything (not necessarily <code>index.adoc</code>).</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_building_and_deploying_using_the_makefile">Building and deploying using the Makefile</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The top dir contains <code>Makefile</code>. Type <code>make</code> to build the distribution,
to populate the <code>distribution/</code> directory with the built documentation.</p>
</div>
<div class="paragraph">
<p><code>make</code> can take optional targets on the command line:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>book</code> — creates the PDF versions of the HTML files, as also the
workbook PDFs. By default, these are not created as it is a relatively
time-consuming process and is required only after the author is sure
that the HTML conversions have been thoroughly debugged</p>
</li>
<li>
<p><code>linkcheck</code> — checks the various internal and external links in
the documents to ensure they are valid. By default, this check isn’t
done to save time</p>
</li>
</ul>
</div>
<div class="paragraph">
<p><code>make</code> can take the following environment-variable settings to guide the
build:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>NATLANG=lang</code> — builds for the natural language <code>lang</code>. The default is
<code>en-us</code> (US English). Currently, the only other language that has
significant support is <code>es-mx</code> (español mexicano)</p>
</li>
<li>
<p><code>SEMESTER=season</code> — typically either <code>fall</code> or
<code>spring</code>. The default is <code>fall</code></p>
</li>
<li>
<p><code>YEAR=yyyy</code> — typically the four-digit year
of the Common Era. The default is the current year followed by
<code>-BETA</code></p>
</li>
</ul>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
<div class="paragraph">
<p>These environment variables may also be set separately (i.e., not as a
<code>make</code> argument) on your machine, either on the command line or in your
shell profile. In such cases, they should be <code>export</code>ed so that the make
can see them, e.g.,</p>
</div>
<div class="literalblock">
<div class="content">
<pre>export SEMESTER=spring YEAR=2023</pre>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>The doctree for the built pathway (e.g., <code>data-science</code>) for the prose language <code>en-us</code>,
resides in
<code>distribution/en-us/courses/</code>. Thus:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>distribution/
en-us/
courses/
data-science/
index.shtml
workbook/
workbook.pdf
workbook-long.pdf
opt-exercises.pdf
resources/
protected/
workbook-sols.pdf
workbook-long-sols.pdf
opt-exercises-sols.pdf</pre>
</div>
</div>
<div class="paragraph">
<p>Here <code>index.shtml</code> is the web page corresponding to the pathway
narrative. The student workbooks in <code>workbook/</code> are</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>workbook.pdf</code>, the basic student workbook</p>
</li>
<li>
<p><code>workbook-long.pdf</code>, above plus the optional exercises</p>
</li>
<li>
<p><code>opt-exercises.pdf</code>, just the optional exercises</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The teacher workbooks in <code>resources/protected</code> are</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>workbook-sols.pdf</code>, the basic teacher workbook, i.e., with solutions</p>
</li>
<li>
<p><code>workbook-long-sols.pdf</code>, above plus the optional exercises</p>
</li>
<li>
<p><code>opt-exercises-sols.pdf</code>, just the optional exercises</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>These filenames are standard and do not vary with course. Their location
identifies which course they describe.</p>
</div>
<div class="paragraph">
<p>Note that many workbook PDFs can be created: the students’ versions
are created
in the <code>workbook</code> directory; the teachers’ versions in
the “protected” directory
<code>resources/protected</code>.</p>
</div>
<div class="paragraph">
<p>Pages under <code>resources/protected</code> may prompt you for a teacher
password, which is available on signing up with Bootstrapworld.</p>
</div>
<div class="paragraph">
<p>The lessons referred to by the various pathways reside in
<code>distribution/en-us/lessons/</code>. Thus:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>distribution/
en-us/
lessons/
sample-lesson/
index.shtml
pages/
solution-pages/</pre>
</div>
</div>
<div class="paragraph">
<p>For slide generation, please see
<a href="./README-slides.adoc" class="bare">./README-slides.adoc</a>.</p>
</div>
<div class="paragraph">
<p>For more on the build process in general, see
<a href="lib/maker/doc/index.adoc" class="bare">lib/maker/doc/index.adoc</a>.</p>
</div>
<div class="sect2">
<h3 id="_cleaning">Cleaning</h3>
<div class="paragraph">
<p>The <code>make</code> target <code>clean</code> scrubs any existing <code>distribution</code>.</p>
</div>
<div class="literalblock">
<div class="content">
<pre>make clean</pre>
</div>
</div>
<div class="paragraph">
<p>The next
<code>make</code> builds anew.</p>
</div>
</div>
<div class="sect2">
<h3 id="_deployment">Deployment</h3>
<div class="paragraph">
<p>(This section is relevant only to administrators.)</p>
</div>
<div class="paragraph">
<p>After making the distribution, it may be deployed to the web host
using the <code>make</code> target <code>deploy</code>:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>make deploy</pre>
</div>
</div>
<div class="paragraph">
<p>We
currently deploy to:
<a href="https://www.bootstrapworld.site" class="bare">https://www.bootstrapworld.site</a></p>
</div>
<div class="paragraph">
<p>A typical <code>make deploy</code> goes to something like
<a href="https://www.bootstrapworld.site/materials/fall2023" class="bare">https://www.bootstrapworld.site/materials/fall2023</a>, assuming that
the environment variables <code>SEASON</code> and <code>YEAR</code> are <code>fall</code> and <code>2023</code>
respectively. These environment variables may be set at your OS
command line or in your shell profile, or on the <code>make</code> command line, e.g.,</p>
</div>
<div class="literalblock">
<div class="content">
<pre>make SEASON=fall YEAR=2023 deploy</pre>
</div>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
If <code>SEASON</code> and <code>YEAR</code> are not set externally <em>and</em> are not
supplied on the <code>make</code>
command line, the default values of <code>fall</code> and <code>yyyy-BETA</code> (where <code>yyyy</code>
is the current year) are used. This is to prevent inadvertently
overwriting
a currently active deployment. <em>Always explicitly set <code>SEASON</code> and
<code>YEAR</code> when deploying in earnest.</em>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Deployment requires that you have enabled SSH access to the website machine,
and that the environment variables <code>HOSTINGER_IPADDR</code>,
<code>HOSTINGER_USER</code>, and <code>HOSTINGER_PORT</code> are set to the appropriate values.</p>
</div>
<div class="paragraph">
<p>You will be prodded for your webhost password,
once to copy the files over and another time
to unpack them on the webhost machine.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Deployment uses
SSH to interact with your webost.
account. This can be slow. If you’re updating an already deployed
doctree, you may set the variable <code>SKIPLIB</code> to save yourself the time taken
to recopy the large mathjax library, since it’s unlikely to have
changed:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>make SKIPLIB=true deploy</pre>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_the_build_wrapper">The build wrapper</h3>
<div class="paragraph">
<p>A Bash script <code>build</code> is provided as a convenient wrapper for <code>make</code>:</p>
</div>
<div class="paragraph">
<p><code>build</code> takes the following options:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>--book</code> (aka <code>--pdf</code>, <code>-b</code>): generates PDFs, both for
individuals and the workbooks</p>
</li>
<li>
<p><code>--deploy</code>: deploys to website. If dir <code>distribution/</code> not found,
makes it first; otherwise uses already-built distribution</p>
</li>
<li>
<p><code>--force</code> (aka <code>--superforce</code>, <code>--super-force</code>, <code>-f</code>, <code>-F</code>):
builds from scratch, scrubbing any previous <code>distribution/</code></p>
</li>
<li>
<p><code>--help</code> (aka <code>-h</code>): displays help and exists</p>
</li>
<li>
<p><code>--link</code> (aka <code>--verify-links</code>, <code>-l</code>): verify all the links in
the documentation</p>
</li>
<li>
<p><code>--natlang L</code>: builds doc for the natural language <code>L</code>
(default: <code>en-us</code>)</p>
</li>
<li>
<p><code>-bf</code> or <code>-fb</code>: combination of <code>-f</code> and <code>-b</code></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Options can be combined in any order.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
There was an older script called <code>build-pathway</code> that our authors have
gotten used to. It is provided as a trivial identity wrapper for
<code>build</code>.
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_standards_compliance">Standards compliance</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The standards compliance for the various lessons is documented in the
directory `shared/langs/en-us/standards/'. In it are
dictionaries for the
various standards. For now, these are:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>standards-cc-ela-dictionary.rkt
standards-cc-math-dictionary.rkt
standards-cc-states-dictionary.rkt
standards-csta-dictionary.rkt
standards-ia-dictionary.rkt
standards-k12cs-dictionary.rkt
standards-ma-dictionary.rkt
standards-ngss-dictionary.rkt
standards-ok-dictionary.rkt</pre>
</div>
</div>
<div class="paragraph">
<p>Each dictionary entry associates an educational standard label with its description
and all the lessons that comply with it. E.g., the following is an entry in the
dictionary file <code>standards-cc-math-dictionary.rkt</code></p>
</div>
<div class="literalblock">
<div class="content">
<pre>("6.EE.B"
"Reason about and solve one-variable equations and inequalities."
"inequalities1-simple"
"inequalities2-compound"
)</pre>
</div>
</div>
<div class="paragraph">
<p>It associates the label <code>6.EE.B</code> with the description <code>Reason about and
solve one-variable equations and inequalities</code>, and says that the two
lessons <code>inequalities1-simple</code> and <code>inequalities2-compound</code> comply with
it. As you create or modify lessons, add to their names to the
appropriate standard entries as appropriate.</p>
</div>
<div class="paragraph">
<p>The build process creates a menu for finding out the standards
complied with by the lessons and the pathway. The lesson’s menu
is embedded in the lesson plan, whereas the pathway’s (larger)
menu is linked to.</p>
</div>
<div class="sect2">
<h3 id="_other_compliances">Other compliances</h3>
<div class="paragraph">
<p>Compliances with textbooks and practices are similarly documented in the
subdirectories <code>textbooks/</code> and <code>practices/</code> of the <code>shared/langs/en-us</code>
directory.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_lesson_prerequisites">Lesson prerequisites</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The directive <code>@lesson-prereqs{}</code> is used as a placeholder in a
table for row(s) that include lesson prerequisites (if any) and
standards. (The mode of inclusion may change in subsequent
versions depending on how predictable lesson-plan formats
become. For now, we need a placeholder.)</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_git_basics">Git basics</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Fork this repo to your GitHub account (say, <code>jrandomuser</code>). (This is done using
obvious buttons on the GitHub page.)</p>
</div>
<div class="paragraph">
<p>In your terminal, clone your fork thusly:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>git clone https://github.com/jrandomuser/curriculum</pre>
</div>
</div>
<div class="paragraph">
<p>This will create a local repo where you can try things, change
things, etc. But first, to retain connection with the original do:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>git remote add upstream https://github.com/bootstrapworld/curriculum</pre>
</div>
</div>
<div class="paragraph">
<p>Every time the original changes, update like so:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>git fetch upstream
git merge upstream/master</pre>
</div>
</div>
<div class="paragraph">
<p>You are probably in your own <code>master</code> branch. Even if you’re
“branching out” to other new branches, the above merge will
mostly work. “Mostly” because merge often triggers conflicts
depending on how far you have diverged from the original. At the
very least, make sure you’ve checked in all your changes that you
care about, before you attempt a merge. For changes you aren’t
ready to check in, save the concerned files somewhere else, and
make sure there are no “modified” files in your directory.</p>
</div>
<div class="sect2">
<h3 id="_creating_your_private_branch_in_the_original_repo">Creating your private branch in the original repo</h3>
<div class="paragraph">
<p>Alternatively — and this will work only for greenlisted members — clone the repo directly and add your own branch, e.g.,</p>
</div>
<div class="literalblock">
<div class="content">
<pre>git clone https://github.com/bootstrapworld/curriculum
cd curriculum
git checkout -b my-sandbox</pre>
</div>
</div>
<div class="paragraph">
<p>You can pull and merge from <code>master</code> as needed:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>git checkout master
git pull
git checkout my-sandbox
git merge master</pre>
</div>
</div>
<div class="paragraph">
<p>If conflicts arise, you will be given a way to resolve them.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_prerequisites">Prerequisites</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The following is needed to construct documents from this repo:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>A Unix-like environment.</p>
<div class="ulist">
<ul>
<li>
<p>If you’re already on some flavor of unix, you’re there! ✅</p>
</li>
<li>
<p>If you’re on Windows, you’ll want to install
<a href="https://docs.microsoft.com/en-us/windows/wsl/install">WSL2</a> to give yourself a Linux environment first (we recommend Ubuntu).</p>
</li>
<li>
<p>If you’re on MacOS, your environment is close but missing some unix tools. You’ll want to install <a href="https://brew.sh/">Homebrew</a> first, then run the following command to add them:</p>
<div class="literalblock">
<div class="content">
<pre>brew install gnu-sed curl make coreutils gnu-tar</pre>
</div>
</div>
</li>
<li>
<p>Mac users will also need to add these unix tools to their path. In the terminal, run <code>open ~/.zshrc</code> to edit your configuration file. Add the following, then save the file and restart your terminal:</p>
<div class="literalblock">
<div class="content">
<pre># add every gnu tool we have as a prefix to the path
if type brew &>/dev/null; then
HOMEBREW_PREFIX=$(brew --prefix)
for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnubin; do export PATH=$d:$PATH; done
fi</pre>
</div>
</div>
</li>
</ul>
</div>
</li>
<li>
<p>Bash. Keeps all the scripts humming. (This is already available on Linux, macOS, and WSL) ✅</p>
</li>
<li>
<p>Racket, to do preprocessing and other bookkeeping. Any version should
do. We’re not using any bleeding-edge features of Racket. You’ll want to
<a href="https://download.racket-lang.org/">download and install DrRacket</a>
and make sure the <code>racket</code> binary is in your <code>$PATH</code>.</p>
</li>
<li>
<p>Asciidoctor, a Ruby program, to generate HTML from AsciiDoc.</p>
<div class="ulist">
<ul>
<li>
<p>on Linux/WSL: <code>sudo apt-get install asciidoctor</code></p>
</li>
<li>
<p>on macOS: <code>brew install asciidoctor</code></p>
</li>
</ul>
</div>
</li>
<li>
<p>Lua, used for postprocessing.</p>
<div class="ulist">
<ul>
<li>
<p>on Linux/WSL: <code>sudo apt-get install lua5.4</code></p>
</li>
<li>
<p>on macOS: <code>brew install lua</code></p>
</li>
</ul>
</div>
</li>
<li>
<p>Several node packages <strong>all of which are automatically installed by running <code>npm install</code></strong>. (Note: you will need to be running Node v14 or above!)</p>
<div class="ulist">
<ul>
<li>
<p><code>puppeter</code>, and HTML → PDF generator that converts web pages into PDF documents</p>
</li>
<li>
<p><code>puppeteer-cluster</code> to build the hundreds of pages we have in parallel.</p>
</li>
<li>
<p><code>pdf-lib</code>, which handles collecting all the PDFs and adding page numbers</p>
</li>
<li>
<p><code>md2googleslides</code>, which generates slide decks from markdown files in each of the lesson plans</p>
</li>
<li>
<p><code>mathjax</code>, which generates beautifully formatted math output</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_authoring_guidelines">Authoring guidelines</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The <code>.adoc</code> files peppering this curriculum repo are written in
general-purpose AsciiDoc overlaid with some preprocessing directives written in
Racket that are available only in our documentation base.</p>
</div>
<div class="paragraph">
<p>AsciiDoc is a plain-text-based markup that is converted
by the Asciidoctor program into HTML.</p>
</div>
<div class="sect2">
<h3 id="_a_brief_introduction_to_asciidoc">A brief introduction to AsciiDoc</h3>
<div class="paragraph">
<p>An AsciiDoc source file typically has the extension <code>.adoc</code>, at
least in our setup.</p>
</div>
<div class="paragraph">
<p>A title (aka “level 0”) header has its line preceded by a single
equal sign.</p>
</div>
<div class="paragraph">
<p>Level 1 headers (“sections”) are preceded by two equal signs.
Similarly for “subsections” at level 2, 3, 4, 5.</p>
</div>
<div class="literalblock">
<div class="content">
<pre>= Title at level 0</pre>
</div>
</div>