@@ -22,10 +22,11 @@ Think. Code. Share.
2222
2323## Rationale
2424
25+ Literate programming is fun.
26+ We want more people to experience it.
2527Why markdown in code? We value reproducible artifacts.
2628
27- See [ Clojure Civitas Rationale] ( https://clojurecivitas.github.io/about#rationale ) .
28-
29+ See [ Clojure Civitas Rationale] ( https://clojurecivitas.github.io/about#rationale ) for more detail.
2930
3031## Contributing
3132
@@ -53,6 +54,11 @@ Add metadata on your namespace to set the title, author, and tags.
5354(ns my.namespace.example )
5455```
5556
57+ [ !TIP]
58+ The ` :draft true ` flag keeps it out of the posts list, but it will be available as a draft which can only be viewed by using the full URL.
59+ This can help if you aren't confident about the posting process or would like feedback before sharing.
60+ Otherwise, I recommend going YOLO and not worrying about drafts.
61+
5662Configure your author profile in [ site/db.edn] ( site/db.edn ) .
5763
5864Images can be added to the same folder as the namespace,
@@ -70,16 +76,48 @@ unless a different image is listed in the metadata.
7076 :many-others [" see the examples" " creative uses" " visual variety" ]}
7177```
7278
73- ## Preview a Webpage ** (Optional, Recommended)**
79+ ### Preview a Webpage ** (Optional, Recommended)**
80+
81+ Clay is ready to interactively render your namespace as HTML, you just need to ask it to "Clay Make File".
82+
83+ ** REPL commands to render as you write**
84+
85+ | Editor | Integration Details |
86+ | ----------| -------------------------------------------------------------------------------------|
87+ | Cursive | "Clay Make File" and similar REPL commands added automatically |
88+ | Calva | Install "Calva Power Tools" extension for "Clay Make File" and similar commands |
89+ | Emacs | See [ clay.el] ( https://github.com/scicloj/clay.el ) |
90+ | Neovim | See [ clay.nvim] ( https://github.com/radovanne/clay.nvim ) |
91+
92+ ** CLI alternative**
93+
94+ If you prefer not to use editor integration, you can run:
95+
96+ ```
97+ clojure -M:clay
98+ ```
7499
75- [ Use Clay REPL commands] ( https://scicloj.github.io/clay/#setup ) to visualize the namespace as you write.
76- When using Clay interactively it renders directly to HTML for speed.
100+ Will live reload your changes (see [ command line] ( https://scicloj.github.io/clay/#cli ) for more details)
77101
78- ## Previewing the Website with Quarto ** (Optional, Not Recommended)**
102+ ** REPL alternative**
103+
104+ If you prefer invoking Clay from the REPL,
105+ see [ scicloj.clay.v2.snippets/make-ns-html!] ( https://github.com/scicloj/clay/blob/main/src/scicloj/clay/v2/snippets.clj )
106+ and the [ Clay API documentation] ( https://scicloj.github.io/clay/#api ) .
107+
108+ ### Previewing the Website with Quarto ** (Optional, Not Required)**
79109
80110The published site goes through a longer process of producing markdown then HTML.
81111[ Quarto] ( https://quarto.org/ ) is the markdown publishing tool.
82112
113+ ** Using editor integration**
114+
115+ You can use the "Clay Make File Quarto" command to generate the necessary files via Quarto.
116+ It takes a little bit longer, but will show the styles of the published site.
117+ You may need to do a preparatory command-line markdown build once to get the necessary files in place.
118+
119+ ** Using the command line**
120+
83121``` sh
84122clojure -M:clay -A:markdown
85123```
@@ -105,7 +143,8 @@ Create a pull request:
1051433 . push the branch to your fork
1061444 . open a pull request
107145
108- Your pull request will be reviewed to prevent abuse and then merged.
146+ Your pull request will be quickly reviewed to prevent abuse and then merged.
147+ Reviews are minimal, our goal is to get your changes published ASAP.
109148Once merged, namespaces are automatically published to the website.
110149
111150Please contact [ @timothypratley ] ( https://github.com/timothypratley ) if you are having any difficulty submitting a PR.
@@ -121,6 +160,15 @@ Add to or modify [site/db.edn](site/db.edn).
121160The goal is to create a database of resources for learning.
122161See the [ explorer] ( https://clojurecivitas.github.io/civitas/explorer.html ) .
123162
163+ ### Large data, slow calculations, private credentials
164+
165+ You can render a ` qmd ` file locally (see preview instructions above).
166+ If you ` git add -f site/my-ns/my-post.qmd ` ,
167+ it will prevent the source ` src/my-ns/my-post.clj ` file from executing in the publish process.
168+ Only you will run the code locally (where you have secrets and large files available).
169+
170+ See [ Some notebooks should only be run locally] ( https://clojurecivitas.github.io/scicloj/clay/skip_if_unchanged_example.html ) for more detail.
171+
124172## Design
125173
126174Align with Clojure's values: simplicity, community, and tooling that helps you think.
@@ -134,19 +182,19 @@ Think of it as a logical path that leads to a specific artifact or topic.
134182Classification elements such as tags, author, document type, level, or publication date belong in ** metadata** , not the
135183namespace.
136184
137- - ** Start with an organization** if the narrative is about a library or tool maintained by one.
185+ - ** Start with an organization** if the narrative is about a library or tool maintained by one.
138186 Examples: ` scicloj ` , ` lambdaisland ` .
139- - ** Follow with the specific library or concept.**
187+ - ** Follow with the specific library or concept.**
140188 Examples: ` scicloj.clay ` , ` lambdaisland.kaocha ` , ` lambdaisland.hiccup ` .
141- - If there is ** no organization** , start directly with the library or tool name.
189+ - If there is ** no organization** , start directly with the library or tool name.
142190 Examples: ` hiccup ` , ` reagent ` .
143- - For ** core Clojure topics** , use ` clojure ` as the root.
191+ - For ** core Clojure topics** , use ` clojure ` as the root.
144192 Examples: ` clojure.lazy-sequences ` , ` clojure.transducers ` .
145193- Add ** segments** to further qualify the namespace. These segments should:
146194 - Avoid name collisions.
147195 - Not duplicate metadata.
148196 - The last segment should be extra specific and descriptive. Prefer: ` z-combinator-gambit ` , avoid: ` z-combinator ` .
149- - ** Events, communities, or topics** may also be used as the top-level namespace when appropriate.
197+ - ** Events, communities, or topics** may also be used as the top-level namespace when appropriate.
150198 Use discretion to determine if the narrative is primarily about an artifact library, a concept, or an event.
151199- Namespaces must consist of more than one segment.
152200
@@ -167,18 +215,9 @@ Differentiation between posts, pages, and presentations is by `type` metadata (a
167215
168216| Namespace | Description |
169217| -------------------------------------------------------------------------| ---------------------------------------------------------------|
170- | ` scicloj.clay.clojure-notebooks-for-pythonistas ` | Introduction to Clay for Python programmers. |
171218| ` lambdaisland.kaocha.customization-tips-and-tricks ` | Tips for fast iteration with Kaocha. |
172- | ` lambdaisland.kaocha.up-and-running-on-ubuntu ` | Kaocha setup guide for Ubuntu. |
173- | ` clojure.transducers.how-it-works-explained-with-diagrams ` | Explains transducers with diagrams. |
174219| ` clojure.lazy-sequences.detailed-explanation-by-example ` | In-depth example-driven guide to lazy sequences. |
175- | ` conferences.clojure-conj-2023.state-of-clojure.notes.from-the-backrow ` | Notes on the "State of Clojure" talk at Clojure/Conj 2023. |
176- | ` hiccup.basic-html-generation ` | Tutorial on generating HTML with Hiccup. |
177220| ` algorithms.graph.layout.force-directed-spring-simulation ` | On force-directed graph layout algorithms (library-agnostic). |
178- | ` data-structures.datoms.all-about-eavt ` | EAVT indexing, not tied to any vendor. |
179- | ` clojure.deps-edn.monorepo-setup-in-detail ` | Monorepo setup using ` deps.edn ` . |
180- | ` cursive.super-easy-debugging-techniques ` | Debugging in Cursive IDE, for beginners. |
181- | ` cognitect.datomic.cloud.how-we-scale-to-5million-users ` | Datomic Cloud scaling case study. |
182221| ` reagent.component-lifecycle.a-tale-of-life-death-and-rebirth ` | A whimsical take on Reagent component lifecycles. |
183222
184223### File system organization
@@ -215,6 +254,7 @@ Goal: Constellations, not cabinets.
215254### Dependency management
216255
217256A single ` deps.edn ` file is shared.
257+ Contributors are encouraged to add dependencies as needed.
218258
219259Pros:
220260
@@ -234,13 +274,9 @@ Future:
234274
235275Goal: Minimize friction in authoring while ensuring publishable reproducibility.
236276
237- ## Large data, slow calculations, private credentials
238-
239- If you add a qmd file under the ` site ` directory,
240- it will prevent the source ` clj ` file from executing.
241- This allows you to only run the code locally.
277+ ## Deployment
242278
243- See [ Some notebooks should only be run locally ] ( https://clojurecivitas.github.io/scicloj/clay/skip_if_unchanged_example.html ) for more information.
279+ See [ .github/workflows/render-and-publish.yml ] ( .github/workflows/render-and-publish.yml )
244280
245281## License
246282
0 commit comments