From 1541c01c9f22c04bbbc737ebbfdb68d4f1736bfc Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Wed, 10 Apr 2024 15:20:06 -0400 Subject: [PATCH] merge: combine GitHub Pages Jekyll template with existing work - also change 'Agustin' rather than 'Agus' --- .gitignore | 3 ++ GOVERNANCE.md | 22 +++++---- README.md | 29 ++++++++++- _config.yml | 29 +++++++++++ _data/contrib.yml | 71 +++++++++++++++++++++++++++ _data/glossary.yml | 65 +++++++++++++++++++++++++ _data/order.yml | 24 +++++++++ _data/references.yml | 6 +++ _data/topic.yml | 100 ++++++++++++++++++++++++++++++++++++++ _includes/app_r.html | 18 +++++++ _includes/chp_r.html | 17 +++++++ _includes/figure.html | 14 ++++++ _includes/foot.html | 8 +++ _includes/glossary.html | 9 ++++ _includes/gls_r.html | 7 +++ _includes/head.html | 10 ++++ _includes/people.html | 22 +++++++++ _includes/ref_r.html | 9 ++++ _includes/references.html | 11 +++++ _includes/rootfile.html | 10 ++++ _includes/table.html | 27 ++++++++++ _includes/title.html | 51 +++++++++++++++++++ _includes/toc.html | 10 ++++ _includes/toc_entry.html | 6 +++ _layouts/default.html | 13 +++++ backup/index.md | 2 + bib/index.md | 1 - binary/index.md | 2 + bw.css | 67 +++++++++++++++++++++++++ ci/index.md | 3 +- completion/index.md | 4 +- conduct_.md | 5 ++ des/index.md | 2 + diff/index.md | 2 + editor/index.md | 3 +- favicon.svg | 5 ++ finale/index.md | 7 ++- ftp/index.md | 3 +- gallery/index.md | 2 + glossary/index.md | 5 +- governance_.md | 5 ++ index.md | 22 ++------- intro/index.md | 9 +++- json/index.md | 4 ++ license_.md | 5 ++ match/index.md | 3 +- parser/index.md | 3 +- proptest/index.md | 2 + references/index.md | 4 ++ site.css | 57 ++++++++++++++++++++++ svg/index.md | 3 +- template/index.md | 3 +- 52 files changed, 784 insertions(+), 40 deletions(-) create mode 100644 _config.yml create mode 100644 _data/contrib.yml create mode 100644 _data/glossary.yml create mode 100644 _data/order.yml create mode 100644 _data/references.yml create mode 100644 _data/topic.yml create mode 100644 _includes/app_r.html create mode 100644 _includes/chp_r.html create mode 100644 _includes/figure.html create mode 100644 _includes/foot.html create mode 100644 _includes/glossary.html create mode 100644 _includes/gls_r.html create mode 100644 _includes/head.html create mode 100644 _includes/people.html create mode 100644 _includes/ref_r.html create mode 100644 _includes/references.html create mode 100644 _includes/rootfile.html create mode 100644 _includes/table.html create mode 100644 _includes/title.html create mode 100644 _includes/toc.html create mode 100644 _includes/toc_entry.html create mode 100644 _layouts/default.html create mode 100644 backup/index.md delete mode 100644 bib/index.md create mode 100644 binary/index.md create mode 100644 bw.css create mode 100644 conduct_.md create mode 100644 des/index.md create mode 100644 diff/index.md create mode 100644 favicon.svg create mode 100644 gallery/index.md create mode 100644 governance_.md create mode 100644 json/index.md create mode 100644 license_.md create mode 100644 proptest/index.md create mode 100644 references/index.md create mode 100644 site.css diff --git a/.gitignore b/.gitignore index 538c8c5..47afbee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ +.jekyll-cache +.jekyll-metadata .DS_Store +_site *~ diff --git a/GOVERNANCE.md b/GOVERNANCE.md index c201969..1d719f0 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -46,29 +46,33 @@ while the third lists decisions made to date. ## Voting Members 1. The following people are currently voting members of this project: + 1. Shritesh **Bhattarai** 1. Luke **Boswell** + 1. Sophie **Collard** + 1. Ashley **Davis** + 1. Eli **Dowling** + 1. Kyril **Dziamura** 1. Richard **Feldman** (co-editor) + 1. Hristo **Georgiev** 1. Norbert **Hajagos** 1. Stuart **Hinson** + 1. Monica **McGuigan** + 1. Fabian **Schmalzried** + 1. Isaac **Van Doren** 1. Anton **Van Moere** (co-editor) 1. Greg **Wilson** (co-editor) 1. Jasper **Woudenberg** + 1. Agus **Zubiaga** -2. To become a voting member, a person must: - 1. select a topic in the issue list in this project's GitHub repository; - 2. have their selection approved by the co-editors; *and* - 3. submit a pull request creating a sub-directory for their topic with an `index.md` file. - -3. Once ten (10) people have qualified as members under rule #2, - further additions will be made as follows: +2. To become a voting member: 1. An existing voting member must file a "governance" issue in the repository to propose the addition. 2. If there are no objections after 72 hours, the addition will go through the procedure described in "Making Decisions" above. -4. Voting members may resign from the project at any time. +3. Voting members may resign from the project at any time. -5. Voting members may lose their vote if a proposal to that effect is passed +4. Voting members may lose their vote if a proposal to that effect is passed according to the procedure described in "Making Decisions" above. 1. A proposal to remove someone's vote may not contain any other business. 2. Each person must be the subject of a separate proposal. diff --git a/README.md b/README.md index bec4609..a1fec89 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,10 @@ that most programmers have never encountered. | Stuart Hinson | stuarth | pattern matching | match | | Monica McGuigan | monmcguigan | JSON codec | json | | Fabian Schmalzried | FabHof | binary data packing | binary | +| Isaac Van Doren | isaacvando | compression | compress | | Isaac Van Doren | isaacvando | HTML templates | template | | Jasper Woudenberg | jwoudenberg | continuous integration | ci | -| Agus Zubiaga | agu-z | HTML parser | parser | +| Agustin Zubiaga | agu-z | HTML parser | parser | ## Learner Persona @@ -104,9 +105,35 @@ that most programmers have never encountered. please include an `index.md` Markdown file with point-form notes about the design of the code. +## Structure + +We are currently building this site using [Jekyll][jekyll] +(the default static site generator for GitHub Pages); +we will convert to something Roc-based soon. + +- Project + - `./CODE_OF_CONDUCT.md`: code of conduct + - `./GOVERNANCE.md`: how this project is run` + - `./LICENSE.md`: license + - `./README.md`: this file +- `./index.md`: home page +- `./*_.md` (trailing underscore): create website pages for project files +- `*/index.md`: chapters and appendices +- `./*.css` and `./favicon.svg`: for generated website +- Jekyll + - `./_config.yml`: configuration + - `./_data/`: data files (see below) + - `./_includes/`: inclusions + - `./_layouts/default.html`: our page template +- Data files + - `_data/contrib.yml`: contributors (use GitHub ID as primary key) + - `_data/order.yml`: chapters and appendices in order (use slug as primary key) + - `_data/topic.yml`: chapter and appendix information (use slug as primary key) + [assigned]: https://github.com/roc-lang/book-of-examples/labels/assigned [cc-by-nc-nd]: https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode [help-wanted]: https://github.com/roc-lang/book-of-examples/labels/help-wanted +[jekyll]: https://jekyllrb.com/ [mit-license]: https://opensource.org/license/MIT [repo]: https://github.com/roc-lang/book-of-examples [roc]: https://www.roc-lang.org/ diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..b64410f --- /dev/null +++ b/_config.yml @@ -0,0 +1,29 @@ +title: "Software Design by Example in Roc" +repository: roc-lang/book-of-examples +editors: +- "rtfeldman" +- "Anton-4" +- "gvwilson" +lang: en + +baseurl: /book-of-examples + +defaults: + - scope: + path: "" # an empty string here means all files in the project + values: + layout: "default" + +exclude: + - CODE_OF_CONDUCT.md + - GOVERNANCE.md + - LICENSE.md + - README.md + - Gemfile + - Gemfile.lock + - '.#*' + - '*~' + +plugins: + - jekyll-redirect-from + - jekyll-sitemap diff --git a/_data/contrib.yml b/_data/contrib.yml new file mode 100644 index 0000000..468efe0 --- /dev/null +++ b/_data/contrib.yml @@ -0,0 +1,71 @@ +- family: "Bhattarai" + personal: "Shritesh" + github: "shritesh" + +- family: "Boswell" + personal: "Luke" + github: "lukewilliamboswell" + +- family: "Collard" + personal: "Sophie" + github: "sophiecollard" + +- family: "Davis" + personal: "Ashley" + github: "ashleydavis" + +- family: "Dowling" + personal: "Eli" + github: "faldor20" + +- family: "Dziamura" + personal: "Kyril" + github: "wontem" + +- family: "Feldman" + personal: "Richard" + github: "rtfeldman" + +- family: "Georgiev" + personal: "Hristo" + github: "hristog" + +- family: "Hajagos" + personal: "Norbert" + github: "HajagosNorbert" + +- family: "Hajagos" + personal: "Norbert" + github: "HajagosNorbert" + +- family: "Hinson" + personal: "Stuart" + github: "stuarth" + +- family: "McGuigan" + personal: "Monica" + github: "monmcguigan" + +- family: "Schmalzried" + personal: "Fabian" + github: "FabHof" + +- family: "Van Doren" + personal: "Isaac" + github: "isaacvando" + +- family: "Van Moere" + personal: "Anton" + github: "Anton-4" + +- family: "Wilson" + personal: "Greg" + github: "gvwilson" + +- family: "Woudenberg" + personal: "Jasper" + github: "jwoudenberg" + +- family: "Zubiaga" + personal: "Agustin" + github: "agu-z" diff --git a/_data/glossary.yml b/_data/glossary.yml new file mode 100644 index 0000000..a7b6fb2 --- /dev/null +++ b/_data/glossary.yml @@ -0,0 +1,65 @@ +# 1 + +# A + +# B + +# C + +# D + +# E + +# F + +- key: functional_programming + en: + term: "functional programming" + def: > + A programming paradigm in which programs map existing values to new values. + +# G + +# H + +# I + +# J +- key: json + en: + term: JSON (JavaScript Object Notation) + def: > + A way to represent data by combining Booleans, numbers, and character strings + in lists and key-value structures. + +# K + +# L + +# M + +# N + +# O + +# P + +# Q + +# R + +# S + +# T + +# U + +# V + +# W + +# X + +# Y + +# Z diff --git a/_data/order.yml b/_data/order.yml new file mode 100644 index 0000000..e00d388 --- /dev/null +++ b/_data/order.yml @@ -0,0 +1,24 @@ +chapters: +- intro +- backup +- diff +- json +- binary +- ci +- editor +- parser +- template +- svg +- match +- completion +- proptest +- des +- ftp +- gallery +- finale +appendices: +- license +- references +- glossary +- conduct +- governance diff --git a/_data/references.yml b/_data/references.yml new file mode 100644 index 0000000..35ef87f --- /dev/null +++ b/_data/references.yml @@ -0,0 +1,6 @@ +- key: "roc_tutorial" + author: "Various authors" + title: "The Roc Language Tutorial" + url: "https://www.roc-lang.org/tutorial" + details: > + Last viewed 2024-03-29. diff --git a/_data/topic.yml b/_data/topic.yml new file mode 100644 index 0000000..2bd7e0f --- /dev/null +++ b/_data/topic.yml @@ -0,0 +1,100 @@ +- slug: "backup" + title: "File Backup" + github: + - "wontem" + +- slug: "binary" + title: "Binary Data Packing" + github: + - "FabHof" + +- slug: "ci" + title: "Continuous Integration" + github: + - "jwoudenberg" + +- slug: "completion" + title: "Autocompletion" + github: + - "faldor20" + +- slug: "conduct" + title: "Code of Conduct" + +- slug: "des" + title: "Discrete Event Simulation" + github: + - "HajagosNorbert" + +- slug: "diff" + title: "File Diffing" + github: + - "hristog" + +- slug: "editor" + title: "A Text Editor" + github: + - "lukewilliamboswell" + +- slug: "finale" + title: "Conclusion" + github: + - "gvwilson" + +- slug: "ftp" + title: "File Transfer" + github: + - "HajagosNorbert" + +- slug: "gallery" + title: "A Thumbnail Gallery" + github: + - "ashleydavis" + +- slug: "glossary" + title: "Glossary" + +- slug: "governance" + title: "Governance" + +- slug: "intro" + title: "Introduction" + github: + - "rtfeldman" + - "Anton-4" + +- slug: "json" + title: "JSON Encoding and Decoding" + github: + - "monmcguigan" + +- slug: "license" + title: "License" + +- slug: "match" + title: "Pattern Matching" + github: + - "stuarth" + +- slug: "parser" + title: "An HTML Parser" + github: + - "agu-z" + +- slug: "proptest" + title: "Property-Based Testing" + github: + - "sophiecollard" + +- slug: "references" + title: "References" + +- slug: "svg" + title: "SVG Rendering" + github: + - "shritesh" + +- slug: "template" + title: "HTML Templates" + github: + - "isaacvando" diff --git a/_includes/app_r.html b/_includes/app_r.html new file mode 100644 index 0000000..7f97525 --- /dev/null +++ b/_includes/app_r.html @@ -0,0 +1,18 @@ +{%- comment -%} +Create a link to an appendix by slug. + +Usage: {% include app_r.html slug="slug" %} + +And yes, we have to loop over the array to get the index… +{%- endcomment -%} +{%- assign num = 0 -%} +{%- assign slug = nil -%} +{%- for entry in site.data.order.appendices -%} + {%- if entry == include.slug -%} + {%- assign num = forloop.index0 -%} + {%- assign slug = "/" | append: entry | append: "/" -%} + {%- break -%} + {%- endif -%} +{%- endfor -%} +{%- assign letter = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | slice: num -%} +Appendix {{ letter }} diff --git a/_includes/chp_r.html b/_includes/chp_r.html new file mode 100644 index 0000000..c7f4618 --- /dev/null +++ b/_includes/chp_r.html @@ -0,0 +1,17 @@ +{%- comment -%} +Create a link to a chapter by slug. + +Usage: {% include chp_r.html slug="slug" %} + +And yes, we have to loop over the array to get the index… +{%- endcomment -%} +{%- assign num = 0 -%} +{%- assign slug = nil -%} +{%- for entry in site.data.order.chapters -%} + {%- if entry == include.slug -%} + {%- assign num = forloop.index -%} + {%- assign slug = "/" | append: entry | append: "/" -%} + {%- break -%} + {%- endif -%} +{%- endfor -%} +Chapter {{ num }} diff --git a/_includes/figure.html b/_includes/figure.html new file mode 100644 index 0000000..b55935d --- /dev/null +++ b/_includes/figure.html @@ -0,0 +1,14 @@ +{%- comment -%} +Create a figure. + +Usage: {% include figure.html id="slug_something" src="file_path.ext" alt="alt text" caption="caption text" %} + +Figures are numbered sequentially from '1' within each chapter. +{%- endcomment -%} + +{%- unless fig_counter -%}{%- assign fig_counter = 1 -%}{%- endunless -%} +
+ {{ include.alt }} +
Figure {{ fig_counter }}: {{ include.caption | markdownify | remove: "

" | remove : "

" | strip }}
+
+{%- assign fig_counter = fig_counter | plus: 1 -%} diff --git a/_includes/foot.html b/_includes/foot.html new file mode 100644 index 0000000..f9fce37 --- /dev/null +++ b/_includes/foot.html @@ -0,0 +1,8 @@ +{%- comment -%} +Footer of web pages. +{%- endcomment -%} + diff --git a/_includes/glossary.html b/_includes/glossary.html new file mode 100644 index 0000000..d63e854 --- /dev/null +++ b/_includes/glossary.html @@ -0,0 +1,9 @@ +{%- comment -%} +Build the glossary based on `_data/glossary.yml`. +{%- endcomment -%} +
+{% for entry in site.data.glossary %} +
{{ entry[site.lang].term | markdownify | remove: "

" | remove: "

" }}
+
{{ entry[site.lang].def | markdownify | remove: "

" | remove: "

" }}
+{% endfor %} +
diff --git a/_includes/gls_r.html b/_includes/gls_r.html new file mode 100644 index 0000000..bd9148a --- /dev/null +++ b/_includes/gls_r.html @@ -0,0 +1,7 @@ +{%- comment -%} +Create a link to an entry in the glossary using `{% include gls_r.html key="some_key" text="inline text" %}`. + +GitHub's Jekyll doesn't support shortcodes, so we have to use an inclusion. +{%- endcomment -%} +{%- capture url -%}/glossary/#g:{{ include.key }}{%- endcapture -%} +{{ include.text | markdownify | remove: "

" | remove: "

" }}
diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 0000000..4a37a4d --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,10 @@ +{%- comment -%} +Head of web pages. +{%- endcomment -%} + + + +{{ site.title }}{% if page.title %} · {{ page.title }}{% endif %} + + + diff --git a/_includes/people.html b/_includes/people.html new file mode 100644 index 0000000..8af5766 --- /dev/null +++ b/_includes/people.html @@ -0,0 +1,22 @@ +{%- comment -%} +Create a list of people's names with links to their GitHub sites. +{%- endcomment -%} + +{%- comment -%} +Create an empty array `authors`. (Yes, this is really how it's done in Jekyll.) +{%- endcomment -%} +{%- assign authors = "" | split: "," -%} + +{%- comment -%} +Fill the array with hyperlinked authors' names. +{%- endcomment -%} +{%- for ident in include.githubs -%} + {%- assign temp = site.data.contrib | find: "github", ident -%} + {%- capture name -%}{{ temp.personal }} {{ temp.family }}{%- endcapture -%} + {%- assign authors = authors | push: name -%} +{%- endfor -%} + +{%- comment -%} +Create the final text. +{%- endcomment -%} +{{ authors | array_to_sentence_string: "and" }} diff --git a/_includes/ref_r.html b/_includes/ref_r.html new file mode 100644 index 0000000..0ab709a --- /dev/null +++ b/_includes/ref_r.html @@ -0,0 +1,9 @@ +{%- comment -%} +Create a link to an entry in the references using `{% include ref_r.html key="some_key" %}`. + +GitHub's Jekyll doesn't support shortcodes, so we have to use an inclusion. +{%- endcomment -%} +{%- capture url -%}/references/#b:{{ include.key }}{%- endcapture -%} +{%- assign entry = site.data.references | find: "key", include.key -%} +{%- assign title = entry["title"] | markdownify | remove: "

" | remove: "

" -%} +{{ title }} diff --git a/_includes/references.html b/_includes/references.html new file mode 100644 index 0000000..1b0bab2 --- /dev/null +++ b/_includes/references.html @@ -0,0 +1,11 @@ +{%- comment -%} +Build the bibliography based on `_data/references.yml`. +{%- endcomment -%} + diff --git a/_includes/rootfile.html b/_includes/rootfile.html new file mode 100644 index 0000000..4f2865a --- /dev/null +++ b/_includes/rootfile.html @@ -0,0 +1,10 @@ +{%- comment -%} +Include text of a standard root-directory file such as `LICENSE.md`. + +This inclusion exists so that text isn't duplicated. +We could add YAML headers to root-directory files, but this has proven to be simpler to maintain. +Note that this inclusion strips out the H1-level header of the included root-directory file +so that the page's title on the website will have the same format as other page titles. +{%- endcomment -%} +{% capture other %}{% include_relative {{include.filename}} %}{% endcapture %} +{{ other | markdownify | split: "" | last }} diff --git a/_includes/table.html b/_includes/table.html new file mode 100644 index 0000000..719bef5 --- /dev/null +++ b/_includes/table.html @@ -0,0 +1,27 @@ +{%- comment -%} +Create a table. + +Usage: {% include table.html id="slug_something" src="file_path.tbl" caption="caption text" %} + +1. The included file should be a Markdown table (see example below). +2. There is no way to attach an ID to a element using Jekyll's Markdown parser + so the table is wrapped in a
that has an ID. +3. The caption is laid out as a paragraph immediately after the table + because there is no way to add a caption to a Markdown table with Jekyll's Markdown parser. +4. Tables are numbered sequentially from '1' within each chapter. + +Example table (stored in a .tbl file): + +| Left Title | Right Title | +| ---------- | ----------- | +| value 1 | value A | +| value 2 | value B | +{%- endcomment -%} + +{%- unless tbl_counter -%}{%- assign tbl_counter = 1 -%}{%- endunless -%} +{%- capture tbl -%}{% include_relative {{ include.src }} %}{%- endcapture -%} +
+{{ tbl | markdownify | remove: "

" | remove : "

" | strip }} +

Table {{ tbl_counter }}: {{ include.caption | markdownify | remove: "

" | remove : "

" | strip }}

+
+{%- assign tbl_counter = tbl_counter | plus: 1 -%} diff --git a/_includes/title.html b/_includes/title.html new file mode 100644 index 0000000..eab1d46 --- /dev/null +++ b/_includes/title.html @@ -0,0 +1,51 @@ +{%- comment -%} +Page title. +{%- endcomment -%} + +{%- comment -%} +Determine the page's slug based on filepath. Cases are: +1. Root page. +2. In root directory with trailing underscore. +3. In subdirectory. +{%- endcomment -%} +{%- if page.path == "index.md" -%} + {%- assign slug = "@root" -%} +{%- else -%} + {%- assign temp = page.path | split: "/" -%} + {%- if temp.size == 1 -%} + {%- assign slug = temp[0] | split: "." | first | replace: "_", "" %} + {%- else -%} + {%- assign slug = temp[0] %} + {%- endif -%} +{%- endif -%} + +{%- comment -%} +Determine page title from slug. +1. Root page's title is overall site title. +2. Other pages get titles from `_data/site.topic.yml`. +{%- endcomment -%} +{%- if slug == "@root" -%} + {%- assign title = site.title -%} +{%- else -%} + {%- assign temp = site.data.topic | find: "slug", slug -%} + {%- assign title = temp.title -%} +{%- endif -%} + +{%- comment -%} +Determine page authors. + +1. Chapters' authors are listed in `_data/site.topic.yml`. +2. Pages not listed there have no authors (e.g., license or glossary). +{%- endcomment -%} +{%- if site.data.order.chapters contains slug -%} + {%- assign temp = site.data.topic | find: "slug", slug -%} + {%- capture authors -%}{% include people.html githubs=temp.github %}{%- endcapture -%} +{%- else -%} + {%- assign authors = nil -%} +{%- endif -%} + +{%- comment -%} +Construct title and author list (if any). +{%- endcomment -%} +

{{ title }}

+{% if authors -%}

Written by {{ authors }}

{%- endif %} diff --git a/_includes/toc.html b/_includes/toc.html new file mode 100644 index 0000000..a2793a8 --- /dev/null +++ b/_includes/toc.html @@ -0,0 +1,10 @@ +{%- comment -%} +Table of contents. +Creates one ordered list for chapters and another for appendices based on `_data/order.yml`. +{%- endcomment -%} +
    + {% for slug in site.data.order.chapters %}{% include toc_entry.html slug=slug %}{% endfor %} +
+
    + {% for slug in site.data.order.appendices %}{% include toc_entry.html slug=slug %}{% endfor %} +
diff --git a/_includes/toc_entry.html b/_includes/toc_entry.html new file mode 100644 index 0000000..b9c4cc2 --- /dev/null +++ b/_includes/toc_entry.html @@ -0,0 +1,6 @@ +{%- comment -%} +Single entry in table of contents. +This is a standalone 'include' so that it can be used for both chapters and appendices. +{%- endcomment -%} +{%- assign temp = site.data.topic | find: "slug", include.slug -%} +
  • {{ temp.title }}
  • diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..7b61799 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,13 @@ + + + + {% include head.html %} + + +
    + {% include title.html %} +{{ content }} +
    + {% include foot.html %} + + diff --git a/backup/index.md b/backup/index.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/backup/index.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/bib/index.md b/bib/index.md deleted file mode 100644 index b18be66..0000000 --- a/bib/index.md +++ /dev/null @@ -1 +0,0 @@ -# References diff --git a/binary/index.md b/binary/index.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/binary/index.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/bw.css b/bw.css new file mode 100644 index 0000000..e3ea872 --- /dev/null +++ b/bw.css @@ -0,0 +1,67 @@ +/* This file was generated using `rougify style bw` */ +.highlight table td { padding: 5px; } +.highlight table pre { margin: 0; } +.highlight, .highlight .w { + color: #000000; + background-color: #ffffff; +} +.highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cpf, .highlight .c1, .highlight .cs { + font-style: italic; +} +.highlight .cp { +} +.highlight .k, .highlight .kc, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kv { + font-weight: bold; +} +.highlight .kp { +} +.highlight .kt { +} +.highlight .o, .highlight .ow { + font-weight: bold; +} +.highlight .nc { + font-weight: bold; +} +.highlight .nn { + font-weight: bold; +} +.highlight .ne { + font-weight: bold; +} +.highlight .ni { + font-weight: bold; +} +.highlight .nt { + font-weight: bold; +} +.highlight .s, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .sr, .highlight .s1, .highlight .ss { + font-style: italic; +} +.highlight .sa { + font-weight: bold; +} +.highlight .si { + font-weight: bold; +} +.highlight .se { + font-weight: bold; +} +.highlight .gh { + font-weight: bold; +} +.highlight .gu { + font-weight: bold; +} +.highlight .ge { + font-style: italic; +} +.highlight .gs { + font-weight: bold; +} +.highlight .gp { + font-weight: bold; +} +.highlight .err { + color: #FF0000; +} diff --git a/ci/index.md b/ci/index.md index 00889d3..ec59086 100644 --- a/ci/index.md +++ b/ci/index.md @@ -1,4 +1,5 @@ -# Continuous Integration +--- +--- ## Outline diff --git a/completion/index.md b/completion/index.md index dc7d801..09f7a44 100644 --- a/completion/index.md +++ b/completion/index.md @@ -1,4 +1,6 @@ -# Completion +--- +--- + ## JsonRpc ### Implementing the spec ## Lsp diff --git a/conduct_.md b/conduct_.md new file mode 100644 index 0000000..c6634c2 --- /dev/null +++ b/conduct_.md @@ -0,0 +1,5 @@ +--- +permalink: /conduct/ +--- + +{% include rootfile.html filename='CODE_OF_CONDUCT.md' %} diff --git a/des/index.md b/des/index.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/des/index.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/diff/index.md b/diff/index.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/diff/index.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/editor/index.md b/editor/index.md index 8a660d9..785b101 100644 --- a/editor/index.md +++ b/editor/index.md @@ -1,4 +1,5 @@ -# A Text Editor +--- +--- [Example code](https://github.com/lukewilliamboswell/roc-ansi/blob/main/examples/text-editor.roc) diff --git a/favicon.svg b/favicon.svg new file mode 100644 index 0000000..6b362ce --- /dev/null +++ b/favicon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/finale/index.md b/finale/index.md index 2f6b6e3..5d43bdc 100644 --- a/finale/index.md +++ b/finale/index.md @@ -1 +1,6 @@ -# Conclusion +--- +--- + +- Best way to learn design is by examples +- What we've learned +- How to contribute diff --git a/ftp/index.md b/ftp/index.md index 30e82f5..a845151 100644 --- a/ftp/index.md +++ b/ftp/index.md @@ -1 +1,2 @@ -# File Transfer +--- +--- diff --git a/gallery/index.md b/gallery/index.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/gallery/index.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/glossary/index.md b/glossary/index.md index ca3c827..d9f6de9 100644 --- a/glossary/index.md +++ b/glossary/index.md @@ -1 +1,4 @@ -# Glossary +--- +--- + +{% include glossary.html %} diff --git a/governance_.md b/governance_.md new file mode 100644 index 0000000..425e75f --- /dev/null +++ b/governance_.md @@ -0,0 +1,5 @@ +--- +permalink: /governance/ +--- + +{% include rootfile.html filename='GOVERNANCE.md' %} diff --git a/index.md b/index.md index 9b6845e..cc53a69 100644 --- a/index.md +++ b/index.md @@ -1,20 +1,6 @@ -# Software Design by Example in Roc +--- +--- -- [Introduction](./intro/) - - Best way to learn design is by examples - - Why functional programming? - - Why scale models? - - How to set up - - Acknowledgments +

    Edited by {% include people.html githubs=site.editors %}

    -- [Conclusion](./finale/) - - What we've learned - - How to contribute - -- [A Text Editor](./editor/) - -- [References](./bib/) - - Books, articles, external links, etc. - -- [Glossary](./glossary/) - - Terms and definitions +{% include toc.html %} diff --git a/intro/index.md b/intro/index.md index e10b99d..fde1e14 100644 --- a/intro/index.md +++ b/intro/index.md @@ -1 +1,8 @@ -# Introduction +--- +--- + +- Why {% include gls_r.html key="functional_programming" text="functional programming" %}? +- Why scale models? +- Assume readers have already gone through {% include ref_r.html key="roc_tutorial" %} +- How to set up +- Acknowledgments diff --git a/json/index.md b/json/index.md new file mode 100644 index 0000000..07b09d0 --- /dev/null +++ b/json/index.md @@ -0,0 +1,4 @@ +--- +--- + +- quick reminder about {% include gls_r.html key="json" text="JSON" %} (mostly to show how glossary references work) diff --git a/license_.md b/license_.md new file mode 100644 index 0000000..fa91a60 --- /dev/null +++ b/license_.md @@ -0,0 +1,5 @@ +--- +permalink: /license/ +--- + +{% include rootfile.html filename='LICENSE.md' %} diff --git a/match/index.md b/match/index.md index 21ce3ac..602639e 100644 --- a/match/index.md +++ b/match/index.md @@ -1,4 +1,5 @@ -# Pattern Matching +--- +--- - Matching a simplified subset of regex grammar - Short background diff --git a/parser/index.md b/parser/index.md index f76dc5d..a845151 100644 --- a/parser/index.md +++ b/parser/index.md @@ -1 +1,2 @@ -# HTML Parser +--- +--- diff --git a/proptest/index.md b/proptest/index.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/proptest/index.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/references/index.md b/references/index.md new file mode 100644 index 0000000..7162651 --- /dev/null +++ b/references/index.md @@ -0,0 +1,4 @@ +--- +--- + +{% include references.html %} diff --git a/site.css b/site.css new file mode 100644 index 0000000..196eeb4 --- /dev/null +++ b/site.css @@ -0,0 +1,57 @@ +@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"); + +:root { + --faint-gray: #F0F0F0; + --light-gray: #E8E8E8; + --dark-gray: #D8D8D8; + + --lightborder: 1px; + --mediumborder: 2px; + --heavyborder: 5px; + + --page-width: 60rem; + + --code-size: 90%; + + --no-spacing: 0px; + --small-spacing: 0.25rem; + --medium-spacing: 0.5rem; + --large-spacing: 1rem; +} + +body { + max-width: var(--page-width); +} + +code { + font-family: "Source Code Pro", monospace; + font-size: var(--code-size); + background-color: var(--faint-gray); +} + +dl.glossary dt { + font-weight: bold; +} + +footer { + border-top: solid var(--light-gray) var(--mediumborder); + padding-top: var(--small-spacing); + text-align: center; +} + +html { + font-family: "Atkinson Hyperlegible", sans-serif; +} + +ol.appendices { + list-style-type: upper-latin; +} + +ol.chapters { + list-style-type: decimal; +} + +p.author { + font-style: italic; +} diff --git a/svg/index.md b/svg/index.md index 8ad41a6..d689962 100644 --- a/svg/index.md +++ b/svg/index.md @@ -1,4 +1,5 @@ -# SVG Rendering in Roc +--- +--- Rendering a subset of the SVG format in Roc. diff --git a/template/index.md b/template/index.md index 58a3bf6..0d6910b 100644 --- a/template/index.md +++ b/template/index.md @@ -1,4 +1,5 @@ -# Template +--- +--- ## Design - When the user runs `compile.roc`, we search for templates ending in `.rtl` (Roc Template Language) in the current directory and load them.