Commit b505b241 authored by Henk Verlinde's avatar Henk Verlinde
Browse files

content: update for doks v0.2.3

parent 6720e6ea
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -4,12 +4,6 @@
  identifier = "prologue"
  url = "/docs/prologue/"

[[docs]]
  name = "Examples"
  weight = 20
  identifier = "examples"
  url = "/docs/examples/"

[[docs]]
  name = "Help"
  weight = 60

content/docs/examples/_index.md

deleted100644 → 0
+0 −9
Original line number Diff line number Diff line
---
title: "Examples"
description: "Examples"
lead: ""
date: 2021-03-16T08:43:03+01:00
lastmod: 2021-03-16T08:43:03+01:00
draft: false
images: []
---

content/docs/examples/code.md

deleted100644 → 0
+0 −79
Original line number Diff line number Diff line
---
title: "Code"
description: "Code highlighting examples."
lead: "Code highlighting examples."
date: 2021-03-16T08:43:34+01:00
lastmod: 2021-03-16T08:43:34+01:00
draft: false
images: []
menu:
  docs:
    parent: "examples"
weight: 200
toc: true
---

## JavaScript

```js
function $initHighlight(block, cls) {
  try {
    if (cls.search(/\bno\-highlight\b/) != -1)
      return process(block, true, 0x0F) +
             ` class="${cls}"`;
  } catch (e) {
    /* handle exception */
  }
  for (var i = 0 / 2; i < classes.length; i++) {
    if (checkCondition(classes[i]) === undefined)
      console.log('undefined');
  }

  return (
    <div>
      <web-component>{block}</web-component>
    </div>
  )
}

export  $initHighlight;
```

## JSON

```json
[
  {
    "title": "apples",
    "count": [12000, 20000],
    "description": {"text": "...", "sensitive": false}
  },
  {
    "title": "oranges",
    "count": [17500, null],
    "description": {"text": "...", "sensitive": false}
  }
]
```

## Bash

```bash
#!/bin/bash

###### CONFIG
ACCEPTED_HOSTS="/root/.hag_accepted.conf"
BE_VERBOSE=false

if [ "$UID" -ne 0 ]
then
 echo "Superuser rights required"
 exit 2
fi

genApacheConf(){
 echo -e "# Host ${HOME_DIR}$1/$2 :"
}

echo '"quoted"' | tr -d \" > text.txt
```

content/docs/examples/math.md

deleted100644 → 0
+0 −46
Original line number Diff line number Diff line
---
title: "Math"
description: "Math typesetting examples."
lead: "Math typesetting examples."
date: 2021-03-16T10:46:05+01:00
lastmod: 2021-03-16T10:46:05+01:00
draft: false
images: []
menu:
  docs:
    parent: "examples"
weight: 210
toc: true
---

[KaTeX](https://katex.org/) is switched off by default. Enable it by setting `kaTex = true` in the `[options]` section of `./config/_default/params.toml`.

## Example 1

_Excerpt taken from [Supernova Neutrinos](https://neutrino.leima.is/book/introduction/supernova-neutrinos/)_

### Markdown

```md
The average energy of the neutrinos $\langle E \rangle$ emitted during a supernova explosion is of the order of 10MeV, and the neutrino luminosity at the early epoch of the explosion is approximately $10^{52}\mathrm{ergs\cdot s^{-1}}$.
Therefore, the number density of the neutrinos at the radius $R$ is

$$
\begin{equation*}
   n \sim  10^{18} \mathrm{cm^{-3}} \left(\frac{100\mathrm{km}}{R}\right)^2 \left(\frac{10\mathrm{MeV}}{\langle E \rangle}\right).
\end{equation*}
$$
```

### HTML

The average energy of the neutrinos $\langle E \rangle$ emitted during a supernova explosion is of the order of 10MeV, and the neutrino luminosity at the early epoch of the explosion is approximately $10^{52}\mathrm{ergs\cdot s^{-1}}$.
Therefore, the number density of the neutrinos at the radius $R$ is

$$
\begin{equation*}
   n \sim  10^{18} \mathrm{cm^{-3}} \left(\frac{100\mathrm{km}}{R}\right)^2 \left(\frac{10\mathrm{MeV}}{\langle E \rangle}\right).
\end{equation*}
$$

It turns out that the ambient dense neutrino medium has a significant impact on neutrino oscillations, which has been intensely investigated in the last decade.
+3 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ toc: true

## Hyas?

Doks is a [Hyas theme](https://gethyas.com/themes/doks/) build by the creator of Hyas.
Doks is a [Hyas theme](https://gethyas.com/themes/) build by the creator of Hyas.

## Footer notice?

@@ -39,6 +39,7 @@ Create a topic:

- [Netlify Community](https://community.netlify.com/)
- [Hugo Forums](https://discourse.gohugo.io/)
- [Doks Discussions](https://github.com/h-enk/doks/discussions)

## Contact the creator?

@@ -46,3 +47,4 @@ Send `h-enk` a message:

- [Netlify Community](https://community.netlify.com/)
- [Hugo Forums](https://discourse.gohugo.io/)
- [Doks Discussions](https://github.com/h-enk/doks/discussions)
Loading