diff --git a/config/_default/menus.toml b/config/_default/menus.toml index 3426f62..7ed4bca 100644 --- a/config/_default/menus.toml +++ b/config/_default/menus.toml @@ -4,12 +4,6 @@ identifier = "prologue" url = "/docs/prologue/" -[[docs]] - name = "Examples" - weight = 20 - identifier = "examples" - url = "/docs/examples/" - [[docs]] name = "Help" weight = 60 diff --git a/content/docs/examples/_index.md b/content/docs/examples/_index.md deleted file mode 100644 index dadd987..0000000 --- a/content/docs/examples/_index.md +++ /dev/null @@ -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: [] ---- diff --git a/content/docs/examples/code.md b/content/docs/examples/code.md deleted file mode 100644 index d292a5e..0000000 --- a/content/docs/examples/code.md +++ /dev/null @@ -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 ( -
- {block} -
- ) -} - -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 -``` diff --git a/content/docs/examples/math.md b/content/docs/examples/math.md deleted file mode 100644 index 729a3e7..0000000 --- a/content/docs/examples/math.md +++ /dev/null @@ -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. diff --git a/content/docs/help/faq.md b/content/docs/help/faq.md index 1ec59f9..826586b 100644 --- a/content/docs/help/faq.md +++ b/content/docs/help/faq.md @@ -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) diff --git a/content/docs/help/how-to-update.md b/content/docs/help/how-to-update.md index 0129cdc..43cb1f4 100644 --- a/content/docs/help/how-to-update.md +++ b/content/docs/help/how-to-update.md @@ -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 semantic versioning and advanced range syntax." >}} -## 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>/] ...] +``` + +## 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 [...] ``` diff --git a/content/docs/prologue/commands.md b/content/docs/prologue/commands.md index b5818d1..b7922ee 100644 --- a/content/docs/prologue/commands.md +++ b/content/docs/prologue/commands.md @@ -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: diff --git a/content/docs/prologue/introduction.md b/content/docs/prologue/introduction.md index 64483e4..e1a62de 100644 --- a/content/docs/prologue/introduction.md +++ b/content/docs/prologue/introduction.md @@ -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 diff --git a/content/docs/prologue/quick-start.md b/content/docs/prologue/quick-start.md index 6b6c25c..89e1032 100644 --- a/content/docs/prologue/quick-start.md +++ b/content/docs/prologue/quick-start.md @@ -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 diff --git a/layouts/index.html b/layouts/index.html index 0205c33..87f3caa 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -22,7 +22,7 @@

Get A+ scores on Mozilla Observatory out of the box. Easily change the default Security Headers to suit your needs.

-

Fast by default

+

Fast by default ⚡️

Get 100 scores on Google Lighthouse by default. Doks removes unused css, prefetches links, and lazy loads images.