Cwik (pronounced ‘quick’) is an editable documentation web site (wiki) that is quite different from what has been done before.
An optional header can be included in the following format
<div class="cwikmeta">
{
"title": "CWIK",
"related":["/somepage.md","http://some.full/link"]
} </div>
The title appears in the browser’s top bar. Related links appear on the cwik quick bar (generally located on the left).
The first italicized statement and the first image to appear in the document will be used as preview data for sites (typically social media) that display summaries, following the opengraph protocol. See https://ogp.me/ for more info on these headers.
CWIK markdown is enhanced by some common open source extensions.
These quick examples can be used as templates. Each example begins with what it will look like, and then the raw .md is included below. Note that in a few cases it is very difficult to include the .md control sequences. In these cases they are described.
Full Documentation
The Gamma function satisfying Γ(n)=(n−1)!∀n∈N is via the Euler integral
Γ(z)=∫0∞tz−1e−tdt.
The *Gamma function* satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via the Euler integral
$$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$
The extremely-common MD table extension is supported.
Column Title | Column Title1 |
---|---|
text | text |
text | text |
| Column Title | Column Title1 |
| ----------- | ----------- |
| text | text |
| text | text |
To add a flowchart use literal text annotated with mermaid. Full Documentation
These examples need to be surrounded by 3 back-ticks and word “mermaid” like this:
```mermaid
graph LR
A[Square Rect] -- paren type controls shape --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
```
graph BT
A["bottom"] == Link text ==> B[TOP]
style B fill:#906,stroke:#333,stroke-width:2px;
style A fill:#ff6,stroke:#333,stroke-width:8px;
graph RL
%% Comments after double percent signs
A(("(){}[]"))-->B>";place special chars in quotes"]
This is also a mermaid extension so the following text needs the ```mermaid prefix, and ``` suffix.
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
Your changes accumulate in local storage on the server. Press the “commit” button (upper right) to commit all edits.
Look here: https://github.com/bitcoin-unlimited/BUwiki to see the backing repository.
TBD
To be implemented
This system is able to integrate multiple Git-hosted repositories. A typical configuration would be one documentation focused repository and multiple source repositories. These source repositories can provide inline documentation that is extracted via various documentation generators (subsequently called “codedoc”) and provide access to “raw” source code.
Linking between documentation and code/codedoc or codedoc to codedoc occurs via a special syntax that allows references to code blocks, is tolerant of some code reorganizations, and identifies and records broken links for human repair.
There is a processing step to convert these links to .md format. So the full source data preparation steps are: