11# Clojure Civitas
22
3- <img src =" notebooks /images/civitas-icon.svg" alt =" Civitas Icon " align =" right " >
3+ <img src =" src /images/civitas-icon.svg" alt =" Civitas Icon " align =" right " >
44
5- An open effort to structure learning resources with meaningful connections .
5+ Think. Code. Share .
66
77⚡ No setup – Clone this repo, make a new namespace, start coding.
88
@@ -12,7 +12,7 @@ An open effort to structure learning resources with meaningful connections.
1212
1313🧠 Build shared knowledge – Your work becomes part of a community resource.
1414
15- 🧪 Use Clay – Your normal REPL workflow, but with tables, charts, markdown, and hiccup.
15+ 🧪 Visualize – Your normal REPL workflow, but with tables, charts, markdown, and hiccup.
1616
1717## Rationale
1818
@@ -21,20 +21,24 @@ An open effort to structure learning resources with meaningful connections.
2121
2222See [ About Clojure Civitas] ( https://clojurecivitas.github.io/about ) .
2323
24+ Why markdown in code? We value reproducible artifacts.
25+
2426## Contributing
2527
2628Your perspective matters.
2729Pull Requests invited, that's the point!
2830
29- ### Creating notebooks
31+ ### Creating Posts and Pages
3032
31- Add a Clojure namespace or markdown file in the [ ` /notebooks ` ] ( notebooks ) folder.
33+ Add a Clojure namespace or markdown file in the [ ` /src ` ] ( src ) folder.
3234
3335Add metadata on your namespace to set the title, author, and tags.
36+
3437``` clojure
35- ^{:kindly/hide-code true ; don't show this code in the notebook
38+ ^{:kindly/hide-code true ; don't render this code to the HTML document
3639 :clay {:title " About Civitas Metadata"
3740 :quarto {:author :my-unique-id
41+ :draft true ; remove to publish
3842 :type :post
3943 :date " 2025-06-05"
4044 :category :clojure
@@ -45,11 +49,11 @@ Add metadata on your namespace to set the title, author, and tags.
4549Configure your author profile in [ clay.edn] ( clay.edn ) .
4650
4751Images can be added to the same folder as the namespace,
48- and displayed in the notebook with markdown like `  ` .
52+ and displayed with markdown like ` ;; ` .
4953The first image on the page is used as a preview in the blog listing,
5054unless a different image is listed in the metadata.
5155
52- [ Kindly] ( https://scicloj.github.io/kindly-noted/kindly ) annotations in your notebook are rendered as visualizations.
56+ [ Kindly] ( https://scicloj.github.io/kindly-noted/kindly ) annotations are rendered as visualizations.
5357
5458``` clojure
5559^kind/table
@@ -59,9 +63,14 @@ unless a different image is listed in the metadata.
5963 :many-others [" see the examples" " creative uses" " visual variety" ]}
6064```
6165
62- ** Optional:** [ Setup your editor with Clay shortcuts] ( https://scicloj.github.io/clay/#setup ) to visualize the notebook as you write.
66+ ## Preview the Website ** (Optional)**
67+
68+ [ Use Clay REPL commands] ( https://scicloj.github.io/clay/#setup ) to visualize the namespace as you write.
6369
64- ** Optional:** Preview the final website.
70+ Building is delegated to Clay and Quarto.
71+
72+ When using Clay interactively it renders directly to HTML for speed.
73+ The published site goes through a longer process of producing markdown then HTML.
6574
6675``` sh
6776clojure -M:clay -a [:markdown]
@@ -75,56 +84,56 @@ quarto preview site
7584
7685### Publish
7786
78- Merged pull requests are automatically shown on the website.
79-
80- To create a pull request
87+ Create a pull request:
8188
82891 . fork the repository
83- 2 . make and commit changes in a new branch
90+ 2 . make changes in a new branch and commit them
84913 . push the branch to your fork
85- 4 . and then open a pull request on GitHub to propose merging your changes into the Civitas main branch.
92+ 4 . open a pull request
8693
87- Please contact [ @timothypratley ] ( https://github.com/timothypratley ) if you are having any difficulty submitting a notebook.
94+ Your pull request will be reviewed to prevent abuse and then merged.
95+ Once merged, namespaces are automatically published to the website.
8896
89- ### See your page views
97+ Please contact [ @ timothypratley ] ( https://github.com/timothypratley ) if you are having any difficulty submitting a PR.
9098
91- Publicly available [ page view analytics ] ( https://clojurecivitas.goatcounter.com/ ) indicate how widely your notebook is being shared.
99+ ### Check Your Page Views
92100
93- ### Building the database
101+ Publicly available [ page view analytics ] ( https://clojurecivitas.goatcounter.com/ ) indicate how widely your idea is being shared.
94102
95- Add to or modify [ db.edn] ( quarto/db.edn ) .
103+ ### Editing the Civitas Explorer Database
104+
105+ An open effort to structure learning resources with meaningful connections.
106+ Add to or modify [ site/db.edn] ( site/db.edn ) .
96107The goal is to create a database of resources for learning.
108+ See the [ explorer] ( https://clojurecivitas.github.io/civitas/explorer.html ) .
97109
98110## Design
99111
100112Align with Clojure's values: simplicity, community, and tooling that helps you think.
101113
102- ### Notebook Namespace Selection
114+ ### Namespace Selection
103115
104- A notebook’s namespace serves as a clear, unique path to its content and follows ** Clojure’s naming conventions** .
116+ A namespace serves as a clear, unique path to its content and follows ** Clojure’s naming conventions** .
105117
106- The namespace should emphasize ** what the notebook is about** , not how it is categorized.
118+ The namespace should emphasize ** what the narrative is about** , not how it is categorized.
107119Think of it as a logical path that leads to a specific artifact or topic.
108120Classification elements such as tags, author, document type, level, or publication date belong in ** metadata** , not the
109121namespace.
110122
111- - ** Start with an organization** if the notebook is about a library or tool maintained by one.
123+ - ** Start with an organization** if the narrative is about a library or tool maintained by one.
112124 Examples: ` scicloj ` , ` lambdaisland ` .
113125- ** Follow with the specific library or concept.**
114- Examples: ` scicloj.clay ` , ` lambdaisland.kaocha ` .
126+ Examples: ` scicloj.clay ` , ` lambdaisland.kaocha ` , ` lambdaisland.hiccup ` .
115127- If there is ** no organization** , start directly with the library or tool name.
116128 Examples: ` hiccup ` , ` reagent ` .
117- If the notebook refers to an alternative implementation, ** include the organization** to disambiguate.
118- Example: ` lambdaisland.hiccup ` .
119129- For ** core Clojure topics** , use ` clojure ` as the root.
120130 Examples: ` clojure.lazy-sequences ` , ` clojure.transducers ` .
121- - Add ** segments** to describe the notebook’s content . These segments should:
131+ - Add ** segments** to further qualify the namespace . These segments should:
122132 - Avoid name collisions.
123133 - Not duplicate metadata.
124- - The last segment should be specific and descriptive. Prefer: ` z-combinator-gambit ` , avoid: ` z-combinator ` .
134+ - The last segment should be extra specific and descriptive. Prefer: ` z-combinator-gambit ` , avoid: ` z-combinator ` .
125135- ** Events, communities, or topics** may also be used as the top-level namespace when appropriate.
126- Use discretion to determine whether a notebook is primarily about an artifact library,
127- a concept, or an event.
136+ Use discretion to determine if the narrative is primarily about an artifact library, a concept, or an event.
128137- Namespaces must consist of more than one segment.
129138
130139#### Metadata and Navigation
@@ -160,19 +169,18 @@ Differentiation between posts, pages, and presentations is by `type` metadata (a
160169
161170### File system organization
162171
163- | Directory | Description |
164- | -------------| ----------------------------------------------------------------------|
165- | ` src ` | Code for building a website and database |
166- | ` notebooks ` | Source root for notebooks (Clojure and Markdown), images, data files |
167- | ` site ` | Static assets of the Quarto website |
172+ | Directory | Description |
173+ | -----------| --------------------------------------------------------------|
174+ | ` src ` | Source root for namespaces, markdown, images, and data files |
175+ | ` site ` | Static assets of the Quarto website |
168176
169- Non-Clojure files in ` notebooks ` will be synced to ` site ` .
170- Shared images can go in ` images ` , but prefer placing images and data files as siblings to your namespace under
171- ` notebooks ` .
172- All Clojure and Non-Clojure files in ` notebooks ` should go under a subdirectory,
177+ Non-Clojure files in ` src ` will be synced to ` site ` .
178+ Shared images can go in ` src/ images` ,
179+ but prefer placing images and data files as siblings to your namespace under ` src ` .
180+ All files in ` src ` should go under a subdirectory,
173181so that it is clear they are not part of the static configuration of ` site ` .
174- When building the site, Clojure namespaces are built to markdown files under ` site/{my/namespaced/notebook .qmd} ` .
175- Subdirectories of ` site ` are gitignored and considered temporary build artifacts, safe to clean up.
182+ Clojure namespaces are built to markdown files under ` site/{my/namespaced/awesome-idea .qmd} ` .
183+ Subdirectories of ` site ` are git ignored and considered temporary build artifacts, safe to clean up.
176184Quarto builds all the markdown into HTML in ` _site ` for preview and deploy.
177185While developing, Clay uses ` temp ` to build and serve HTML files.
178186
@@ -192,7 +200,7 @@ Goal: Constellations, not cabinets.
192200
193201### Dependency management
194202
195- A single ` deps.edn ` file is shared across all notebooks .
203+ A single ` deps.edn ` file is shared.
196204
197205Pros:
198206
@@ -203,7 +211,7 @@ Cons:
203211
204212* Version conflicts must be manually resolved.
205213* Only one version per dependency.
206- * Notebooks aren’t self-contained.
214+ * Pages and posts aren’t self-contained.
207215
208216Future:
209217
0 commit comments