forked from lix-project/lix-website
Merge pull request 'Update website for 2.90.0 release' (#30) from jade/lix-2.90 into main
Reviewed-on: lix-project/lix-website#30 Reviewed-by: Qyriad <qyriad@fastmail.com>
This commit is contained in:
commit
8568afd19c
16
config.yaml
16
config.yaml
|
@ -46,16 +46,20 @@ menus:
|
|||
url: "/faq"
|
||||
weight: 2
|
||||
|
||||
#- name: "Docs"
|
||||
# url: "/#"
|
||||
# weight: 4
|
||||
|
||||
- name: "Resources"
|
||||
url: "/resources"
|
||||
weight: 5
|
||||
weight: 3
|
||||
|
||||
- name: "Community"
|
||||
url: "/community"
|
||||
weight: 4
|
||||
|
||||
- name: News
|
||||
url: "/blog"
|
||||
weight: 5
|
||||
|
||||
- name: "Docs"
|
||||
url: "https://docs.lix.systems/manual/lix/stable"
|
||||
weight: 6
|
||||
|
||||
- name: "Code"
|
||||
|
@ -67,7 +71,7 @@ menus:
|
|||
weight: 8
|
||||
|
||||
buttons:
|
||||
- name: "Install Lix (beta)"
|
||||
- name: "Install Lix"
|
||||
url: "/install"
|
||||
weight: 5
|
||||
pre: "btn btn-primary text-light"
|
||||
|
|
|
@ -43,7 +43,7 @@ You can verify that it works by running the following command:
|
|||
|
||||
```sh
|
||||
$ nix --version
|
||||
nix (Lix, like Nix) 2.90.0-rc1
|
||||
nix (Lix, like Nix) 2.90.0
|
||||
```
|
||||
|
||||
# Using the Lix NixOS module
|
||||
|
@ -68,7 +68,7 @@ Adding Lix to a flake-based configuration is relatively simple. First, add the L
|
|||
# which is often the case. If you've named it something else,
|
||||
# you'll need to change the `nixpkgs` below.
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -145,7 +145,7 @@ You should now be using Lix! You can verify this by asking the `nix` command to
|
|||
|
||||
```sh
|
||||
$ nix --version
|
||||
nix (Lix, like Nix) 2.90.0-rc1
|
||||
nix (Lix, like Nix) 2.90.0
|
||||
```
|
||||
|
||||
As long as you see `Lix` in the output, you're good! If you're not sure what to do now, it's a
|
||||
|
@ -172,20 +172,20 @@ section, and add the line provided in the configuration
|
|||
#
|
||||
# The sha256 hashes were obtained with the following command in Lix (n.b.
|
||||
# this relies on --unpack, which is only in Lix and CppNix > 2.18):
|
||||
# nix store prefetch-file --name source --unpack https://git.lix.systems/lix-project/lix/archive/2.90.0-rc1.tar.gz
|
||||
# nix store prefetch-file --name source --unpack https://git.lix.systems/lix-project/lix/archive/2.90.0.tar.gz
|
||||
#
|
||||
# Note that the tag (e.g. v2.90) in the URL here is what determines
|
||||
# Note that the tag (e.g. 2.90.0) in the URL here is what determines
|
||||
# which version of Lix you'll wind up with.
|
||||
(let
|
||||
module = fetchTarball {
|
||||
name = "source";
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
|
||||
sha256 = "sha256-64lB/NO6AQ6z6EDCemPSYZWX/Qc6Rt04cPia5T5v01g=";
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
|
||||
sha256 = "sha256-yEO2cGNgzm9x/XxiDQI+WckSWnZX63R8aJLBRSXtYNE=";
|
||||
};
|
||||
lixSrc = fetchTarball {
|
||||
name = "source";
|
||||
url = "https://git.lix.systems/lix-project/lix/archive/2.90.0-rc1.tar.gz";
|
||||
sha256 = "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=";
|
||||
url = "https://git.lix.systems/lix-project/lix/archive/2.90.0.tar.gz";
|
||||
sha256 = "sha256-f8k+BezKdJfmE+k7zgBJiohtS3VkkriycdXYsKOm3sc=";
|
||||
};
|
||||
# This is the core of the code you need; it is an exercise to the
|
||||
# reader to write the sources in a nicer way, or by using npins or
|
||||
|
@ -222,7 +222,7 @@ You should now be using Lix! You can verify this by asking the `nix` command to
|
|||
|
||||
```sh
|
||||
$ nix --version
|
||||
nix (Lix, like Nix) 2.90.0-rc1-lixpre20240615-253546d
|
||||
nix (Lix, like Nix) 2.90.0
|
||||
```
|
||||
|
||||
As long as you see `Lix` in the output, you're good! If you're not sure what to do now, it's a
|
||||
|
|
228
content/blog/2024-07-10-lix-2.90-release.md
Normal file
228
content/blog/2024-07-10-lix-2.90-release.md
Normal file
|
@ -0,0 +1,228 @@
|
|||
+++
|
||||
title = "Announcing Lix 2.90 \"Vanilla Ice Cream\""
|
||||
author = "Lix Team"
|
||||
+++
|
||||
|
||||
We at the Lix team are proud to announce our first release, version 2.90
|
||||
"Vanilla Ice Cream". This release focuses on foundations and reliability, but
|
||||
nevertheless contains several small but exciting user-facing features that are
|
||||
exclusive to Lix.
|
||||
|
||||
Lix is a Nix implementation focused on reliability, predictability,
|
||||
friendliness, developed by a community of people from
|
||||
around the world. We have long term plans to incrementally evolve Nix to work
|
||||
in more places, to make it more reliable and secure, and to update
|
||||
the language and semantics to correct past mistakes and reduce
|
||||
errors, all the while providing an amazing tooling experience.
|
||||
|
||||
Lix forks from CppNix version 2.18, which is the default version of Nix in
|
||||
NixOS 23.11 and 24.05. It includes backports for most bug fixes in later versions of
|
||||
CppNix, as well as various reliability improvements, and many improvements to user
|
||||
experience. Our goal with Lix 2.90 is to create a better Nix 2.18: faster, more
|
||||
user friendly, with fewer bugs, and fully compatible with previously-valid
|
||||
Nix code including flakes.
|
||||
|
||||
Some highlights of this release include:
|
||||
|
||||
- `:doc` in `nix repl` now works on lambdas, in addition to built-in functions
|
||||
as before, thanks to [Lunaphied] and [jade]:
|
||||
|
||||
```
|
||||
dev/nixpkgs » nix repl -f .
|
||||
Lix 2.90.0-lixpre20240520-992c63f
|
||||
Type :? for help.
|
||||
Loading installable ''...
|
||||
Added 21430 variables.
|
||||
nix-repl> :doc lib.forEach
|
||||
Synopsis: func = xs: f: ...
|
||||
|
||||
| Apply the function to each element in the list.
|
||||
| Same as `map`, but arguments flipped.
|
||||
|
|
||||
| Inputs
|
||||
|
|
||||
| `xs`
|
||||
|
|
||||
| : 1\. Function argument
|
||||
|
|
||||
| `f`
|
||||
|
|
||||
| : 2\. Function argument
|
||||
|
|
||||
| Type
|
||||
|
|
||||
| ``
|
||||
| forEach :: [a] -> (a -> b) -> [b]
|
||||
| ``
|
||||
|
|
||||
| Examples
|
||||
| :::{.example}
|
||||
|
||||
# lib.lists.forEach usage example
|
||||
|
||||
| ``nix
|
||||
| forEach [ 1 2 ] (x:
|
||||
| toString x
|
||||
| )
|
||||
| => [ "1" "2" ]
|
||||
| ``
|
||||
|
|
||||
| :::
|
||||
|
||||
/home/jade/dev/nixpkgs/lib/lists.nix:77
|
||||
|
||||
```
|
||||
- `nix repl` supports creating shortcuts using the [`repl-overlays`][repl-overlays]
|
||||
setting, thanks to [wiggles]. For example, one can create a shortcut to
|
||||
`legacyPackages.${currentSystem}` with the following repl overlay, configured
|
||||
as a file in the `repl-overlays` setting in `~/.config/nix/nix.conf`:
|
||||
|
||||
```nix
|
||||
{ currentSystem, ...}: final: prev: let
|
||||
optionalAttrs = predicate: attrs:
|
||||
if predicate
|
||||
then attrs
|
||||
else {};
|
||||
in
|
||||
optionalAttrs (prev ? legacyPackages && prev.legacyPackages ? ${currentSystem})
|
||||
{
|
||||
pkgs = prev.legacyPackages.${currentSystem};
|
||||
}
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
```
|
||||
~ » nix repl nixpkgs
|
||||
Lix 2.90.0-lixpre20240520-992c63f
|
||||
Type :? for help.
|
||||
Loading installable 'flake:nixpkgs#'...
|
||||
Added 5 variables.
|
||||
Loading 'repl-overlays'...
|
||||
Added 6 variables.
|
||||
nix-repl> pkgs.hello
|
||||
«derivation /nix/store/w0hjp1fnvyf1z30s29fj4im8c7bxqrql-hello-2.12.1.drv»
|
||||
```
|
||||
- Evaluation is 5-20% faster than 2.18, depending on which benchmark is in use,
|
||||
thanks to [eldritch horrors].
|
||||
- Various user experience issues have been fixed. For example:
|
||||
- Error reporting has been fixed to be more accurate in several cases thanks
|
||||
to [wiggles], and errors give more details to diagnose them.
|
||||
|
||||
For instance, type errors now give the actual value that caused the error.
|
||||
- `nix flake lock --update-input nixpkgs` is now the much more reasonable
|
||||
`nix flake update nixpkgs`.
|
||||
- `nix build -E` is now an alias for `nix build --expr`, mirroring `nix-build
|
||||
-E`.
|
||||
- Several very silly `--debugger` bugs that one runs into in normal usage
|
||||
have been fixed thanks to [wiggles], so the debugger actually works properly
|
||||
without a mental index of all the bugs in it.
|
||||
- The Lix evaluation cache no longer caches failures, so "cached failure" is an
|
||||
error of the past.
|
||||
- The REPL value printer now intelligently chooses whether to print on one
|
||||
line or multiple lines, rather than putting everything on one very long
|
||||
line.
|
||||
- Various failures that were silent in the past are no longer silent:
|
||||
- The Lix daemon warns when it rejects a setting from a client that requires
|
||||
being a trusted user, instead of silently ignoring it.
|
||||
- Remote builds failing to connect to a builder now print the error.
|
||||
- Crashing the daemon now indicates that is what probably happened.
|
||||
- Lix now generally crashes much harder in the case of bugs, such that bugs
|
||||
are easier to find and fix.
|
||||
- Various errors have been made more specific, like "path is invalid".
|
||||
- Several hauntings have been exorcised from the codebase:
|
||||
- Flake input overrides like `foo.inputs.bar.inputs.nixpkgs` now work as
|
||||
documented rather than being ignored.
|
||||
- Store path names starting with `.` are now permitted, fixing some home-manager
|
||||
issues.
|
||||
- A crash when running patched kernels with non-default schedulers has been
|
||||
fixed.
|
||||
- Breakage inside the sandbox when running on systems with unprivileged user
|
||||
namespaces disabled has been fixed.
|
||||
- Various format string crashes have been fixed.
|
||||
- `nix doctor` now has correct output of client trustedness.
|
||||
|
||||
[wiggles]: https://github.com/9999years
|
||||
[eldritch horrors]: https://git.lix.systems/pennae
|
||||
[Lunaphied]: https://github.com/lunaphied
|
||||
[jade]: https://jade.fyi
|
||||
|
||||
[repl-overlays]: https://docs.lix.systems/manual/lix/2.90/command-ref/conf-file.html#conf-repl-overlays
|
||||
|
||||
A lot of internal stability work and development process work has gone into
|
||||
this release. For instance:
|
||||
- Lix builds exclusively with the Meson build system. The historical CppNix
|
||||
Make-based build system has been removed altogether. This improves
|
||||
compile times as well as various aspects of the developer experience: the `clangd`
|
||||
language server just works with no configuration now, for instance.
|
||||
- Lix has the beginnings of the infrastructure to do linting of its C++ code and work on
|
||||
modernization with automated tools.
|
||||
- Lix enforces various aspects of [its
|
||||
styleguide][styleguide] with `pre-commit` hooks.
|
||||
- A lot of onboarding and project planning information has been written down in
|
||||
the [Wiki]. In general we strive to be transparent with our plans and
|
||||
priorities, and to communicate them clearly.
|
||||
- We have completed a release automation project, which should let us release more
|
||||
frequently given that our `main` is more or less releaseable on any given day.
|
||||
- We have built out a lot of infrastructure which we own end-to-end, allowing
|
||||
us to quickly improve on pain points in the project ourselves.
|
||||
- We have [Single Sign-On](https://identity.lix.systems) permitting us to
|
||||
easily deploy more services that cleanly integrate together.
|
||||
- We use [Gerrit](https://gerrit.lix.systems) for reviews, which allows us to
|
||||
focus on providing prompt and high quality patch reviews by making it easy
|
||||
to review changes piece by piece, with CI testing of every commit.
|
||||
|
||||
Gerrit is one of our secret superpowers in shipping correct code, since it,
|
||||
by its structure, enforces good commit history, reviewable code, and
|
||||
incremental changes.
|
||||
- We use [Forgejo](https://git.lix.systems) for code hosting and issue
|
||||
tracking, which we have customised to integrate natively with Gerrit and
|
||||
to work natively with Nix flakes for locking tarballs.
|
||||
- We have a [Wiki] with design documents, styleguide, and other project
|
||||
organisational information.
|
||||
|
||||
[Wiki]: https://wiki.lix.systems
|
||||
|
||||
[styleguide]: https://wiki.lix.systems/books/lix-contributors/chapter/style-guide
|
||||
|
||||
For a more comprehensive list of the changes in this release, see
|
||||
[the release notes][release-notes].
|
||||
|
||||
[release-notes]: https://docs.lix.systems/manual/lix/2.90/release-notes/rl-2.90.html
|
||||
|
||||
The Lix team as well as several dozen beta testers have been running a
|
||||
development release of Lix 2.90 in production every day for a couple of months,
|
||||
and we do not expect any significant regressions compared to Nix 2.18. However,
|
||||
if you find a bug or suspicious behaviour in Lix, feel free to mention it on
|
||||
Matrix or [file a bug on Forgejo][bugs]. If you would like to participate in
|
||||
beta testing of future Lix versions, we have a [guide on the wiki][beta-guide]
|
||||
and a [Matrix channel][beta-channel] for running `main`.
|
||||
|
||||
[bugs]: https://git.lix.systems/lix-project/lix/issues
|
||||
[beta-guide]: https://wiki.lix.systems/books/lix-contributors/page/lix-beta-guide
|
||||
[beta-channel]: https://matrix.to/#/#open-beta:lix.systems
|
||||
|
||||
We would especially like to thank all the following groups for their hard work
|
||||
and trust in contributing to this release:
|
||||
- The several dozen Lix beta testers who have been running Lix `main` in
|
||||
production for over a month, and who have helped us fix the various
|
||||
longstanding CppNix bugs they have had stuck in their craw as well as put up
|
||||
with our work-in-progress infrastructure as we built it out.
|
||||
- All the first time contributors who made their first contributions to a Nix
|
||||
implementation in Lix. We are eternally grateful to everyone who helped us out
|
||||
on the numerous important but tedious issues.
|
||||
- All the people new to Nix who have trusted us by running experimental
|
||||
versions of Lix and given us feedback.
|
||||
- The long time CppNix contributors who came to Lix and helped out with fixing
|
||||
many issues.
|
||||
- The CppNix contributors and CppNix team, without whom we would not have this
|
||||
software, and who wrote many of the bug fixes we backported to Lix from CppNix
|
||||
versions > 2.18.
|
||||
- Everyone else who has worked with us on starting to make this dream a
|
||||
reality.
|
||||
|
||||
We are very proud of what everyone has achieved with this release since we
|
||||
begun in late February 2024, and we are just getting started. We are looking
|
||||
forward to continue working together with everyone to build a better foundation
|
||||
for the future evolution of Nix.
|
||||
|
6
content/blog/_index.md
Normal file
6
content/blog/_index.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
+++
|
||||
aliases = ["posts", "articles", "blog", "news"]
|
||||
title = "News"
|
||||
author = "Lix Team"
|
||||
tags = ["index"]
|
||||
+++
|
|
@ -80,7 +80,7 @@ to report its version:
|
|||
|
||||
```sh
|
||||
$ nix --version
|
||||
nix (Lix, like Nix) 2.90.0-rc1-lixpre20240615-253546d
|
||||
nix (Lix, like Nix) 2.90.0
|
||||
```
|
||||
|
||||
As long as you see `Lix` in the output, you're good! If you're not sure what to do now, it's a
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
+++
|
||||
aliases = ["posts", "articles", "blog", "showcase", "docs"]
|
||||
title = "Posts"
|
||||
author = "Hugo Authors"
|
||||
tags = ["index"]
|
||||
+++
|
|
@ -1,46 +0,0 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Emoji Support"
|
||||
date = "2019-03-05"
|
||||
description = "Guide to emoji usage in Hugo"
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
+++
|
||||
|
||||
Emoji can be enabled in a Hugo project in a number of ways.
|
||||
<!--more-->
|
||||
The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
|
||||
To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
|
||||
|
||||
<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
|
||||
<br>
|
||||
|
||||
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
|
||||
|
||||
***
|
||||
|
||||
**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
|
||||
|
||||
{{< highlight html >}}
|
||||
.emoji {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
}
|
||||
{{< /highlight >}}
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.emojify {
|
||||
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
|
||||
font-size: 2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width:650px) {
|
||||
.nowrap {
|
||||
display: block;
|
||||
margin: 25px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{{< /css.inline >}}
|
|
@ -1,148 +0,0 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Markdown Syntax Guide"
|
||||
date = "2019-03-11"
|
||||
description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||
tags = [
|
||||
"markdown",
|
||||
"css",
|
||||
"html",
|
||||
]
|
||||
categories = [
|
||||
"themes",
|
||||
"syntax",
|
||||
]
|
||||
series = ["Themes Guide"]
|
||||
aliases = ["migrate-from-jekyl"]
|
||||
+++
|
||||
|
||||
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||
<!--more-->
|
||||
|
||||
## Headings
|
||||
|
||||
The following HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
## Paragraph
|
||||
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
## Blockquotes
|
||||
|
||||
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
|
||||
|
||||
#### Blockquote without attribution
|
||||
|
||||
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
|
||||
> **Note** that you can use *Markdown syntax* within a blockquote.
|
||||
|
||||
#### Blockquote with attribution
|
||||
|
||||
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||
> — <cite>Rob Pike[^1]</cite>
|
||||
|
||||
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||
|
||||
## Tables
|
||||
|
||||
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
|
||||
|
||||
Name | Age
|
||||
--------|------
|
||||
Bob | 27
|
||||
Alice | 23
|
||||
|
||||
#### Inline Markdown within tables
|
||||
|
||||
| Italics | Bold | Code |
|
||||
| -------- | -------- | ------ |
|
||||
| *italics* | **bold** | `code` |
|
||||
|
||||
## Code Blocks
|
||||
|
||||
#### Code block with backticks
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
#### Code block indented with four spaces
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
#### Code block with Hugo's internal highlight shortcode
|
||||
{{< highlight html >}}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example HTML5 Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /highlight >}}
|
||||
|
||||
## List Types
|
||||
|
||||
#### Ordered List
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
|
||||
* List item
|
||||
* Another item
|
||||
* And another item
|
||||
|
||||
#### Nested list
|
||||
|
||||
* Fruit
|
||||
* Apple
|
||||
* Orange
|
||||
* Banana
|
||||
* Dairy
|
||||
* Milk
|
||||
* Cheese
|
||||
|
||||
## Other Elements — abbr, sub, sup, kbd, mark
|
||||
|
||||
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
|
||||
|
||||
H<sub>2</sub>O
|
||||
|
||||
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
||||
|
||||
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
author: Hugo Authors
|
||||
title: Math Typesetting
|
||||
date: 2019-03-08
|
||||
description: A brief guide to setup KaTeX
|
||||
math: true
|
||||
---
|
||||
|
||||
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
|
||||
<!--more-->
|
||||
|
||||
In this example we will be using [KaTeX](https://katex.org/)
|
||||
|
||||
- Create a partial under `/layouts/partials/math.html`
|
||||
- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally.
|
||||
- Include the partial in your templates like so:
|
||||
|
||||
```bash
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
- To enable KaTex globally set the parameter `math` to `true` in a project's configuration
|
||||
- To enable KaTex on a per page basis include the parameter `math: true` in content files
|
||||
|
||||
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)
|
||||
|
||||
{{< math.inline >}}
|
||||
{{ if or .Page.Params.math .Site.Params.math }}
|
||||
<!-- KaTeX -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||||
{{ end }}
|
||||
{{</ math.inline >}}
|
||||
|
||||
### Examples
|
||||
|
||||
{{< math.inline >}}
|
||||
<p>
|
||||
Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\)
|
||||
</p>
|
||||
{{</ math.inline >}}
|
||||
|
||||
Block math:
|
||||
$$
|
||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||
$$
|
|
@ -1,45 +0,0 @@
|
|||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Placeholder Text"
|
||||
date = "2019-03-09"
|
||||
description = "Lorem Ipsum Dolor Si Amet"
|
||||
tags = [
|
||||
"markdown",
|
||||
"text",
|
||||
]
|
||||
+++
|
||||
|
||||
Lorem est tota propiore conpellat pectoribus de pectora summo. <!--more-->Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
|
||||
|
||||
1. Exierant elisi ambit vivere dedere
|
||||
2. Duce pollice
|
||||
3. Eris modo
|
||||
4. Spargitque ferrea quos palude
|
||||
|
||||
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis.
|
||||
|
||||
1. Comas hunc haec pietate fetum procerum dixit
|
||||
2. Post torum vates letum Tiresia
|
||||
3. Flumen querellas
|
||||
4. Arcanaque montibus omnes
|
||||
5. Quidem et
|
||||
|
||||
# Vagus elidunt
|
||||
|
||||
<svg class="canon" xmlns="http://www.w3.org/2000/svg" overflow="visible" viewBox="0 0 496 373" height="373" width="496"><g fill="none"><path stroke="#000" stroke-width=".75" d="M.599 372.348L495.263 1.206M.312.633l494.95 370.853M.312 372.633L247.643.92M248.502.92l246.76 370.566M330.828 123.869V1.134M330.396 1.134L165.104 124.515"></path><path stroke="#ED1C24" stroke-width=".75" d="M275.73 41.616h166.224v249.05H275.73zM54.478 41.616h166.225v249.052H54.478z"></path><path stroke="#000" stroke-width=".75" d="M.479.375h495v372h-495zM247.979.875v372"></path><ellipse cx="498.729" cy="177.625" rx=".75" ry="1.25"></ellipse><ellipse cx="247.229" cy="377.375" rx=".75" ry="1.25"></ellipse></g></svg>
|
||||
|
||||
[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon)
|
||||
|
||||
## Mane refeci capiebant unda mulcebat
|
||||
|
||||
Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
|
||||
|
||||
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et.
|
||||
|
||||
Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**.
|
||||
|
||||
{{< css.inline >}}
|
||||
<style>
|
||||
.canon { background: white; width: 100%; height: auto; }
|
||||
</style>
|
||||
{{< /css.inline >}}
|
|
@ -20,16 +20,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1713995372,
|
||||
"narHash": "sha256-fFE3M0vCoiSwCX02z8VF58jXFRj9enYUSTqjyHAjrds=",
|
||||
"lastModified": 1720553833,
|
||||
"narHash": "sha256-IXMiHQMtdShDXcBW95ctA+m5Oq2kLxnBt7WlMxvDQXA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dd37924974b9202f8226ed5d74a252a9785aedf8",
|
||||
"rev": "249fbde2a178a2ea2638b65b9ecebd531b338cf9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# The sources we depend on.
|
||||
#
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 69 KiB |
Binary file not shown.
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 69 KiB |
Binary file not shown.
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 67 KiB |
Binary file not shown.
Before Width: | Height: | Size: 67 KiB |
Loading…
Reference in a new issue