content: update for doks v0.2.3
This commit is contained in:
parent
6720e6ea3e
commit
b505b2412b
|
@ -4,12 +4,6 @@
|
|||
identifier = "prologue"
|
||||
url = "/docs/prologue/"
|
||||
|
||||
[[docs]]
|
||||
name = "Examples"
|
||||
weight = 20
|
||||
identifier = "examples"
|
||||
url = "/docs/examples/"
|
||||
|
||||
[[docs]]
|
||||
name = "Help"
|
||||
weight = 60
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
title: "Examples"
|
||||
description: "Examples"
|
||||
lead: ""
|
||||
date: 2021-03-16T08:43:03+01:00
|
||||
lastmod: 2021-03-16T08:43:03+01:00
|
||||
draft: false
|
||||
images: []
|
||||
---
|
|
@ -1,79 +0,0 @@
|
|||
---
|
||||
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
|
||||
```
|
|
@ -1,46 +0,0 @@
|
|||
---
|
||||
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.
|
|
@ -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)
|
||||
|
|
|
@ -6,7 +6,7 @@ date: 2020-11-12T13:26:54+01:00
|
|||
lastmod: 2020-11-12T13:26:54+01:00
|
||||
draft: false
|
||||
images: []
|
||||
menu:
|
||||
menu:
|
||||
docs:
|
||||
parent: "help"
|
||||
weight: 610
|
||||
|
@ -15,10 +15,18 @@ toc: true
|
|||
|
||||
{{< alert icon="💡" text="Learn more about <a href=\"https://docs.npmjs.com/about-semantic-versioning\">semantic versioning</a> and <a href=\"https://docs.npmjs.com/cli/v6/using-npm/semver#advanced-range-syntax\">advanced range syntax</a>." >}}
|
||||
|
||||
## Update npm packages
|
||||
## Check for outdated packages
|
||||
|
||||
Bump the versions in the `devDependencies` section of `./package.json` to your liking, and run:
|
||||
The [`npm outdated`](https://docs.npmjs.com/cli/v7/commands/npm-outdated) command will check the registry to see if any (or, specific) installed packages are currently outdated:
|
||||
|
||||
```bash
|
||||
npm update
|
||||
npm outdated [[<@scope>/]<pkg> ...]
|
||||
```
|
||||
|
||||
## Update packages
|
||||
|
||||
The [`npm update`](https://docs.npmjs.com/cli/v7/commands/npm-update) command will update all the packages listed to the latest version (specified by the tag config), respecting semver:
|
||||
|
||||
```bash
|
||||
npm update [<pkg>...]
|
||||
```
|
||||
|
|
|
@ -6,7 +6,7 @@ date: 2020-10-13T15:21:01+02:00
|
|||
lastmod: 2020-10-13T15:21:01+02:00
|
||||
draft: false
|
||||
images: []
|
||||
menu:
|
||||
menu:
|
||||
docs:
|
||||
parent: "prologue"
|
||||
weight: 130
|
||||
|
@ -15,16 +15,18 @@ toc: true
|
|||
|
||||
{{< alert icon="💡" text="You can change the commands in the scripts section of `./package.json`." >}}
|
||||
|
||||
## start
|
||||
## create
|
||||
|
||||
Start local development server:
|
||||
Create new content for your site:
|
||||
|
||||
{{< btn-copy text="npm run start" >}}
|
||||
{{< btn-copy text="npm run create" >}}
|
||||
|
||||
```bash
|
||||
npm run start
|
||||
npm run create [path] [flags]
|
||||
```
|
||||
|
||||
See also the Hugo docs: [hugo new](https://gohugo.io/commands/hugo_new/).
|
||||
|
||||
## lint
|
||||
|
||||
Check scripts, styles, and markdown for errors:
|
||||
|
@ -75,6 +77,16 @@ Delete temporary directories:
|
|||
npm run clean
|
||||
```
|
||||
|
||||
## start
|
||||
|
||||
Start local development server:
|
||||
|
||||
{{< btn-copy text="npm run start" >}}
|
||||
|
||||
```bash
|
||||
npm run start
|
||||
```
|
||||
|
||||
## build
|
||||
|
||||
Build production website:
|
||||
|
|
|
@ -43,11 +43,11 @@ Learn how to customize Doks to fully make it your own. [Reference Guides →](ht
|
|||
|
||||
### Extensions
|
||||
|
||||
Get instructions on how to add even more to Doks. [Extensions →](https://getdoks.org/docs/extensions/add-google-fonts/)
|
||||
Get instructions on how to add even more to Doks. [Extensions →](https://getdoks.org/docs/extensions/breadcrumb-navigation/)
|
||||
|
||||
### Showcase
|
||||
|
||||
See what others have build with Doks. [Showcase →](https://getdoks.org/showcase/parietal-numerics-documentation/)
|
||||
See what others have build with Doks. [Showcase →](https://getdoks.org/showcase/electric-blocks/)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
@ -15,7 +15,9 @@ toc: true
|
|||
|
||||
## Requirements
|
||||
|
||||
Doks uses npm to install dependencies and run commands. Installing npm is pretty simple. Download and install [Node.js](https://nodejs.org/) (it includes npm) for your platform.
|
||||
Doks uses npm to centralize dependency management, making it [easy to update]({{< relref "how-to-update" >}}) resources, build tooling, plugins, and build scripts:
|
||||
|
||||
- Download and install [Node.js](https://nodejs.org/) (it includes npm) for your platform.
|
||||
|
||||
## Start a new Doks project
|
||||
|
||||
|
@ -23,6 +25,23 @@ Create a new site, change directories, install dependencies, and start developme
|
|||
|
||||
### Create a new site
|
||||
|
||||
Doks is available as a child theme, and a starter theme:
|
||||
|
||||
- Use the Doks child theme, if you do __not__ plan to customize a lot, and/or need future Doks updates.
|
||||
- Use the Doks starter theme, if you plan to customize a lot, and/or do __not__ need future Doks updates.
|
||||
|
||||
Not quite sure? Use the Doks child theme.
|
||||
|
||||
#### Doks child theme
|
||||
|
||||
{{< btn-copy text="git clone https://github.com/h-enk/doks-child-theme.git my-doks-site" >}}
|
||||
|
||||
```bash
|
||||
git clone https://github.com/h-enk/doks-child-theme.git my-doks-site
|
||||
```
|
||||
|
||||
#### Doks starter theme
|
||||
|
||||
{{< btn-copy text="git clone https://github.com/h-enk/doks.git my-doks-site" >}}
|
||||
|
||||
```bash
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<p>Get A+ scores on <a href="https://observatory.mozilla.org/analyze/doks.netlify.app">Mozilla Observatory</a> out of the box. Easily change the default Security Headers to suit your needs.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4">Fast by default</h2>
|
||||
<h2 class="h4">Fast by default ⚡️</h2>
|
||||
<p>Get 100 scores on <a href="https://googlechrome.github.io/lighthouse/viewer/?gist=7731347bb8ce999eff7428a8e763b637">Google Lighthouse</a> by default. Doks removes unused css, prefetches links, and lazy loads images.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
|
|
Loading…
Reference in New Issue