@@ -6,10 +6,162 @@ An open effort to structure learning resources with meaningful connections.
66
77Visit the deployed [ Clojure Civitas Website] ( https://clojurecivitas.github.io ) .
88
9- ## Contributing, Rationale and Design
9+ ## Rationale
1010
1111See [ About Clojure Civitas] ( https://clojurecivitas.github.io/about ) .
1212
13+
14+ ## Contributing
15+
16+ <div style =" text-align : center ; font-family : ' Georgia' , serif ; font-size : 1.5rem ; margin : 2rem 0 ; color : #2e7d32 ;" >
17+ Exploramus, Communicamus, Crescimus<br >
18+ <small style =" font-size : 1rem ; color : #555 ;" >We explore, we share, we grow.</small >
19+ </div >
20+
21+ Your perspective matters.
22+
23+ ### Build the database
24+
25+ Add to or modify [ db.edn] ( quarto/db.edn )
26+
27+ ### Write notebooks
28+
29+ Add a notebook in the [ ` /notebooks ` ] ( notebooks ) folder.
30+
31+ See the [ Clay Documentation] ( https://scicloj.github.io/clay ) for information on how to interactively visualize the
32+ notebook as you write it.
33+
34+ ### Preview the full website
35+
36+ ``` sh
37+ clojure -M:clay -a [:markdown]
38+ ```
39+
40+ ``` sh
41+ quarto preview site
42+ ```
43+
44+ ### Publish
45+
46+ Merged pull requests are shown on the website via a workflow.
47+
48+
49+ ## Design
50+
51+ Align with Clojure's values: simplicity, community, and tooling that helps you think.
52+
53+ ### Notebook Namespace Selection
54+
55+ A notebook’s namespace serves as a clear, unique path to its content and follows ** Clojure’s naming conventions** .
56+
57+ The namespace should emphasize ** what the notebook is about** , not how it is categorized.
58+ Think of it as a logical path that leads to a specific artifact or topic.
59+ Classification elements such as tags, author, document type, level, or publication date belong in ** metadata** , not the
60+ namespace.
61+
62+ - ** Start with an organization** if the notebook is about a library or tool maintained by one.
63+ Examples: ` scicloj ` , ` lambdaisland ` .
64+ - ** Follow with the specific library or concept.**
65+ Examples: ` scicloj.clay ` , ` lambdaisland.kaocha ` .
66+ - If there is ** no organization** , start directly with the library or tool name.
67+ Examples: ` hiccup ` , ` reagent ` .
68+ If the notebook refers to an alternative implementation, ** include the organization** to disambiguate.
69+ Example: ` lambdaisland.hiccup ` .
70+ - For ** core Clojure topics** , use ` clojure ` as the root.
71+ Examples: ` clojure.lazy-sequences ` , ` clojure.transducers ` .
72+ - Add ** segments** to describe the notebook’s content. These segments should:
73+ - Avoid name collisions.
74+ - Not duplicate metadata.
75+ - The last segment should be specific and descriptive. Prefer: ` z-combinator-gambit ` , avoid: ` z-combinator ` .
76+ - ** Events, communities, or topics** may also be used as the top-level namespace when appropriate.
77+ Use discretion to determine whether a notebook is primarily about an artifact library,
78+ a concept, or an event.
79+ - Namespaces must consist of more than one segment.
80+
81+ #### Metadata and Navigation
82+
83+ It may feel unintuitive not to group related content (e.g. an author’s blog series) by directory or namespace.
84+ But this structure is intentional.
85+ Linear sequences (e.g. blog posts by an author) will be ** reconstructed from metadata** , not filenames or folders.
86+ For example, a page showing all blog posts by an author is generated by filtering for ` author ` , ` type = post ` , and
87+ ` date ` , and then ordering by date.
88+
89+ Namespaces prioritize ** logical addressing** over ontological hierarchy.
90+ This promotes flexibility at the cost of tidiness, but enables richer discovery through metadata and search.
91+
92+ Differentiation between posts, pages, and presentations is by ` type ` metadata (a Quarto page type convention).
93+
94+ #### Examples
95+
96+ | Namespace | Description |
97+ | ----------------------------------------------------------------| ---------------------------------------------------------------|
98+ | ` scicloj.clay.clojure-notebooks-for-pythonistas ` | Introduction to Clay for Python programmers. |
99+ | ` lambdaisland.kaocha.customization-tips-and-tricks ` | Tips for fast iteration with Kaocha. |
100+ | ` lambdaisland.kaocha.up-and-running-on-ubuntu ` | Kaocha setup guide for Ubuntu. |
101+ | ` clojure.transducers.how-it-works-explained-with-diagrams ` | Explains transducers with diagrams. |
102+ | ` clojure.lazy-sequences.detailed-explanation-by-example ` | In-depth example-driven guide to lazy sequences. |
103+ | ` clojure-conj.2023.state-of-clojure.notes-from-the-backrow ` | Notes on the "State of Clojure" talk at Clojure/Conj 2023. |
104+ | ` hiccup.basic-html-generation ` | Tutorial on generating HTML with Hiccup. |
105+ | ` algorithms.graph.layout.force-directed-spring-simulation ` | On force-directed graph layout algorithms (library-agnostic). |
106+ | ` data-structures.datoms.all-about-eavt ` | EAVT indexing, not tied to any vendor. |
107+ | ` clojure.deps-edn.monorepo-setup-in-detail ` | Monorepo setup using ` deps.edn ` . |
108+ | ` cursive.super-easy-debugging-techniques ` | Debugging in Cursive IDE, for beginners. |
109+ | ` cognitect.datomic.cloud.how-we-scale-to-5million-users ` | Datomic Cloud scaling case study. |
110+ | ` reagent.component-lifecycle.a-tale-of-life-death-and-rebirth ` | A whimsical take on Reagent component lifecycles. |
111+
112+ ### File system organization
113+
114+ | Directory | Description |
115+ | --------------------------------| ----------------------------------------------------------------------|
116+ | ` src ` | Code for building a website and database |
117+ | ` notebooks ` | Source root for notebooks (Clojure and Markdown), images, data files |
118+ | ` site ` | Static assets of the Quarto website |
119+
120+ Non-Clojure files in ` notebooks ` will be synced to ` site ` .
121+ Shared images can go in ` images ` , but prefer placing images and data files as siblings to your namespace under ` notebooks ` .
122+ All Clojure and Non-Clojure files in ` notebooks ` should go under a subdirectory,
123+ so that it is clear they are not part of the static configuration of ` site ` .
124+ When building the site, Clojure namespaces are built to markdown files under ` site/{my/namespaced/notebook.qmd} ` .
125+ Subdirectories of ` site ` are gitignored and considered temporary build artifacts, safe to clean up.
126+ Quarto builds all the markdown into HTML in ` _site ` for preview and deploy.
127+ While developing, Clay uses ` temp ` to build and serve HTML files.
128+
129+ Goal: Align with Clojure’s code organization while allowing organic, practical growth.
130+
131+ ### Topic organization
132+
133+ Follow the Quarto convention of categories, tags, and keywords.
134+ Fixed categories; ` community ` , ` algorithms ` , ` data ` , ` systems ` , ` libs ` , ` concepts ` .
135+ Tags; flexible, open-ended for finer-grained labeling (e.g. ` frontend ` , ` reagent ` ).
136+ Keywords; for SEO or search indexing; typically fewer and focused on discoverability.
137+
138+ Tags and metadata are the preferred organization principle:
139+ [ Categories, Links, and Tags] ( https://gwern.net/doc/philosophy/ontology/2005-04-shirky-ontologyisoverratedcategorieslinksandtags.html )
140+
141+ Goal: Constellations, not cabinets.
142+
143+ ### Dependency management
144+
145+ A single ` deps.edn ` file is shared across all notebooks.
146+
147+ Pros:
148+
149+ * Simplifies website builds.
150+ * Works for authoring as well as building.
151+
152+ Cons:
153+
154+ * Version conflicts must be manually resolved.
155+ * Only one version per dependency.
156+ * Notebooks aren’t self-contained.
157+
158+ Future:
159+
160+ * Support additional directories under ` standalone ` with their own ` deps.edn ` .
161+ * Regression testing would help when versions update.
162+
163+ Goal: Minimize friction in authoring while ensuring publishable reproducibility.
164+
13165## License
14166
15167Copyright © 2025 Timothy Pratley
0 commit comments