From: hulkoba Date: Wed, 24 Jan 2024 11:51:03 +0000 (+0100) Subject: Add GitHub Page website from docs X-Git-Tag: v21~84^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5068e99cf254b675c6a4374338eafcc9534f57ba;p=thirdparty%2Fmkosi.git Add GitHub Page website from docs --- diff --git a/docs/_data/extra_pages.json b/docs/_data/extra_pages.json new file mode 100644 index 000000000..003cafd9e --- /dev/null +++ b/docs/_data/extra_pages.json @@ -0,0 +1,8 @@ +[ + { "category": "Project", "title": "Brand", "url": "https://brand.systemd.io/" }, + { "category": "Project", "title": "Releases", "url": "https://github.com/systemd/mkosi/releases" }, + { "category": "Project", "title": "GitHub Project Page", "url": "https://github.com/systemd/mkosi" }, + { "category": "Project", "title": "Issues", "url": "https://github.com/systemd/mkosi/issues" }, + { "category": "Project", "title": "Pull Requests", "url": "https://github.com/systemd/mkosi/pulls" }, + { "category": "Man page", "title": "A longer description and available features and options", "url": "https://github.com/systemd/mkosi/blob/main/mkosi/resources/mkosi.md" } +] diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html new file mode 100644 index 000000000..9b502a1c0 --- /dev/null +++ b/docs/_includes/footer.html @@ -0,0 +1,7 @@ + + + diff --git a/docs/_includes/head.html b/docs/_includes/head.html new file mode 100644 index 000000000..ae39a3c6a --- /dev/null +++ b/docs/_includes/head.html @@ -0,0 +1,16 @@ + + + + + + + + + {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} + + + + + + + diff --git a/docs/_includes/header.html b/docs/_includes/header.html new file mode 100644 index 000000000..99c4b3aa8 --- /dev/null +++ b/docs/_includes/header.html @@ -0,0 +1,10 @@ + + diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 000000000..989178db3 --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,12 @@ + + + + {% include head.html %} + + {% include header.html %} +
+ {{ content }} +
+ {% include footer.html %} + + diff --git a/docs/_layouts/forward.html b/docs/_layouts/forward.html new file mode 100644 index 000000000..5d3799b06 --- /dev/null +++ b/docs/_layouts/forward.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + Redirecting to {{ page.target }} + + + {% include header.html %} +
+

+ This document has moved.
+ Redirecting to {{ page.target }}. +

+
+ + diff --git a/docs/assets/systemd-logo.svg b/docs/assets/systemd-logo.svg new file mode 100644 index 000000000..5885e7e76 --- /dev/null +++ b/docs/assets/systemd-logo.svg @@ -0,0 +1,7 @@ + diff --git a/docs/bootable.md b/docs/bootable.md index 9a836ae0e..65056ca62 100644 --- a/docs/bootable.md +++ b/docs/bootable.md @@ -1,3 +1,10 @@ +--- +title: Building a bootable image on different distros +category: Documentation +layout: default +SPDX-License-Identifier: LGPL-2.1-or-later +--- + # Building a bootable image on different distros To build a bootable image, you'll need to install a list of packages that differs depending on the @@ -6,7 +13,7 @@ distributions: ## Arch -``` +```conf [Content] Packages=linux systemd @@ -14,7 +21,7 @@ Packages=linux ## Fedora -``` +```conf [Content] Packages=kernel systemd @@ -25,7 +32,7 @@ Packages=kernel ## CentOS -``` +```conf [Content] Packages=kernel systemd @@ -35,7 +42,7 @@ Packages=kernel ## Debian -``` +```conf [Content] Packages=linux-image-generic systemd @@ -47,7 +54,7 @@ Packages=linux-image-generic ## Ubuntu -``` +```conf [Content] Repositories=main,universe Packages=linux-image-generic @@ -59,7 +66,7 @@ Packages=linux-image-generic ## Opensuse -``` +```conf [Content] Packages=kernel-default systemd diff --git a/docs/building-rpms-from-source.md b/docs/building-rpms-from-source.md index 199a41edc..5511a5abb 100644 --- a/docs/building-rpms-from-source.md +++ b/docs/building-rpms-from-source.md @@ -1,3 +1,10 @@ +--- +title: Building RPMs from source with mkosi +category: Documentation +layout: default +SPDX-License-Identifier: LGPL-2.1-or-later +--- + # Building RPMs from source with mkosi If you want to build an RPM from source and install it within a mkosi diff --git a/docs/distribution-policy.md b/docs/distribution-policy.md index 458b5d57d..87514056b 100644 --- a/docs/distribution-policy.md +++ b/docs/distribution-policy.md @@ -1,3 +1,10 @@ +--- +title: Adding new distributions +category: Documentation +layout: default +SPDX-License-Identifier: LGPL-2.1-or-later +--- + # Adding new distributions Merging support for a new distribution in mkosi depends on a few diff --git a/docs/favicon.png b/docs/favicon.png new file mode 100644 index 000000000..f4b5cc146 Binary files /dev/null and b/docs/favicon.png differ diff --git a/docs/fonts/heebo-bold.woff b/docs/fonts/heebo-bold.woff new file mode 100644 index 000000000..1e45115e1 Binary files /dev/null and b/docs/fonts/heebo-bold.woff differ diff --git a/docs/fonts/heebo-regular.woff b/docs/fonts/heebo-regular.woff new file mode 100644 index 000000000..484eae455 Binary files /dev/null and b/docs/fonts/heebo-regular.woff differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..f3beac5a7 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,24 @@ +--- +layout: default +SPDX-License-Identifier: LGPL-2.1-or-later +--- + +# mkosi — Build Bespoke OS Images + +A fancy wrapper around `dnf --installroot`, `apt`, `pacman` and `zypper` that generates customized disk images with a number of bells and whistles. + +--- + +{% assign by_category = site.pages | group_by:"category" %} +{% assign extra_pages = site.data.extra_pages | group_by:"category" %} +{% assign merged = by_category | concat: extra_pages | sort:"name" %} + +{% for pair in merged %} + {% if pair.name != "" %} +## {{ pair.name }} +{% assign sorted = pair.items | sort:"title" %}{% for page in sorted %} +* [{{ page.title }}]({{ page.url | relative_url }}){% endfor %} + {% endif %} +{% endfor %} + +--- diff --git a/docs/initrd.md b/docs/initrd.md index e1e932e21..177dbc085 100644 --- a/docs/initrd.md +++ b/docs/initrd.md @@ -1,8 +1,16 @@ +--- +title: Building a custom initrd and using it in a mkosi image +category: Documentation +layout: default +SPDX-License-Identifier: LGPL-2.1-or-later +--- + # Building a custom initrd and using it in a mkosi image Building an image with a mkosi-built initrd is a two step process, because you will build two images - the initrd and your distribution image. 1. Build an initrd image using the `cpio` output format with the same target distributions as you want to use for your distribution image. mkosi compresses the `cpio` output format by default. -``` + +```conf [Output] Format=cpio @@ -11,10 +19,13 @@ Packages=systemd udev kmod ``` + 2. Invoke `mkosi` passing the initrd image via the `--initrd` option or add the `Initrd=` option to your mkosi config when building your distribution image. + ```bash mkosi --initrd= ... ``` + This will build an image using the provided initrd image. mkosi will add the kernel modules found in the distribution image to this initrd. diff --git a/docs/style.css b/docs/style.css new file mode 100644 index 000000000..6fb55ac27 --- /dev/null +++ b/docs/style.css @@ -0,0 +1,490 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +@font-face { + font-family: 'Heebo'; + src: url('fonts/heebo-regular.woff'); + font-weight: 400; +} + +@font-face { + font-family: 'Heebo'; + src: url('fonts/heebo-bold.woff'); + font-weight: 600; +} + +/* Variables */ +:root { + --sd-brand-black: hsl(270, 19%, 13%); /* #201A26; */ + --sd-brand-green: hsl(145, 66%, 51%); /* #30D475; */ + --sd-brand-white: #fff; + + --sd-black: hsl(270, 7%, 13%); + --sd-green: hsl(145, 66%, 43%); /* #26b763 */ + --sd-gray-extralight: hsl(30, 10%, 96%); /* #f6f5f4 */ + --sd-gray-light: hsl(30, 10%, 92%); + --sd-gray: hsl(30, 10%, 85%); + --sd-gray-dark: hsl(257, 23%, 20%); + --sd-gray-extradark: hsl(257, 23%, 16%); /* #241f31 */ + --sd-blue: hsl(200, 66%, 55%); + + --sd-highlight-bg-light: rgba(255, 255, 255, 1); + --sd-highlight-bg-dark: rgba(0, 0, 0, .6); + --sd-highlight-inline-bg-light: rgba(0, 0, 0, 0.07); + --sd-highlight-inline-bg-dark: rgba(255, 255, 255, 0.1); + + --sd-font-weight-normal: 400; + --sd-font-weight-bold: 600; + + /* Light mode variables */ + --sd-foreground-color: var(--sd-gray-extradark); + --sd-background-color: var(--sd-gray-extralight); + --sd-logo-color: var(--sd-brand-black); + --sd-link-color: var(--sd-green); + --sd-small-color: var(--sd-gray-dark); + --sd-highlight-bg: var(--sd-highlight-bg-light); + --sd-highlight-inline-bg: var(--sd-highlight-inline-bg-light); + --sd-link-font-weight: var(--sd-font-weight-bold); + --sd-table-row-bg: var(--sd-highlight-inline-bg-light); + --sd-table-row-hover-bg: var(--sd-gray); +} + +@media (prefers-color-scheme: dark) { + :root { + color-scheme: dark; + --sd-foreground-color: var(--sd-gray); + --sd-background-color: var(--sd-black); + --sd-logo-color: var(--sd-brand-white); + --sd-link-color: var(--sd-brand-green); + --sd-small-color: var(--sd-gray); + --sd-highlight-bg: var(--sd-highlight-bg-dark); + --sd-highlight-inline-bg: var(--sd-highlight-inline-bg-dark); + --sd-link-font-weight: var(--sd-font-weight-normal); + --sd-table-row-bg: var(--sd-highlight-inline-bg-dark); + --sd-table-row-hover-bg: var(--sd-highlight-bg-dark); + } +} + +/* Typography */ +* { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +html, body { + margin: 0; + padding: 0; + font-size: 1rem; + font-family: "Heebo", sans-serif; + font-weight: 400; + line-height: 1.6; +} +body { + color: var(--sd-foreground-color); + background-color: var(--sd-background-color); +} +h1, h2, h3, h4, h5, h6 { + margin: 1rem 0 0.625rem; + font-weight: 600; + line-height: 1.25; +} +h1 { + text-align: center; + font-size: 1.87rem; + font-weight: 400; + font-style: normal; + margin-bottom: 2rem; +} +@media screen and (min-width: 650px) { + img { + margin-left: 10%; + margin-right: 10%; + } + h1 { + font-size: 2.375em; + } +} +h2 { + font-size: 1.25rem; + margin-top: 2.5em; +} +h3 { + font-size: 1.15rem; +} +a { + font-weight: var(--sd-link-font-weight); + text-decoration: none; + color: var(--sd-link-color); + cursor: pointer; +} +a:hover { + text-decoration: underline; +} +b { + font-weight: 600; +} +small { + color: var(--sd-small-color); +} +hr { + margin: 3rem auto 4rem; + width: 40%; + opacity: 40%; +} + +/* Layout */ +.container { + width: 80%; + margin-left: auto; + margin-right: auto; + max-width: 720px; +} + +/* Singletons */ +.page-logo { + display: block; + padding: 5rem 0 3rem; + color: var(--sd-logo-color); +} +.page-logo > svg { + display: block; + width: 12.625em; + height: auto; + margin: 0 auto; +} + +.color-green { + color: var(--sd-brand-green); +} + +.color-blue { + color: var(--sd-blue); +} + +.page-link::after { + content: " ➜"; +} + +/* Footer */ +footer { + text-align: center; + padding: 3em 0 3em; + font-size: 1em; + margin-top: 4rem; +} + +@media (prefers-color-scheme: light) { + .highlight .cm { + color: #999988; + font-style: italic; + } + .highlight .cp { + color: #999999; + font-weight: bold; + } + .highlight .c1 { + color: #999988; + font-style: italic; + } + .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; + } + .highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf { + color: #999988; + font-style: italic; + } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; + } + .highlight .gd { + color: #000000; + background-color: #ffdddd; + } + .highlight .ge { + color: #000000; + font-style: italic; + } + .highlight .gr { + color: #aa0000; + } + .highlight .gh { + color: #999999; + } + .highlight .gi { + color: #000000; + background-color: #ddffdd; + } + .highlight .go { + color: #888888; + } + .highlight .gp { + color: #555555; + } + .highlight .gs { + font-weight: bold; + } + .highlight .gu { + color: #aaaaaa; + } + .highlight .gt { + color: #aa0000; + } + .highlight .kc { + color: #000000; + font-weight: bold; + } + .highlight .kd { + color: #000000; + font-weight: bold; + } + .highlight .kn { + color: #000000; + font-weight: bold; + } + .highlight .kp { + color: #000000; + font-weight: bold; + } + .highlight .kr { + color: #000000; + font-weight: bold; + } + .highlight .kt { + color: #445588; + font-weight: bold; + } + .highlight .k, .highlight .kv { + color: #000000; + font-weight: bold; + } + .highlight .mf { + color: #009999; + } + .highlight .mh { + color: #009999; + } + .highlight .il { + color: #009999; + } + .highlight .mi { + color: #009999; + } + .highlight .mo { + color: #009999; + } + .highlight .m, .highlight .mb, .highlight .mx { + color: #009999; + } + .highlight .sa { + color: #000000; + font-weight: bold; + } + .highlight .sb { + color: #d14; + } + .highlight .sc { + color: #d14; + } + .highlight .sd { + color: #d14; + } + .highlight .s2 { + color: #d14; + } + .highlight .se { + color: #d14; + } + .highlight .sh { + color: #d14; + } + .highlight .si { + color: #d14; + } + .highlight .sx { + color: #d14; + } + .highlight .sr { + color: #009926; + } + .highlight .s1 { + color: #d14; + } + .highlight .ss { + color: #990073; + } + .highlight .s, .highlight .dl { + color: #d14; + } + .highlight .na { + color: #008080; + } + .highlight .bp { + color: #999999; + } + .highlight .nb { + color: #0086B3; + } + .highlight .nc { + color: #445588; + font-weight: bold; + } + .highlight .no { + color: #008080; + } + .highlight .nd { + color: #3c5d5d; + font-weight: bold; + } + .highlight .ni { + color: #800080; + } + .highlight .ne { + color: #990000; + font-weight: bold; + } + .highlight .nf, .highlight .fm { + color: #990000; + font-weight: bold; + } + .highlight .nl { + color: #990000; + font-weight: bold; + } + .highlight .nn { + color: #555555; + } + .highlight .nt { + color: #000080; + } + .highlight .vc { + color: #008080; + } + .highlight .vg { + color: #008080; + } + .highlight .vi { + color: #008080; + } + .highlight .nv, .highlight .vm { + color: #008080; + } + .highlight .ow { + color: #000000; + font-weight: bold; + } + .highlight .o { + color: #000000; + font-weight: bold; + } + .highlight .w { + color: #bbbbbb; + } +} + +@media (prefers-color-scheme: dark) { + /* rouge "base16.dark" code highlight */ + /* generated with: rougify style base16.dark | sed '/background-color: #151515/d' */ + .highlight, .highlight .w { + color: #d0d0d0; + } + .highlight .err { + color: #151515; + background-color: #ac4142; + } + .highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cpf, .highlight .c1, .highlight .cs { + color: #505050; + } + .highlight .cp { + color: #f4bf75; + } + .highlight .nt { + color: #f4bf75; + } + .highlight .o, .highlight .ow { + color: #d0d0d0; + } + .highlight .p, .highlight .pi { + color: #d0d0d0; + } + .highlight .gi { + color: #90a959; + } + .highlight .gd { + color: #ac4142; + } + .highlight .gh { + color: #6a9fb5; + font-weight: bold; + } + .highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv { + color: #aa759f; + } + .highlight .kc { + color: #d28445; + } + .highlight .kt { + color: #d28445; + } + .highlight .kd { + color: #d28445; + } + .highlight .s, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 { + color: #90a959; + } + .highlight .sa { + color: #aa759f; + } + .highlight .sr { + color: #75b5aa; + } + .highlight .si { + color: #8f5536; + } + .highlight .se { + color: #8f5536; + } + .highlight .nn { + color: #f4bf75; + } + .highlight .nc { + color: #f4bf75; + } + .highlight .no { + color: #f4bf75; + } + .highlight .na { + color: #6a9fb5; + } + .highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mx { + color: #90a959; + } + .highlight .ss { + color: #90a959; + } +} + +/* Code Blocks */ +.highlighter-rouge { + padding: 2px 1rem; + border-radius: 5px; + color: var(--sd-foreground-color); + background-color: var(--sd-highlight-bg); + + overflow: auto; +} +.highlighter-rouge .highlight .err { + background: transparent !important; + color: inherit !important; +} + +/* Inline Code */ +code.highlighter-rouge { + padding: 2px 6px; + background-color: var(--sd-highlight-inline-bg); +} + +a code.highlighter-rouge { + color: inherit; +} diff --git a/docs/sysext.md b/docs/sysext.md index 52c6dff1a..0266eb49a 100644 --- a/docs/sysext.md +++ b/docs/sysext.md @@ -1,3 +1,10 @@ +--- +title: Building system extensions with mkosi +category: Documentation +layout: default +SPDX-License-Identifier: LGPL-2.1-or-later +--- + # Building system extensions with mkosi [System extension](https://uapi-group.org/specifications/specs/extension_image/)