Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ourbigbook/ourbigbook
https://OurBigBook.com source code + a compatible local CLI static wiki generator and markup language to write complex structured wikis/books/blogs with reference implementation in JavaScript.
https://github.com/ourbigbook/ourbigbook
javascript markup-language nodejs static-site-generator wiki
Last synced: 3 months ago
JSON representation
https://OurBigBook.com source code + a compatible local CLI static wiki generator and markup language to write complex structured wikis/books/blogs with reference implementation in JavaScript.
- Host: GitHub
- URL: https://github.com/ourbigbook/ourbigbook
- Owner: ourbigbook
- License: agpl-3.0
- Created: 2019-09-27T10:03:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T15:39:56.000Z (6 months ago)
- Last Synced: 2024-05-22T16:33:45.007Z (6 months ago)
- Topics: javascript, markup-language, nodejs, static-site-generator, wiki
- Language: JavaScript
- Homepage: https://ourbigbook.com
- Size: 8.41 MB
- Stars: 55
- Watchers: 3
- Forks: 5
- Open Issues: 129
-
Metadata Files:
- Readme: README.bigb
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
= OurBigBook Project
{c}
{id=ourbigbook}= OurBigBook Project
{c}
{synonym}\b[https://OurBigBook.com[]]: The \b[OurBigBook Project] is creating the ultimate tools to \b[textbooks]/\b[<#personal knowledge bases>]/\b[<#Zettelkasten>]/\b[<#digital gardens>] in the <#learn in public> philosophy. It is our best shot yet at the final \b[real-world <#Encyclopedia Galactica>] by allowing effective \b[<#mindmeld>[mind melding]]/\b[<#collective intelligence>] via the \b[].
\Image[logo.svg]
{height=150}
{title=[Logo of] the }\b[Mission]: to live in a world where you can learn university-level #mathematics{p=1}, #physics{p=1}, <#chemistry>, #biology and #engineering from perfect free open source books that anyone can write to get famous.
\b[Ultimate goal]: destroy the currently grossly inefficient education system and replace it with a much more inspiring system where people learn what they want as fast as possible to reach their goals faster without so much useless pain.
\b[How to get there]: [create a website] (live at \b[https://OurBigBook.com[]]) that incentivizes learners (notably university students taking courses) to write freely licensed university-level natural science books in their own words for free. Their motivation for doing that are:
* getting their knowledge globally recognized and thus better jobs
* improving the world
* learning by teaching\Video[https://www.youtube.com/watch?v=7JOJYx0mmhg]
{title=Introduction to the }
{height=500}\b[Notable features]:
\Ol[
* \b[]: groups the articles of different users about the same topic, sorted by upvote to achieve <#mindmeld>[mind melding]/<#collective intelligence>. This makes your articles easier for others to find.\Image[feature/topics/derivative.png]
{title=The allows you to find the best version of a subject written by other users user}
{description=Live demo: <#derivative>.}
{provider=github}
{height=800}
{border}\Video[https://www.youtube.com/watch?v=54nxjC9BWTg]
{title= demo}
{disambiguate=intro}
{height=700}
{width=700}
* \b[local editing]: you can store all your <#personal knowledge base> content locally in a [plaintext markup format] that can be edited locally and with to either:
* \b[to ]: to get awesome multi-user features like
* \b[as HTML files to a ]: you can host yourself for free on many external providers like , and remain in full control
This way you can be sure that even if were to go down one day (which we have no plans to as it is quite cheap to host!), your content will still be perfectly readable as a static site.\Image[feature/local-editing/bigb-publish-to-web-or-static-editor-logos.svg]
{title=With OurBigBook you can local [lightweight markup files] to either or as a }
{provider=github}
{height=600}
{disambiguate=intro}\Video[https://www.youtube.com/watch?v=Ghvlztiu6rI]
{title=Edit locally and demo}
{disambiguate=intro}
{description=This shows editing and it using the extension.}
{height=720}
{width=720}
]\b[Key links]:
* https://OurBigBook.com[]: reference instance
* donate to the OurBigBook Project:
* project announcements: {full}. Also posted in shorter form to {full} such as:
* https://twitter.com/OurBigBook[]
* https://mastodon.social/@OurBigBook
* https://cirosantilli.com/ourbigbook-com[]: further rationale behind the project by the founder
* https://cirosantilli.com[]: showcase static demo document with interesting content, published with . Primary inspiration for OurBigBook development.
* https://cirosantilli.com/oxford-nanopore-river-bacteria[]: a self-contained tutorial style part of the above. Note how internal links integrate seamlessly into the more global topic of biology, e.g. when talking about DNA we link to the global topic https://cirosantilli.com/dna[].
* https://github.com/cirosantilli/cirosantilli.github.io[] and https://github.com/cirosantilli/cirosantilli.github.io/blob/dev/oxford-nanopore-river-bacteria.bigb[]: source of the above showcase documents
* {full}: and feature overview
* https://github.com/ourbigbook/ourbigbook[]: OurBigBook source code
* https://github.com/ourbigbook/ourbigbook/issues[]: project issue tracker
* https://github.com/ourbigbook/ourbigbook/blob/master/README.bigb[]: source for this document
* https://docs.ourbigbook.com[]: rendered version of this document
* https://docs.ourbigbook.com/_obb/dist/editor[]: live in-browser editor demo
* https://github.com/ourbigbook/template[]: good template to get started with , see {full}
* https://ourbigbook.github.io/template[]: the above
* https://cirosantilli.com/ourbigbook-media[]: media for the project such as for documentation and , more info: {full}= Donate
{parent=OurBigBook}To donate:
* https://cirosantilli.com/sponsor[]: give money directly to
* buy project merchandise, see: {full}All donated money currently just goes directly to 's personal bank account, the project founder and current lead. If things ever take off we will set up a legal entity to make things cleaner. One may dream. But for now, it would just add unnecessary overhead. Related: {full}.
Ciro announces funding milestones and transparently accounts for all donations at: https://cirosantilli.com/sponsor[]. When milestones are reached, he quits his day job and works full time on the project for a given ammount of time.
We are also happy to discuss paid contracts to implement specific features, to get in touch see: .
= Quick start
{parent=OurBigBook}The following sections cover different ways to use tools from the OurBigBook:
* : manual for , the dynamic website. With this approach, you can write content on the browser without downloading anything, and save it on our database.
* convert local `.bigb` files with either:
*
*
This method allows you to publish either as:
* a
* to
* : covers specifically , which is the markup language you use to write content in OurBigBook, both and .This is currently the only way to write OurBigBook content, but we would really like to add [WYSIWYG] editor support one day!
= OurBigBook Markup and CLI overview
{parent=OurBigBook}= Features
{parent=OurBigBook Markup and CLI overview}* to any (including e.g. h2, h3, etc. [in other files]), , etc. with amazing [error checking and reporting]: never break internal links without knoing again, and quickly find out what broke when you do. E.g.:
animal.bigb
``
= Animalare .
``
Mammal.bigb
``
= Flying animal== Bat
``
`Animal.bigb` would render something like:
``
Bats are flying animals.
``
The following would fail and point you out the file and line of the failure:
* nonexistent id:
``
``
* duplicate IDs:
``
= Animal== Dog
== Cat
== Dog
``
* https://katex.org/[KaTeX] server side , works on browsers with JavaScript disabled:
``
I like $\sqrt{2}$, but I adore this \x[equation-quadratic-equation]:$$
x^2 + 2x + 1
$$
{title=Quadratic equation}
``
* multi-file features out of the box so you don't need a separate wrapper like Jekyll to make a multi-page website:
*
* single-source multi-format output based on and build options:
* by default, one HTML per source with includes rendered as links between pages, e.g.:README.bigb
``
= My website== h2
\Include[not-readme]
``
not-readme.bigb
``
= Not readme== Not readme h2
``
produces `index.html` and `not-readme.html`
* with the option, you can output each header of an input file into a separate output file. The previous filesystem would produce:
* `index.html`: which contains the full `README.bigb` output
* `split.html`: split version of the above containing only the `= My website` header and not `h2`
* `h2.html`: only contains the `h2` header
* `not-readme.html` contains the full output of `not-readme.bigb`
* `not-readme-split.html`: only contains the `= Not readme` header
* `not-readme-h2.html`: only contains the `= Not readme h2` header
Each of those pages automatically gets a
* <--embed-includes> single file output from multiple input files. Includes are parsed smartly, not just source copy pasted, e.g. included headers are shifted from `h1` to `h2` correctly.On the previous sample filesystem, it would produce a single output file `index.html` which would contain a header structure like:
``
= My website== h2
=== Not readme
==== Not readme h2
``
* supports both local serverless rendering to HTML files for local viewing, and server oriented rendering such as GitHub pages, e.g. automatically get `.html` extension and or not. E.g.:
* locally, a link `\x[not-readme]` would render as `` and `not-readme.bigb` produces `not-readme.html`
* when publishing, `\x[not-readme]` would render as `` and `not-readme.bigb` also produces `not-readme.html`, which the server converts to just `http://my-website.com/not-readme`
* cross file configuration files to factor out common page parts like headers, footers and other metadata, e.g.:
* `ourbigbook.liquid.html`: https://github.com/Shopify/liquid[Liquid template] used for all pages, see example at: {full}
* `main.scss`: CSS stylesheet generated from https://sass-lang.com/[SASS] input, see example at: {full}
* `ourbigbook.tex`: global LaTeX math definitions, e.g.:
``
\newcommand{\abs}[1]{\left|#1\right|}
``
and then you can use:
``
$\abs{x}$
``
in any .bigb file of the project.
* : per repository configuration options
* that crosses input files via includes. E.g. in:README.bigb
``
= My website== h2
\Include[not-readme]
``
not-readme.bigb
``
= Not readme== Not readme h2
``
the table of contents for `index.html` also contains the headers for `not-readme.bigb` producing:
* My website
* h2
* Not readme
* Not readme h2
This means that you can split large <\H splitDefault argument>[splitDefault] input files if rendering starts to slow you down, and things will still render exactly the same.
* check that local files and images linked to actually exist: <\a external argument>. E.g.:
``
\a[i-don-exist.txt]
``
would lead to a build error.
* associate headers to files or directories with the <\H file argument> e.g.:
``
Here's an example of a nice image: \x[path/to/my/image.png]{file}.= path/to/my/image.png
{file}This image was taken when I was on vacation!
``
would automatically add a preview of the image on the output. Display files and their metadata nicely directly on your static website rather than relying exclusively on GitHub as a file browser.
* advanced header/ID related features:
* :
``
= Furry animalI like \x[furry-animal]{p}, especially my cat, here is his photo: \x[image-my-cat].
== Cat
\Image[My_cat.jpg]
{title=My cat}
``
* either with directories or with within a single file:
``
See the important conclusion of my experiment: \x[report-of-my-experiment/conclusion]= Report of my experiment
{scope}== Introduction
== Middle
== Conclusion
``
* for capitalization and pluralization, e.g.;
``
= Dog== Snoopy
{c}\x[dog]{c}{p} are fun. But the \x[dog] I like the most is \x[snoopy]!
``
would render:
* `\x[dog]{c}{p}` as `Dogs`: capitalized because of `{c}` and pluralized because of `{p}`
* `\x[dog]` as `dogs`: auto lowercased because its header `= Dog` does not have `{c}`
* `\x[snoopy]` as `Snoopy`: title capitalization kept to upper case due to `{c}` on the header `== Snoopy`
* , e.g.:
``
= User interface= UI
{c}
{synonym}
{title2}\x[user-interface]{c} is too long, I just say \x[ui].
``
would render something like:
``
User interface is too long, I just say UI
``
Furthermore, this also generates a output file:
``
ui.html
``
which redirects to the ain `user-interface.html`, so it serves as a way to have backward compatibility on page renames.And the `title2` makes it appears on the main title under parenthesis, something like:
``
User interface (UI)
``
* <\H disambiguate argument>[header disambiguation], e.g.:
``
My favorite fruits are \x[apple-fruit]{p}!My favorite least favorite brand is is \x[apple-company]! \x[apple] computers are too expensive.
== Apple
{disambiguate=fruit}== Apple
{c}
{disambiguate=company}= Apple
{c}
{synonym}
``
which renders something like:
* `\x[apple-fruit]{p}`: `apples`
* `\x[apple-company]`: `Apple`
* `\x[apple]`: also `Apple` because of the synonym
* `== Apple\n{disambiguate=fruit}`: `Apple (fruit)
`
* `== Apple\n{disambiguate=company}`: `Apple (company)
`
* tags are regular headers: <\H child argument>, <\x child argument>
``
= Animal== Dog
{tag=domestic}
{tag=cute}== Cat
{tag=domestic}
{tag=cute}== Bat
{tag=flying}= Flying
= Cute
= Domestic
``
* , levels higher than 6 are rendered in HTML as an appropriately styled `div`s with an ID:
``
= h1== h2
=== h3
==== h4
===== h5
====== h6
======= h7
======== h8
``
* generate lists of between internal headers: it shows every internal link coming into the current page
* automatic file upload and directory listing of non OurBigBook files: <`_raw` directory>, e.g.:
* link to a file:
\OurBigBookExample[[
The file \a[index.js] is cool.
]]
* link to a directory:
\OurBigBookExample[[
The directory \a[file_demo] is cooler.
]]
* is written in JavaScript and therefore runs natively on the browser to allow live previews as shown at: https://docs.ourbigbook.com/_obb/dist/editor[]
* helps you with the publishing:
* publishes in a single command to the configured target (default )
* OurBigBook tries to deal with media such as images and video intelligently for you, e.g.: {full}. E.g. you can keep media in a separate media repository, `my-media-repository`, and then by configuring on :
``
"media-providers": {
"github": {
"default-for": ["image", "video"],
"path": "media",
"remote": "yourname/myproject-media"
}
}
``
you can use images in that repository with:
``
\Image[My_image_basename.jpg]
``
instead of:
``
\Image[https://raw.githubusercontent.com/cirosantilli/myproject--media/master/My_image_basename.jpg]
``
* `inotifywait` watch and automatically rebuild with :
``
ourbigbook --watch input-file.bigb
``
* automatic code formatting: <--format-source>= Design goals
{parent=OurBigBook Markup and CLI overview}OurBigBook is designed entirely to allow writing complex professional HTML and PDF scientific books, blogs, articles and encyclopedias.
OurBigBook aims to be the ultimate [LaTeX] "killer", allowing books to be finally published as either HTML or PDF painlessly (LaTeX being only a backend to PDF generation).
It aims to be [more powerful] and and than Markdown and Asciidoctor.
= Saner
{parent=Design goals}Originally, OurBigBook was is meant to be both saner and more powerful than Markdown and Asciidoctor.
But alas, as Ciro started implementing and using it, he started to bring some Markdown [insanity he missed back in].
And so this "degraded" slightly into a language slightly saner than Asciidoctor but with an amazing Node.js implementation that makes it better for book writing and website publishing.
Notably, we hope that our escaping will be a bit saner backslash escapes everything instead of Asciidoctor's "different escapes for every case" approach: https://github.com/asciidoctor/asciidoctor/issues/901
But hopefully, having starting from a saner point will still produce a saner end result, e.g. there are sane constructs for every insane one.
It is intended that this will be an acceptable downside as OurBigBook will be used primarily large complex content such as books rather than forum posts, and will therefore primarily written either:
* in text editors locally, where users have more features than in random browser textareas
* in a dedicated website that will revolutionize education, and therefore have a good JavaScript editing interface: https://github.com/cirosantilli/write-free-science-books-to-get-famous-websiteFor example, originally OurBigBook had exactly five magic characters, with similar functions as in LaTeX:
* `\` backslash to start a macro, like LaTeX
* `{` and `}`: left and right square brackets to delimit [optional macro arguments]
* `[` and `]`: left and right curly braces bracket to start an optional arguments
and double blank newlines for if you are pedantic, but this later degenerated into many more with .We would like to have only square brackets for both optional and mandatory to have even less magic characters, but that would make the language difficult to parse for computer and humans. LaTeX was right for once!
This produces a very regular syntax that is easy to learn, including doing:
* arbitrary nesting of elements
* adding arbitrary properties to elementsThis sanity also makes the end tail learning curve of the endless edge cases found in Markdown and Asciidoctor disappear.
The language is designed to be philosophically isomorphic to HTML to:
* further reduce the learning curve
* ensure that most of HTML constructs can be reached, including arbitrary nestingMore precisely:
* macro names map to tag names, e.g.: `\\a` to `Link text<>`.= More powerful
{parent=Design goals}The [high sanity of OurBigBook], also makes creating new macro extensions extremely easy and intuitive.
All built-in language features use the exact same API as new extensions, which ensures that the extension API is sane forever.
Markdown is clearly missing many key features such as block attributes and , and has no standardized extension mechanism.
The "more powerful than Asciidoctor" part is only partially true, since Asciidoctor is very featureful can do basically anything through extensions.
The difference is mostly that OurBigBook is completely and entirely focused on making amazing scientific books, and so will have key features for that application out-of-the box, notably:
* amazing header/ToC/ID features including proper error reports: never have a internal broken link or duplicate ID again
* [server side pre-rendered maths with KaTeX]: all divs and spans are ready, browser only applies CSS, no JavaScript gets executed
* : we take care of website publishing for you out-of-the-box, no need to integrate into an external project like Jekyll
* :
* https://github.com/asciidoctor/asciidoctor/issues/626 feature request
* https://github.com/owenh000/asciidoctor-multipage third party plugin that does it
and we feel that some of those features have required specialized code that could not be easily implemented as a standalone macro.Another advantage over Asciidoctor is that the reference implementation of OurBigBook is in JavaScript, and can therefore be used on browser live preview out of the box. Asciidoctor does Transpile to JS with https://github.com/opal/opal[Opal], but who wants to deal with that layer of complexity?
= Related projects
{parent=Design goals}Static wiki generators: this is perhaps the best way of classifying this project :-)
* https://github.com/gollum/gollum[]: already has a local server editor! But no WYSIWYG nor live preview. Git integration by default, so when you save on the UI already generates a Git commit. We could achieve that with: https://github.com/isomorphic-git/isomorphic-git[], would be really nice. Does not appear to have built-in static generation:
* https://stackoverflow.com/questions/7210391/have-anyone-use-gollum-site-to-generete-markdown-wikis-and-host-it-on-heroku
* https://github.com/dreverri/gollum-site
Does not appear to check that any links are correct.
* https://github.com/wcchin/markypydia
* https://obsidian.md/ closed source, Markdown with + a SaaS. Appears to require payment for any publishing. 28k followers 2021: https://twitter.com/obsdmd[]. Founders are likely Canadians of Asian descent from Waterloo University: https://www.linkedin.com/in/lishid/ | https://www.linkedin.com/in/ericaxu/ also working in parallel on https://dynalist.io/ 2020 review at: https://www.youtube.com/watch?v=aK2fOQRNSxc Has offline editor with side-by-side preview. Compares with https://roamresearch.com/[Roam] and https://roamresearch.com/[Notion], but can't find any public publishing on those, seem to be enterprise only things.Static book generators:
* https://github.com/rstudio/bookdown[], https://bookdown.org/[]. Very similar feature set to what we want!!! Transpiles to markdown, and then goes through Pandoc: https://bookdown.org/yihui/bookdown/pandoc.html[], thus will never run on browser without huge translation layers. But does have an obscene amount of output formats however.
* https://gohugo.io/[Hugo]. Pretty good, similar feature set to ours. But Go based, so hard on browser, and adds adhoc features on top of markdown once again
* https://en.wikipedia.org/wiki/Personal_wiki
* https://github.com/vimwiki/vimwiki
* https://github.com/hplgit/doconce
* https://www.gwern.net/About#source is pretty interesting, uses https://github.com/jaspervdj/Hakyll/ + some custom stuff.
* https://github.com/JerrySievert/bookmarkdown
* https://www.gitbook.com/
* https://github.com/rust-lang/mdBook[]. Impressive integrated search feature. Like Gitbook but implemented in Rust.
* https://github.com/facebook/docusaurus React + markdown based, written in TypeScript. So how can it be build fast? Gotta benchmark.
* vimdoc: http://vimdoc.sourceforge.net/ They do have perfectly working , see any page e.g. http://vimdoc.sourceforge.net/htmldoc/pattern.html[].
* typst: https://github.com/typst/typst An attempt at a LaTeX killer. Has its own typesetting engine, does not simply transpile to LaTeX. Meant to be faster and simpler to write. No HTML output as of writing: https://github.com/typst/typst/issues/721Less related but of interest, similar philosophy to what Ciro wants, but no explicitly reusable system:
* http://www.uprtcl.io/
* https://libretexts.org
* https://physics.info/
* https://hypertextbook.com/
* https://tutorial.math.lamar.edu/= Motivation
{parent=Design goals}developed OurBigBook to perfectly satisfy his writing style, which is basically "create one humongous document where you document everything you know about a subject so everyone can understand it, and just keep adding to it".
https://cirosantilli.com[] is the first major document that he has created in OurBigBook.
He decided to finally create this new system after having repeatedly facing limitations of Asciidoctor which were ignored/wontfixed upstream, because Ciro's writing style is not as common/targeted by Asciidoctor.
Following large documents Ciro worked extensively on:
* https://github.com/cirosantilli/china-dictatorship
* https://github.com/cirosantilli/linux-kernel-module-cheat
made the limitations of Asciidoctor clear to Ciro, and were major motivation in this work.The key limitations have repeatedly annoyed Ciro were:
* cannot go over header level 6, addressed at:
* the need for to avoid one too large HTML output that will never get indexed properly by search engines, and takes a few seconds to load on any browser, which is unacceptable user experience= OurBigBook Markup
{c}
{parent=OurBigBook}= `.bigb` extension
{synonym}
{title2}OurBigBook Markup is the https://en.wikipedia.org/wiki/Lightweight_markup_language[lightweight markup language] used in the project.
It works both on the dynamic website, and on static websites from the command line.
files use the `.bigb` extension.
= OurBigBook Markup quick start
{c}
{parent=OurBigBook Markup}are made by simplying adding an empty line, e.g.:
\OurBigBookExample[[
My first paragraph.And now my second paragraph.
Third one to finish.
]]are created by starting the line with equal signs. The more equal signs the deeper you are, e.g.:
``
= Animal== Mammal
=== Dog
=== Cat
== Bird
=== Pigeon
=== Chicken
``
On , the toplevel header of each page goes into a separate title box, so there things would just look like:
* title box: "Animal"
* body:
``
== Mammal=== Dog
=== Cat
== Bird
=== Pigeon
=== Chicken
``You can can use any header as a <`\H` `tag` argument>[tag] of any other header, e.g.:
``
= Animal== Dog
{tag=Cute animal}== Turtle
{tag=Ugly animal}== Animal cuteness
=== Cute animal
=== Ugly animal
``Headers have several powerful features that you can read more about under <`\H` arguments>, e.g. <`\H` `synonym` argument> and <`\H` `disambiguate` argument>.
To [link to any of your other pages], you can use angle brackets (less than/greater than) signs:
``
I have a . are too noisy.
``
Note how [capitalization and pluralization generally just work].To use a custom link text on a reference, use the following syntax:
``
I have a [furry animal]. [feathery animals] are too noisy.
``External links can be input directly as:
\OurBigBookExample[[
This is a great website: https://example.comI really like https://example.com[this website].
]]
are done with backticks \c[[`]]. With just one backtick, you get a code block inside the text:
\OurBigBookExample[[
The function call `f(x + 1, "abc")` is wrong.
]]
and with two ore more backticks you get a code block on its own line, and possibly with multiple code lines:
\OurBigBookExample[[
The function:
``
function f(x, s) {
return x + s
}
``
is wrong.
]]syntax is very similar to code blocks, you can just enter you LaTeX code in it:
\OurBigBookExample[[
The number $\sqrt{2}$ is irrational.The same goes for:
$$
\frac{1}{\sqrt{2}}
$$
]]We also have [a bunch of predefined macros from popular packages], e.g. `\dv` from the https://mirrors.ibiblio.org/CTAN/macros/latex/contrib/physics/physics.pdf[`physics` package] for derivatives:
\OurBigBookExample[[
$$
\dv{x^2}{x} = 2x
$$
]]You can [refer] to specific equations like this:
\OurBigBookExample[[
As shown in , this is true.$$
\frac{1}{\sqrt{2}}
$$
{title=Very important equation}
]]and are also easy to add and [refer] to:
\OurBigBookExample[[
As shown at , chicks are cute.\Image[https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/H%C3%BChnerk%C3%BCken_02.jpg/800px-H%C3%BChnerk%C3%BCken_02.jpg?20200716091201]
{title=Cute chicken chick}\Video[https://www.youtube.com/watch?v=j_fl4xoGTKU]
{title=Top Down 2D Continuous Game by Ciro Santilli (2018)}
]]Images can take a bunch of options, about which you can read more about at . Most should be self explanatory, here is an image with a bunch of useful arguments:
\OurBigBookExample[[
\Image[https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/H%C3%BChnerk%C3%BCken_02.jpg/800px-H%C3%BChnerk%C3%BCken_02.jpg?20200716091201]
{title=Ultra cute chicken chick}
{description=
The chicken is yellow, and the hand is brown.The background is green.
}
{border}
{height=400}
{source=https://commons.wikimedia.org/wiki/File:H%C3%BChnerk%C3%BCken_02.jpg}
]]are written by starting the line with an asterisk `*`:
\OurBigBookExample[[
* first item
* second item
* and the third
]]A nested list:
\OurBigBookExample[[
* first item
* first item version 1
* first item version 2
* first item version 2 1
* first item version 2 2
* second item
* and the third
]]Lists items can contain any markup, e.g. paragraphs. You just need to keep the same number of spaces, e.g.:
\OurBigBookExample[[
* first item.Second paragraph of first item.
And a third one.
* second item
* second item v1Another paragraph in second item v1
* second item v2
]]are not very different from lists. We use double pipes for headers `||`, and a single pipe `|` for regular rows:
\OurBigBookExample[[
|| City
|| Sales| Salt Lake City
| 124,00| New York
| 1,000,000
]]To add a title we need to use an explicit `\Table` macro as in:
\OurBigBookExample[[
See for more information.\Table
{title=Sales per city}
[
|| City
|| Sales| Salt Lake City
| 124,00| New York
| 1,000,000
]
]]= Macro
{parent=OurBigBook Markup}This section documents all OurBigBook macros.
Macros are magic commands that do cool stuff, e.g. `\Image` to create an image.
The most common macros also have to keep the syntax shorter.
The general macro syntax is described at {full}.
= Link
{parent=Macro}
{tag=Macro with insane shortcut}= `\a`
{synonym}
{title2}= `\a` macro
{synonym}autolink, i.e. the link text is the same as the link address:
\OurBigBookExample[[
The website http://example.com is cool. See also:\Q[http://example.com/2]
]]
Exact parsing rules described at: {full}.Note that the prefixes `http://` and `https://` are automatically removed from the displayed link, since they are so common that they woudly simply add noise.
Equivalent sane version:
\OurBigBookExample[[[
The website \a[http://example.com] is cool.\Q[\a[http://example.com/2]]
]]]Insane link with custom text:
\OurBigBookExample[[The website http://example.com[example.com] is cool.]]
Equivalent sane version:
\OurBigBookExample[[The website \a[http://example.com][example.com] is cool.]]
If the custom text is empty, an autolink is generated. This is often useful if you want your link to be followed by punctuation:
\OurBigBookExample[[The website is really cool: http://example.com[].]]
This could also be achieved with the sane syntax of course, but this pattern saves a tiny bit of typing.Link with multiple paragraphs inside it:
\OurBigBookExample[[
\a[http://example.com][Multipleparagraphs]
]]Link to a file in the current repository:
\OurBigBookExample[[
The file \a[index.js] is cool.
]]
This links to a raw view of that file.Link to a directory in the current repository:
\OurBigBookExample[[
The directory \a[file_demo] is cooler.
]]
This links to an output file that contains a generated directory listing of that directory.= `\a` `href` argument
{parent=Link}The link target, e.g. in:
``
\a[http://example.com]
``
`href` equals `http://example.com`.Important behaviours associated with this property for local links are detailed at <\a external argument>{full}:
* they are checked for existence in the local filesystem
* they are modified to account for with= `\a` `ref` argument
{parent=Link}
{tag=Boolean argument}Analogous to the <\x ref argument>, e.g.:
\OurBigBookExample[[Trump said this and that.https://en.wikipedia.org/wiki/Donald_Trump_Access_Hollywood_tape#Trump's_responses{ref}https://web.archive.org/web/20161007210105/https://www.donaldjtrump.com/press-releases/statement-from-donald-j.-trump{ref} Then he said that and this.https://en.wikipedia.org/wiki/Donald_Trump_Access_Hollywood_tape#Trump's_responses{ref}https://web.archive.org/web/20161007210105/https://www.donaldjtrump.com/press-releases/statement-from-donald-j.-trump{ref}]]= `\a` `external` argument
{parent=Link}
{tag=Boolean argument}If given and true, forces a the link to be an .
Otherwise, the external is automatically guessed based on the address given as explained at {full}.
Common use cases for the `external` argument is to link to non OurBigBook content in the curent domain, e.g.:
* for
* link non OurBigBook subdirectories. E.g., https://github.com/cirosantilli/cirosantilli.github.io/blob/master/README.bigb was rendered at https://cirosantilli.com[], and contains links `\a[markdown-style-guide]{external}` to https://cirosantilli.com/markdown-style-guide[], whose source lives in a separate non-OurBigBook repository: https://github.com/cirosantilli/markdown-style-guide/= Internal links are smart
{parent=`\a` `external` argument}= Link to the domain root path
{synonym}
{title2}The <`\a` `external` argument> can be used to refer to the root of the domain. E.g. suppose that we have a under `https://mydomain.com/subdir/`. Then:
* `\a[/somepath]` refers to the directory `/subdir/somepath`
* `\a[/somepath]{external}` refers t othe directory `/somepath`= Subdirectory deployment
{parent=a `external` argument}TODO test if it works. But we want it to be possible to deploy static websites on subdirectories, e.g.:
``
https://mydomain.com/subdir/
https://mydomain.com/subdir/mathematics
``
If it doesn't work, it should be easy to make it work, as we use relative links almost everywhere already. Likely there would only be some minor fixes to the <--template> arguments.= External link
{parent=a `external` argument}= Internal link
{synonym}An external link is a link that points to a resource that is not present in the curent OurBigBook project sources.
By default, most links are internal links, e.g. it is often the case in computer programming tutorials that we want to refer to source files in the current directory. So from our `README.bigb`, we could want to write something like:
\OurBigBookExample[[Have a look at this amazing source file: \a[index.js].]]
and here `\a[ourbigbook]` is a internal link.A typicial external link is something like:
\OurBigBookExample[[This is great website: https://cirosantilli.com]]
which points to an absolute URL.OurBigBook considers a link relative by default if:
* it is not aTherefore, the following links are external by default:
* `http://cirosantilli.com`
* `https://cirosantilli.com`
* `file:///etc/fstab`
* `ftp://cirosantilli.com`
and the following are internal by default:
* `index.js`
* `../index.js`
* `path/to/index.js`
* `/path/to/index.js`. Note that paths starting with `/` refer to the root of the deployment, not the root of the domain, see: .
* `//example.com/path/to/index.js`A link being internal has the following effects
* the correct relative path to the file is used when using nested with . For example, if we have:
``
= h1== h2
{scope}=== h3
\a[index.js]
``
then in split header mode, `h3` will be rendered to `h2/h3.html`.Therefore, if we didn't do anything about it, the link to `index.js` would render as `href="index.js"` and thus point to `h2/index.js` instead of the correct `index.js`.
Instead, OurBigBook automatically converts it to the correct `href="../index.js"`
* the <`_raw` directory> prefix is added to the link
* existence of the file is checked on compilation. If it does not exist, an error is given.Implemented at: https://github.com/ourbigbook/ourbigbook/issues/87[] as `relative`, and subsequently modified to the more accurate/useful `external`.
= `_dir` directory
{parent=a `external` argument}The `_dir` directory tree contains file listings of files in the `_raw` directory.
We originally wanted to place these listings under `_raw` itself, but this leads to unsolvable conflicts when there are files called `index.html` present vs the index.
= `_file` output directory
{parent=a `external` argument}= `_file` directory
{synonym}Analogous to the <`_raw` directory>, but for the <`\H` `file` argument>.
= `_raw` directory
{parent=a `external` argument}places output files that are not the output of `.bigb` to `.html` conversion (i.e. `.html` output files) under the `_raw/` prefix of the output.
then automatically add the `_raw/` prefix to every link.
For example, consider an input directory that contains:
notindex.bigb
``
= HelloCheck out \a[myfile.c].
The source code for this file is at: \a[notindex.bigb].
\Image[myimg.png]
``myfile.c
``
int i = 1;
``myimg.png
``
Binary!
``After conversion with:
``
ourbigbook .
``
the following files would exist in the output directory:
* `notindex.html`: converted output of `notindex.bigb`
* `_raw/notindex.bigb`: a copy of the input source code `notindex.bigb`
* `_raw/myfile.c`: a copy of the input file `myfile.c`
* `_raw/myimg.png`: a copy of the input file `myimg.c`
and all links/image references would work and automtically point to the correct locations under `_raw`.Some live examples:
* link to a file:\OurBigBookExample[[
The file \a[index.js] is cool.
]]
* link to a directory:
\OurBigBookExample[[
The directory \a[file_demo] is cooler.
]]The reason why a `_raw` prefix is needed it to avoid naming conflicts with OurBigBook outputs, e.g. suppose we had the files:
* `configure`
* `configure.bigb`
Then, in a server that omits the `.html` extension, if we didn't have `_raw/` both `configure.html` and `configure` would be present under `/configure`. With `_raw` we instead get:
* `_raw/configure`: the input `/configure` file
* `configure`: the HTML= URL with protocol
{c}
{parent=a `external` argument}A URL with protocol is a URL that matches the regular expression `^[a-zA-Z]+://`. The following are examples of URLs with protocol:
* `http://cirosantilli.com`
* `https://cirosantilli.com`
* `file:///etc/fstab`
* `ftp://cirosantilli.com`The following aren't:
* `index.js`
* `../index.js`
* `path/to/index.js`
* `/path/to/index.js`
* `//example.com/path/to/index.js`. This one is a bit tricky. Web browsers would consider this as a https://stackoverflow.com/questions/28446314/why-use-protocol-relative-urls-at-all[protocol-relative URL], which technically implies a protocol, although that protocol would be different depending how you are viewing the file, e.g. locally through `file://` vs on a with website `https://`.For simplicity's sake, we just consider it as a URL without protocol.
= Insane link parsing rules
{parent=Link}Insane start at any of the recognized protocols are the ones shown at: {full}.
* `http://`
* `https://`
absolutely anywhere if not escaped, e.g.:
``
ahttp://example.com
``
renders something like:
``
a
``
To prevent expansion, you have to escape the protocol with a backslash `\\`, e.g.:
``
\http://example.com
``
Empty domains like:
``
http://
``
don't becomes links however. But this one does:
``
http://a
``Insane links end when any is found.
As a consequence, to have an insane link followed immediately by a punctuation like a period you should use an empty argument as in:
\OurBigBookExample[[Check out this website: http://example.com[].]]
otherwise the punctuation will go in it. Another common use case is:
\OurBigBookExample[[As mentioned on the tutorial (http://example.com[see this link]).]]If you want your link to include one of the terminating characters, e.g. `]`, all characters can be escaped with a backslash, e.g.:
\OurBigBookExample[[Hello http://example.com/\]a\}b\\c\ d world.]]Note that the `http://example.com` inside `\a[http://example.com]` only works because we do some post-processing magic that prevents its expansion, otherwise the link would expand twice:
\OurBigBookExample[[
\P[http://example.com]\a[http://example.com]
]]
This magic can be observed with <--help-macros> by seeing that the `href` argument of the `a` macro has the property:
``
"elide_link_only": true,
``= Insane link termination character
{parent=Insane link parsing rules}The following characters are the "insane link termination characters":
* space ` `
* newline `\n`
* open or close square bracket `[` or `]`
* open or close curly braces `{` or `}`
and terminate if any of these characters are found, see also: {full}.= Bold
{parent=Macro}
{title2=`\b`}\OurBigBookExample[[Some \b[bold] text.]]
= Line break
{parent=Macro}
{title2=`\br`}There is basically one application for this: poetry, which would be too ugly with
due to fixed width font:
\OurBigBookExample[[
Paragraph 1 Line 1\br
Paragraph 1 Line 2\brParagraph 2 Line 1\br
Paragraph 2 Line 2\br
]]= Code block
{parent=Macro}
{tag=Macro with insane shortcut}
{title2=\c[[``]], \c[[`]], `\C`, `\c`}Inline code (code that should appear in the middle of a paragraph rather than on its own line) is done with a single backtick (\c[[`]]) :
\OurBigBookExample[[My inline `x = 'hello\n'` is awesome.]]
and block code (code that should appear on their own line) is done with two or more backticks (\c[[``]]):
\OurBigBookExample[[
``
f() {
return 'hello\n';
}
``
]]The sane version of inline code is a lower case `c`:
\OurBigBookExample[[[My inline \c[[x = 'hello\n']] is awesome.]]]
and the sane version of block math is with an upper case `C`:
\OurBigBookExample[[[
\C[[
f() {
return 'hello\n';
}
]]
]]]The capital vs lower case theme is also used in other elements, see: .
If the content of the sane code block has many characters that you would need to [escape], you will often want to use , which work just like the do for any other argument. For example:
\OurBigBookExample[[[[
\C[[[
A paragraph.\C[[
And now, some long, long code, with lots
of chars that you would need to escape:
\ [ ] { }
]]A paragraph.
]]]
]]]]
Note that the initial newline is skipped automatically in code blocks, just as for any other element, due to: , so you don't have to worry about it.The distinction between inline `\c` and block `\C` code blocks is needed because in HTML, https://stackoverflow.com/questions/5371787/can-i-have-a-pre-tag-inside-a-p-tag-in-tumblr/58603596#58603596[`pre` cannot go inside `P`].
We could have chosen to do some magic to differentiate between them, e.g. checking if the block is the only element in a paragraph, but we decided not to do that to keep the language saner.
And now a code block outside of <\OurBigBookExample> to test how it looks directly under :
``
HelloHello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello
Hello
``Now with short description with math and underline:
``
HelloHello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello
Hello
``
{description=My long code! $a_b$}And now a very long inline code: `Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello`
\Comment[[[[
TODO implement.
We can have cross references to code blocks as for other elements such as \x[image]{p}:
\OurBigBookExample[[[
See this awesome code \x[my-code]:
``
ab
cd
``
{id=my-code}
]]]
]]]]= `\C` argument
{parent=Code block}= `\C` `description` argument
{parent=`\C` argument}
{tag=`description` argument}See: <`description` argument>{full}.
Example:
\OurBigBookExample[[
See the:.
``
print("Hello wrold")
``
{title=Python hello world}
{description=Note thow this is super short unlike the C hello world!}
]]= `\C` `title` argument
{parent=`\C` argument}
{tag=`title` argument}See: <`title` argument>{full}.
Example:
\OurBigBookExample[[
See the:.
``
#includeint main(void) {
puts("hello, world");
}
``
{title=C hello world}
]]= Comment
{parent=Macro}
{title2=`\Comment`}The `Comment` and `comment` macros are regular macros that does not produce any output. Capitalization is explained at: {full}.
You will therefore mostly want to use it with a [literal argument], which will, as for any other macro, ignore any macros inside of it.
\OurBigBookExample[[[
Before comment.\Comment[[
Inside comment.
]]After comment.
]]]And an inline one:
\OurBigBookExample[[[
My inline \comment[[inside comment]] is awesome.\comment[[inside comment]] inline at the start.
]]]= Header
{parent=Macro}
{title2=`\H`}with `= ` (equal sign space):
``
= My h1== My h2
=== My h3
``
Insane headers end at the first newline found. They cannot therefore contain raw newline tokens.Equivalent sane:
``
\H[1][My h1]\H[2][My h2]
\H[3][My h3]
``Custom ID for on insane headers:
``
= My h1
{id=h1}== My h2
{id=h2}=== My h3
{id=h3}
``Sane equivalent:
``
\H[1][My h1]{id=h1}\H[2][My h2]{id=h2}
\H[3][My h3]{id=h3}
``= Unlimited header levels
{parent=Header}There is no limit to how many levels we can have, for either sane or insane headers!
HTML is randomly limited to `h6`, so OurBigBook just renders higher levels as an `h6` with a `data-level` attribute to indicate the actual level for possible CSS styling:
``My title
``The recommended style is to use insane headers up to `h6`, and then move to sane one for higher levels though, otherwise it becomes very hard to count the `=` signs.
To avoid this, we considered making the insane syntax be instead:
``
= 1 My h1
= 2 My h2
= 3 My h3
``
but it just didn't feel as good, and is a bit harder to type than just smashing `=` n times for lower levels, which is the most common use case. So we just copied markdown.= My h3
{parent=Unlimited header levels}= My h4
{parent=My h3}= My h5
{parent=My h4}= My h6
{parent=My h5}= My h7
{parent=My h6}= My h8
{parent=My h7}= My h9
{parent=My h8}= My h10
{parent=My h9}= My h11
{parent=My h10}= My h12
{parent=My h11}= My h13
{parent=My h12}= Skipping header levels
{parent=Header}The very first header of a document can be of any level, although we highly recommend your document to start with a `\H[1]`, and to contain exactly just one `\H[1]`, as this has implications such as:
* `\H[1]` is used for the document title:
* `\H[1]` does not show on theAfter the initial header however, you must not skip a header level, e.g. the following would give an error because it skips level 3:
``
= my 1== my 1
==== my 4
``= The toplevel header
{parent=Header}= Toplevel header
{synonym}The toplevel header of a OurBigBook file is its first header and the one with the lowest level, e.g. in a document with recommended syntax:
``
= Animal== Dog
=== Bull Terrier
== Cat
``
the header `= Animal` is the tolevel header.Being the toplevel header gives a header some special handling described in child sections of the section and elsewhere throughout this documentation.
The toplevel header is only defined if the document has only a single header of the highest level. e.g. like the following has only a single `h2`:
``
== My 2=== My 3 1
=== My 3 2
``= The toplevel header IDs don't show
{parent=The toplevel header}Header IDs won't show for the toplevel level. For example, the headers would render like:
``
My 21. My 3 1
2. My 3 2
``
rather than:
``
1. My 21.2. My 3 1
1.2. My 3 2
``
This is because in this case, we guess that the `h2` is the toplevel.= The ID of the first header is derived from the filename
{parent=The toplevel header}TODO: we kind of wanted this to be the ID of the toplevel header instead of the first header, but this would require an extra postprocessing pass (to determine if the first header is toplevel or not), which might affect performance, so we are not doing it right now.
When the OurBigBook input comes from a file (and not e.g. ), the default ID of the first header in the document is derived from the basename of the OurBigBook input source file rather than from its title.
This is specially relevant when [including] other files.
For example, in file named `my-file.bigb` which contains:
``
= Awesome ourbigbook file
``
the ID of the header is `my-file` rather than `awesome-ourbigbook-file`. See also: .If the file is an other than , then the basename of the parent directory is used instead, e.g. the toplevel ID of a file:
``
my-subdir/README.bigb
``
would be:
``
#my-subdir
``
rather than:
``
#README.bigb
``For the toplevel index file however, the ID is just taken from the header itself as usual. This is done because you often can't general control the directory name of a project.
For example, a [GitHub pages] root directory must be named as `.github.io`. And users may need to rename directories to avoid naming conflicts.
As a consequence of this, the toplevel index file cannot [be included in other files].
= `\H` arguments
{parent=Header}= `\H` `c` argument
{parent=H arguments}If given, makes the header capitalized by default on .
More details at: {full}.
= `\H` `child` argument
{parent=H arguments}
{tag=`multiple` argument}
{tag=Disabled macro argument}This marks given IDs as being children of the current page.
The effect is the same as adding the <\x child argument> argument to an under the header. Notably, such marked target IDs will show up on the autogenerated .
This argument is deprecated in favor of the .
Example:
``
= Animal== Mammal
=== Bat
=== Cat
== Wasp
== Flying animal
{child=bat}
{child=wasp}\x[bat]
\x[wasp]
``
renders exactly as:
``
= Animal== Mammal
=== Bat
=== Cat
== Wasp
== Flying animal
\x[bat]{child}
\x[wasp]{child}
``The header `child` syntax is generally preferred because at some point while editing the content of the header, you might accidentally remove mentions to e.g. `\x[bat]{child}`, and then the relationship would be lost.
The <\H tag argument> does the same as the <\x child argument> but in the opposite direction.
= `\H` `file` argument
{parent=H arguments}If given, the current section contains metadata about file or other resource with the given URL.
If empty, the URL of the file is extracted directly from the header. Otherwise, the given URL is used.
for example:
``
= path/to/myfile.c
{file}An explanation of what this file is about.
``
renders a bit like:
```
= path/to/myfile.c
{id=_file/path/to/myfile.c}An explanation of what this file is about.
\a[path/to/myfile.c]
``
// Contents of path/to/myfile.c
int main() {
return 1;
}
``
```
so note how:
* does not normalize the path, e.g. it does not convert `/` to `-`.Also, a <_file output directory>[`_file/` prefix] is automatically added to the ID. This is needed with to avoid a collision between:
* `path/to/myfile.c`: the actual file
* `_file/path/to/myfile.c`: the metadata about that file. Note that locally the `.html` extension is added as in `file/path/to/myfile.c.html` which avoids the collision. But on a server deployment, the `.html` is not present, and there would be a conflict if we didn't add that `file/` prefix.
* a link to the is added automatically, since users won't be able to click it from the header, as clicking on the header will just link to the header itself
* a preview is added. The type of preview is chosen as follows:
* if the URL has an image extension, do an preview
* otherwise if the URL has a video extension, or is a YouTube URL, do a preview
* otherwise, don't show a preview, as we don't know anything sensible to showIn some cases however, especially when dealing with external URLs, we might want to have a more human readable title with a non empty `file` argument:
``
The video \x[tank-man-by-cnn-1989] is very useful.= Tank Man by CNN (1989)
{c}
{file=https://www.youtube.com/watch?v=YeFzeNAHEhU}An explanation of what this video is about.
``
which renders something like:
``
The video \x[tank-man-by-cnn-1989] is very useful.= Tank Man by CNN (1989)
{id=_file/https://www.youtube.com/watch?v=YeFzeNAHEhU}\Video[https://www.youtube.com/watch?v=YeFzeNAHEhU]
An explanation of what this video is about.
``To make to `{file}` headers, use the <`\x` `file` argument>.
= `\H` `file` argument toplevel header
{parent=H file argument}To create a separate file with the <`\H` `file` argument> set on the , you must put it under the special <`_file` input directory>. For example:
``
_file/path/to/myfile.txt.bigb
``
could contain something like:
``
= myfile.txt
{file}Description of my amazing file.
``
and it would be associated to the file:
``
path/to/myfile.txt
``The content of the header `= myfile.txt` is arbitrary, as it can be fully inferenced from the file path `_file/path/to/myfile.txt.bigb`. TODO add linting for it. Perhaps we should make adding a header be optional and auto-generate that header instead. But having at least an optional header is good as a way of being able to set header properties like .
= `_file` input directory
{parent=H file argument}See: <`\H` `file` argument toplevel header>{full}.
= `\H` `file` argument demo
{parent=H file argument}This section contains some live demoes of the <`\H` `file` argument>.
= file_demo
{file}
{parent=H file argument demo}An explanation of what this directory is about.
= file_demo/file_demo_subdir
{file}
{parent=H file argument demo}Going deeper.
= file_demo/hello_world.js
{file}
{parent=H file argument demo}An explanation of what this text file is about.
Another line.
= file_demo/file_demo_subdir/hello_world.js
{file}
{parent=H file argument demo}Going deeper.
= index.js
{file}
{parent=H file argument demo}
{tag=Overview of files in this repository}This is a central source file that basically contains all the functionality of the , so basically the -to-[whatever] (e.g. [HTML]) conversion code, including parsing and rendering.
Things that are not there are things that only use markup conversion, e.g.:
* : does conversion from command line
*This file must be able to run in the browser, so it must not contain any Node.js specifics.
It exposes the central `convert` function for markup conversion.
You should normally use the packaged `_obb/ourbigbook.js` version of this file when using ourbigbook as an external dependency.
This file is large, and large text files are not previewed, as they would take up too much useless vertical space and disk memory/bandwidth.
= file_demo/my.bin
{file}
{parent=H file argument demo}Binary files are not rendered.
= Tank_man_standing_in_front_of_some_tanks.jpg
{file}
{parent=H file argument demo}An explanation of what this image is about.
Another line.
= Tank Man by CNN (1989)
{c}
{file=https://www.youtube.com/watch?v=YeFzeNAHEhU}
{parent=H file argument demo}An explanation of what this video is about.
= `\H` `numbered` argument
{c}
{parent=H arguments}
{tag=Boolean argument}This determines whether renderings of a header will have section numbers or not. This affects all of:
* themselves
* links
* with the <\x full argument>
This option can be set by default for all files with:By default, headers are numbered as in a book, e.g.:
``
= h1== h2
=== h3
==== h4
``
renders something like:
``
= h1Table of contents
* 1. h2
* 1.1. h3
* 1.1.1. h4== 1. h2
=== 1.1. h3
==== 1.1.1. h4
``However, for documents with a very large number of sections, or [deeply nested headers] those numbers start to be more noise than anything else, especially in the table of contents and you are better off just referring to IDs. E.g. imagine:
``
1.3.1.4.5.1345.3.2.1. Some deep level
``When documents reach this type of scope, you can disable numbering with the `numbered` option.
This option can be set on any header, and it is inherited by all descendants.
The option only affects descendants.
E.g., if in the above example turn numbering off at `h2`:
``
= h1== h2
{numbered=0}=== h3
==== h4
``
then it renders something like:
``
= h1Table of contents
* 1. h2
* h3
* h4== 1. h2
=== h3
==== h4
``The more common usage pattern to disable it on toplevel and enable it only for specific "tutorial-like sections". An example can be seen at:
* https://cirosantilli.com/[]: huge toplevel wiki, for which we don't want numbers
* https://cirosantilli.com/x86-paging[]: a specific tutorial, for which we want numbers
which is something like:
``
= Huge toplevel wiki
{numbered=0}== h2
=== A specific tutorial
{numbered}
{scope}==== h4
===== h5
``
then it renders something like:
``
= Huge toplevel wikiTable of contents
* h2
* A specific tutorial
* 1. h4
* 1.1. h5== h2
=== A specific tutorial
==== 1. h4
===== 1.1. h5
``
Note how in this case the number for `h4` is just `1.` rather than `1.1.1.`. We only show numberings relative to the first non-numbered header, because the `1.1.` wouldn't be very meaningful otherwise.= `\H` `parent` argument
{c}
{parent=H arguments}= ID-based header levels
{c}
{synonym}
{title2}In addition to the basic way of specifying header levels with an explicit level number as mentioned at {full}, OurBigBook also supports a more indirect ID-based mechanism with the `parent` argument of the `\H` element.
We hightly recommend using `parent` for all but the most trivial documents.
For example, the following fixed level syntax:
``
= My h1== My h2 1
== My h2 2
=== My h3 2 1
``
is equivalent to the following ID-based version:
``
= My h1= My h2 1
{parent=my-h1}= My h2 2
{parent=my-h1}= My h3 2 1
{parent=my-h2-h}
``The main advantages of this syntax are felt when you have a huge document with [very large header depths]. In that case:
* it becomes easy to get levels wrong with so many large level numbers to deal with. It is much harder to get an ID wrong.
* when you want to move headers around to improve organization, things are quite painful without a refactoring tool (which we intend to provide in the ), as you need to fix up the levels of every single header.If you are using the ID-based syntax however, you only have to move the chunk of headers, and change the `parent` argument of a single top-level header being moved.
Note that when the `parent=` argument is given, the header level must be `1`, otherwise OurBigBook assumes that something is weird and gives an error. E.g. the following gives an error:
``
= My h1== My h2
{parent=my-h1}
``
because the second header has level `2` instead of the required `= My h2`.When are involved, the rules are the same as those of internal reference resolution, including the leading `/` to break out of the scope in case of conflicts.
Like the <\H child argument>, `parent` also performs on the argument, allowing you to use the original spaces and capitalization in the target as in:
``
= Flying animal= Bat
{parent=Flying animal}
``
which is equivalent to:
``
= Flying animal= Bat
{parent=flying-animal}
``See also: {full} for further rationale.
= ID-based header levels and scope resolution
{c}
{parent=H parent argument}When mixing both <\H parent argument> and , things get a bit complicated, because when writing or parsing, we have to first determine the parent header before resolving scopes.
As a result, the follow simple rules are used:
* start from the last header of the highest level
* check if the `{parent=XXX}` is a suffix of its ID
* if not, proceed to the next smaller level, and so on, until a suffix is foundFollowing those rules for example, a file `tmp.bigb`:
``
= h1
{scope}= h1 1
{parent=h1}
{scope}= h1 1 1
{parent=h1-1}= h1 1 2
{parent=h1-1}= h1 1 3
{parent=h1/h1-1}= h1 2
{parent=h1}
{scope}= h1 2 1
{parent=h1-2}
{scope}= h1 2 1 1
{parent=h1-2/h1-2-1}
``
will lead to the following header tree with <--log headers>:
``
= h1 tmp
== h2 1 tmp/h1-1
=== h3 1.1 tmp/h1-1/h1-1-1
=== h3 1.2 tmp/h1-1/h1-1-2
=== h3 1.3 tmp/h1-1/h1-1-3
== h2 2 tmp/h1-2
=== h3 2.1 tmp/h1-2/h1-2-1
==== h4 2.1.1 tmp/h1-2/h1-2-1/h1-2-1-1
``= Header explicit levels vs nesting design choice
{parent=H parent argument}Arguably, the language would be even saner if we did:
``
\H[My h1][Paragraph.
\H[My h2][]
]
``
rather than having explicit levels as in `\H[1][My h1]` and so on.But we chose not to do it like most markups available because it leads to too many nesting levels, and hard to determine where you are without tooling.
Ciro later "invented" (?) <\H parent argument>, which he feels reaches the perfect balance between the advantages of those two options.
= `\H` `scope` argument
{parent=H arguments}= Scope
{synonym}In some use cases, the sections under a section describe inseparable parts of something.
For example, when documenting an experiment you executed, you will generally want an "Introduction", then a "Materials" section, and then a "Results" section for every experiment.
On their own, those sections don't make much sense: they are always referred to in the context of the given experiment.
The problem is then how to get unique IDs for those sections.
One solution, would be to manually add the experiment ID as prefix to every subsection, as in:
``
= ExperimentsSee: \x[full-and-unique-experiment-name/materials]
== Introduction
== Full and unique experiment name
=== Introduction
{id=full-and-unique-experiment-name/introduction}See our awesome results: \x[full-and-unique-experiment-name/results]
For a more general introduction to all experiments, see: \x[introduction].
=== Materials
{id=full-and-unique-experiment-name/materials}=== Results
{id=full-and-unique-experiment-name/results}
``but this would be very tedious.
To keep those IDs shorter, OurBigBook provides the `scope` property of , which works analogously to C++ namespaces with the header IDs.
Using `scope`, the previous example could be written more succinctly as:
``
= ExperimentsSee: \x[full-and-unique-experiment-name/materials]
== Introduction
== Full and unique experiment name
{scope}=== Introduction
See our awesome results: \x[results]
For a more general introduction to all experiments, see: \x[/introduction].
=== Materials
=== Results
``Note how:
* full IDs are automatically prefixed by the parent scopes prefixed and joined with a slash `/`
* we can refer to other IDs withing the current scope without duplicating the scope. E.g. `\x[results]` in the example already refers to the ID `full-and-unique-experiment-name/materials`
* to refer to an ID outside of the scope and avoid name conflicts with IDs inside of the current scope, we start a reference with a slash `/`So in the example above, `\x[/introduction]` refers to the ID `introduction`, and not `full-and-unique-experiment-name/introduction`.
= `scope` resolution
{parent=H scope argument}When nested scopes are involved, resolution peels off the scopes one by one trying to find the closes match, e.g. the following works as expected:
``
= h1
{scope}== h2
{scope}=== h3
{scope}\x[h2]
``
Here OurBigBook:
* first tries to loop for an `h1/h2/h3/h2`, since `h1/h2/h3` is the current scope, but that ID does not exist
* so it removes the `h3` from the current scope, and looks for `h1/h2/h2`, which is still not found
* then it removes the `h2`, leading to `h1/h2`, and that one is found, and therefore is taken= Directory-based `scope`
{parent=H scope argument}Putting files in subdirectories of the build has the same effect as adding a to their top level header.
Notably, all headers inside that directory get the directory prepended to their IDs.
The toplevel directory is determined as described at: .
= Test scope 1
{parent=H scope argument}
{scope}For fun and profit.
= Test scope 2
{parent=Test scope 1}
{scope}Let's break this local link: \a[ourbigbook].
= Not scoped
{parent=Test scope 2}= `\H` `scope` argument of toplevel headers
{parent=H scope argument}When is given the `scope` property OurBigBook automatically uses the file path for the scope and heaves fragments untouched.
For example, suppose that file `full-and-unique-experiment-name` contains:
``
= Full and unique experiment name
{scope}== Introduction
== Materials
``In this case, multi-file output will generate a file called `full-and-unique-experiment-name.html`, and the URL of the subsections will be just:
* `full-and-unique-experiment-name.html#introduction`
* `full-and-unique-experiment-name.html#materials`
instead of
* `full-and-unique-experiment-name.html#full-and-unique-experiment-name/introduction`
* `full-and-unique-experiment-name.html#full-and-unique-experiment-name/materials`Some quick interactive cross file link tests:
*
*
*= `\H` `splitDefault` argument
{parent=H arguments}
{tag=Boolean argument}When using , always point to non-split pages as mentioned at .
If the `splitDefault` is given however:
* the split header becomes the default, e.g. `index.html` is now the split one, and `nosplit.html` is the non-split one
* the header it is given for, and all of its descendant headers will use the split header as the default internal cross target, unless the header is already rendered in the current page. This does not propagate across however.For example, consider `README.bigb`:
``
= Toplevel
{splitDefault}\x[h2][toplevel to h2]
\x[notreadme][toplevel to notreadme]
\Include[notreadme]
== h2
``
and `notreadme.bigb`:
``
= Notreadme\x[h2][notreadme to h2]
\x[notreadme][notreadme to notreadme h2]
== Notreadme h2
``
Then the following links would be generated:
* `index.html`: split version of `README.bigb`, i.e. does not contain `h2`
* `toplevel to h2`: `h2.html`. Links to the split version of `h2`, since `h2` is also affected by the `splitDefault` of its parent, and therefore links to it use the split version by default
* `toplevel to notreadme`: `notreadme.html`. Links to non-split version of `notreadme.html` since that header is not `splitDefault`, because `splitDefault` does not propagate across includes
* `nosplit.html` non-split version of `README.bigb`, i.e. contains `h2`
* `toplevel to h2`: `#h2`, because even though `h2` is `splitDefault`, that header is already present in the current page, so it would be pointless to reload the split one
* `toplevel to notreadme`: `notreadme.html`
* `h2.html` split version of `h2` from `README.bigb`
* `notreadme.html`: non-split version of `notreadme.bigb`
* `notreadme to h2`: `h2.html`, because `h2` is `splitDefault`
* `notreadme to notreadme h2`: `#notreadme-h2`
* `notreadme-split.html`: split version of `notreadme.bigb`
* `notreadme to h2`: `h2.html`, because `h2` is `splitDefault`
* `notreadme to notreadme h2`: `notreadme.html#notreadme-h2`, because `notreadme-h2` is not `splitDefault`The major application of this if you like work with a huge `README.bigb` containing thousands of random small topics.
Splitting those into separate source files would be quite laborious, as it would require duplicating IDs on the filename, and setting up .
However, after this README reaches a certain size, page loads start becoming annoyingly slow, even despite already loading large assets like video only on hover or click: the annoying slowness comes from the loading of the HTML itself before the browser can jump to the ID.
And even worse: this README corresponds to the main index page of the website, which will make what a large number of users will see be that slowness.
Therefore, once this README reaches a certain size, you can add the `splitDefault` attribute to it, to make things smoother for readers.
And if you have a smaller, more self-contained, and highly valuable tutorial such as https://cirosantilli.com/x86-paging[], you can just split that into a separate `.bigb` source file.
This way, any links into the smaller tutorial will show the entire page as generally desired.
And any links from the tutorial, back to the main massive README will link back to split versions, leading to fast loads.
This feature was implemented at: https://github.com/ourbigbook/ourbigbook/issues/131
Note that this huge README style is not recommended however. used to do it, but moved away from it. The currently recommended approach is to manually create not too large subtrees in each page. This way, readers can easily view several nearby sections without having to load a new page every time.
= `\H` `splitSuffix` argument
{parent=H arguments}If given, add a custom suffix to the output filename of the header when using .
If the given suffix is empty, it defaults to `-split`.
For example, given:
``
= my h1== my h2
``
a `--split-headers` conversion would normally place `my h2` into a file called:
``
my-h2.html
``
However, if we instead wrote:
``
== my h2
{splitSuffix}
``
it would not be placed under:
``
my-h2-split.html
``
and if we set a custom one as:
``
== my h2
{splitSuffix=asdf}
``
it would go instead to:
``
my-h2-asdf.html
``This option is useful if the root of your website is written in OurBigBook, and you want to both:
* have a section that talks about some other project
* host the documentation of that project inside the project source treeFor example, https://cirosantilli.com with source at https://github.com/cirosantilli/cirosantilli.github.io has a quick section about OurBigBook: https://cirosantilli.com#ourbigbook[].
Therefore, without a custom suffix, the split header version of that header would go to https://docs.ourbigbook.com[], which would collide with this documentation, that is present in a separate repository: https://github.com/ourbigbook/ourbigbook[].
Therefore a `splitSuffix` property is used, making the split header version fall under `/ourbigbook-split`, and leaving the nicer `/ourbigbook` for the more important project toplevel.
If given on the , which normally gets a suffix by default to differentiate from the non-split version, it replaces the default `-split` suffix with a custom one.
For example if you had `notindex.bigb` as:
``
= Not index
``
then it would render to:
``
notindex-split.bigb
``
but if you used instead:
``
= Not index
{splitSuffix=asdf}
``
then it would instead be:
``
notindex-asdf.bigb
``= `\H` `synonym` argument
{parent=H arguments}= Synonym
{synonym}This option is similar to <\H title2 argument> but it additionally:
* creates a new ID that you can refer to, and renders it with the alternate chosen title
* the rendered ID on is the same as what it is a synonym for
* the synonym header is not rendered at all, including in the
* when using , a redirect output file is generated from the synonym to the main IDExample:
``
= Parent== GNU Debugger
{c}= GDB
{c}
{synonym}I like to say \x[gdb] because it is shorter than \x[gnu-debugger].
``
renders something like:
``
= GNU DebuggerI like to say \a[#gnu-debugger][GDB] because it is shorter than \x[#gnu-debugger][GNU Debugger].
``
Furthermore, if is used, another file is generated:
``
gdb.html
``
which contains a redirection from `gdb.html` to `gnu-debugger.html`.Implemented at: https://github.com/ourbigbook/ourbigbook/issues/114
= `\H` `title` argument
{parent=H synonym argument}
{tag=`title` argument}Contains the main content of the header. The :
``
= My title
``
is equivalent to the sane:
``
\H[1][My title]
``
and in both cases `My title` is the title argument.The <`title` argument> is also notably used for .
= Automatic ID from title
{parent=H title argument}If a [non-toplevel] macro has the `title` argument is present but no explicit `id` argument is given, an is created automatically from the `title`, by applying the following transformations:
* do a conversion on the title to remove for example any HTML tags that would be present in the conversion output
* convert all characters to lowercase. This uses . Note that this does convert non-ASCII characters to lowercase, e.g. `É` to `é`.
* if is `true` (the default) do . This converts e.g. `é` to `e`.
* if is `true` (the default) do . This converts e.g. `+` to `plus`.
* convert consecutive sequences of all non `a-z0-9` ASCII characters to a single hyphen `-`. Note that this leaves non-ASCII characters untouched.
* strip leading or trailing hyphens
Note how those rules leave non-ASCII Unicode characters untouched, except for:
* capitalization changes wher applicable, e.g. `É` to `é`
as capitalization and determining if something "is a letter or not" in those cases can be tricky.For toplevel headers, see: .
So for example, the following automatic IDs would be generated: .
\Table[
|| title
|| id
|| latin normalization
|| punctuation normalization
|| comments| My favorite title
| my-favorite-title
|
|
|| Ciro's markdown is awesome
| ciro-s-markdown-is-awesome
|
|
| `'` is an ASCII character, but it is not in `a-z0-9`, therefore it gets converted to a hyphen `-`| É你
| e你
| true
|
| The Latin https://en.wikipedia.org/wiki/Acute_accent[acute accented] `e`, `É`, is converted to its lower case form `é` as per the .Then, due to , `é` is converted to `e`.
The Chinese character `你` is left untouched as Chinese characters have no case, and no ASCII analogue.
| É你
| é你
| false
|
| Same as the previous, but `é` is not converted to `e` since is turned off.| C++ is great
| c-plus-plus-is-great
|
| true
| This is the effect of .| I \i[love] dogs.
| i-love-dogs
|
|
| `love` is extracted from the italic tags `love` with conversion.| β Centauri
| beta-centauri
|
|
| Our Latin normalization is amazing and knows Greek!
]
{title=Examples of automatically generated IDs}For [the toplevel header], its ID is derived from the basename of the OurBigBook file without extension instead of from the `title` argument.
TODO:
* maybe we should also remove some or all non-ASCII punctuation. All can be done with `\\p{IsPunctuation}`: https://stackoverflow.com/questions/13925454/check-if-string-is-a-punctuation-character but we need to check that we really want to remove all of them.= ID target from title
{c}
{parent=H synonym argument}This conversion type is similar to , but it is used in certain cases where we are targeting IDs rather than setting them, notably:
* <\H parent argument>
* <\H child argument>
* <\H tag argument>= `\H` `title2` argument of a synonym header
{parent=H synonym argument}Unlike <\H title2 argument>, the synonym does not show up by default next to the title. This is because we sometimes want that, and sometimes not. To make the title appear, you can simply add an empty `title2` argument to the synonym header as in:
``
= GNU Debugger
{c}= GDB
{c}
{synonym}
{title2}= Quantum computing
= Quantum computer
{synonym}
``
which renders something like:
``
= GNU Debugger (GDB)= Quantum computing
``
Note how we added the synonym to the title only when it is not just a simple flexion variant, since `Quantum computing (Quantum computer)` would be kind of useless would be kind of useless.= `\H` `tag` argument
{c}
{parent=H arguments}
{tag=multiple argument}= Tag
{synonym}Same as <\x child argument> but in the opposite direction, e.g.:
``
== Mammal=== Bat
{tag=flying-animal}=== Cat
== Flying animal
``
is equivalent in every way to:
``
== Mammal=== Bat
=== Cat
== Flying animal
{child=bat}
``Naming rationale:
* `parent` as the opposite of child is already taken to be then "main parent" via the "<\H parent argument>"
* we could have renamed the <\H child argument> to `tags` as in "this header tags that one", but it would be a bit confusing `tags` vs `tag`
So `child` vs `tag` it is for now.You generally want to use `tag` instead of the <\H child argument> because otherwise some very large header categories are going to contain Huge lists of children, which is not very nice when editing.
It is possible to enforce the <\H child argument> or the <\H tag argument> in a given project with the option.
= `\H` `title2` argument
{parent=H arguments}
{tag=multiple argument}The `title2` argument can be given to any element that has the `title` argument.
Its usage is a bit like the `description=` argument of , allowing you to add some extra content to the header without affecting its ID.
Unlike `description=` however, `title2` shows up on all <\x full argument>[`full`] references, including appearances in the , which make it more searchable.
Its primary use cases are:
* give acronyms, or other short names names of fuller titles such as mathematical/programming notationOne primary reason to not use the acronyms as the main section name is to avoid possible ID ambiguities with other acronyms.
* give the header in different languagesFor example, given the OurBigBook input:
``
= ToplevelThe Toc follows:
== North Atlantic Treaty Organization
{c}
{title2=NATO}\x[north-atlantic-treaty-organization]
\x[north-atlantic-treaty-organization]{full}
``
the rendered output looks like:
``
= ToplevelThe ToC follows:
* North Atlantic Treaty Organization (NATO)
== North Atlantic Treaty Organization (NATO)
North Atlantic Treaty Organization
Section 1. "North Atlantic Treaty Organization (NATO)"
``Related alternatives to `title2` include:
* <\H disambiguate argument> when you do want to affect the ID to remove ambiguities
* <\H synonym argument>Parenthesis are added automatically around all rendered `title2`.
The `title2` argument has a special meaning when applied to a with the <\H synonym argument>, see <\H title2 argument of a synonym header>.
\Comment[[
= `\H` `tutorial` argument
{parent=h-arguments}
{tag=boolean-argument}This option is a convenience helper for the common use case of "writting a tutorial". The same would also apply to a report, or an article.
]]= `\H` `toplevel` argument
{parent=H arguments}
{tag=Boolean argument}When the `\H` `toplevel` argument is set, the header and its descendants will be automatically output to a separate file, even without <--split-headers>.
For example given:
animal.bigb
``
= Animal== Vertebrate
=== Dog
{toplevel}==== Bulldog
== Invertebrate
``and if you convert as:
``
ourbigbook animal.bigb
``
we get the following output files:
* `animal.html`: contains the headers: "Animal", "Vertebrate" and "Invertebrate", but not "Dog" and "Bulldog"
* `dog.html`: contains only the headers: "Dog" and "Bulldog"This option is intended to produce output identical to using and separate files, i.e. the above is equivalent to:
animal.bigb
``
= Animal== Vertebrate
\Include[dog]
== Invertebrate
``dog.bigb
``
= Dog
{toplevel}== Bulldog
``Or in other words: of each source file gets `{toplevel}` set implicitly for it by default.
This design choice might change some day. Arguably, the most awesome setup is on in which source files and outputs are completely decoupled. also essentially wants this, as ideally we want to store one source per header there in each DB entry. We shall see.
= `\H` `wiki` argument
{parent=H arguments}If given, show a link to the Wikipedia article that corresponds to the header.
If a value is not given, automatically link to the Wiki page that matches the header exactly with spaces converted to underscores.
Here is an example with an explicit wiki argument:
``
==== Tiananmen Square
{wiki=Tiananmen_Square}
``which looks like:
= Tiananmen Square
{id=wiki-explicit}
{parent=H wiki argument}
{wiki=Tiananmen_Square}or equivalently with the value deduced from the title:
``
= Tiananmen Square
{wiki}
``which looks like:
= Tiananmen Square
{id=wiki-implicit}
{parent=H wiki argument}
{wiki}You can only link to subsections of wiki pages with explicit links as in:
``
= History of Tiananmen Square
{{wiki=Tiananmen_Square#History}}
``which looks like:
= History of Tiananmen Square
{id=wiki-explicit-subsection}
{parent=H wiki argument}
{{wiki=Tiananmen_Square#History}}Note that in this case, you either need a