diff --git a/.cspell/codeberg.txt b/.cspell/codeberg.txt new file mode 100644 index 0000000..afb831d --- /dev/null +++ b/.cspell/codeberg.txt @@ -0,0 +1,2 @@ +Codeberg +Forgejo diff --git a/.ecrc b/.ecrc new file mode 100644 index 0000000..8cd5898 --- /dev/null +++ b/.ecrc @@ -0,0 +1,3 @@ +{ + "Exclude": ["LICENSE", ".git*"] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ea56647 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false +indent_size = 1 + +[Makefile] +indent_style = tab diff --git a/.eleventy.js b/.eleventy.js index 571921d..5a669c9 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,81 +1,85 @@ -const navigationPlugin = require("@11ty/eleventy-navigation") -const syntaxHighlightingPlugin = require("@11ty/eleventy-plugin-syntaxhighlight") +const navigationPlugin = require('@11ty/eleventy-navigation'); +const syntaxHighlightingPlugin = require('@11ty/eleventy-plugin-syntaxhighlight'); const markdownIt = require('markdown-it'); const tableOfContentsPlugin = require('@uncenter/eleventy-plugin-toc'); const markdownItClass = require('@toycode/markdown-it-class'); -const markdownItAnchor = require('markdown-it-anchor') +const markdownItAnchor = require('markdown-it-anchor'); const library = require('@fortawesome/fontawesome-svg-core').library; const icon = require('@fortawesome/fontawesome-svg-core').icon; const fas = require('@fortawesome/free-solid-svg-icons').fas; const { execSync } = require('child_process'); -module.exports = function(eleventyConfig) { - eleventyConfig.addPlugin(navigationPlugin) - eleventyConfig.addPlugin(syntaxHighlightingPlugin) +module.exports = function (eleventyConfig) { + eleventyConfig.addPlugin(navigationPlugin); + eleventyConfig.addPlugin(syntaxHighlightingPlugin); - eleventyConfig.addPassthroughCopy("assets") - eleventyConfig.addPassthroughCopy("fonts") + eleventyConfig.addPassthroughCopy('assets'); + eleventyConfig.addPassthroughCopy('fonts'); // Font Awesome Icons - library.add(fas) - eleventyConfig.addShortcode("fas_icon", function(args) { - var fas_svg = icon({ prefix: 'fas', iconName: args }); - return `${fas_svg.html}`; + library.add(fas); + eleventyConfig.addShortcode('fas_icon', function (args) { + var fas_svg = icon({ prefix: 'fas', iconName: args }); + return `${fas_svg.html}`; }); const mapping = { - h2: 'content-title',h3: 'content-title',h4: 'content-title',h5: 'content-title',h6: 'content-title', + h2: 'content-title', + h3: 'content-title', + h4: 'content-title', + h5: 'content-title', + h6: 'content-title', table: 'table', - blockquote: 'alert' + blockquote: 'alert', }; - + const mdOptions = { linkify: false, html: true }; - const mdAnchorOpts = { + const mdAnchorOpts = { permalink: markdownItAnchor.permalink.headerLink(), - permalinkClass: 'ml-5', permalinkSymbol: '#', level: [1, 2, 3, 4] - } - + permalinkClass: 'ml-5', + permalinkSymbol: '#', + level: [1, 2, 3, 4], + }; + eleventyConfig.setLibrary( 'md', - markdownIt(mdOptions) - .use(markdownItClass, mapping) - .use(markdownItAnchor, mdAnchorOpts) - ) - - eleventyConfig.addPairedShortcode("admonition", function(content, type, title) { - let titleStr = ""; - if(title) { + markdownIt(mdOptions).use(markdownItClass, mapping).use(markdownItAnchor, mdAnchorOpts), + ); + + eleventyConfig.addPairedShortcode('admonition', function (content, type, title) { + let titleStr = ''; + if (title) { titleStr = title; - } else if(type) { + } else if (type) { titleStr = type.substring(0, 1).toUpperCase() + type.substring(1).toLowerCase(); } else { - titleStr = "Info"; + titleStr = 'Info'; } - - return `
+ + return `
- + ${titleStr}
${content}
-
` +
`; }); eleventyConfig.addPlugin(tableOfContentsPlugin, { tags: ['h2', 'h3'], - wrapper: function(toc){ - toc = toc.replaceAll(" { - execSync(`npx pagefind`, { encoding: 'utf-8' }) - }) - + execSync(`npx pagefind`, { encoding: 'utf-8' }); + }); + return { dir: { - input: "content" - } - } -} + input: 'content', + }, + }; +}; diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 0000000..35ca117 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,7 @@ +http://127.0.0.1:** +https://pages.codeberg.org/user.name/ +https://user.name.codeberg.page/ +https://repo.sitory.username.codeberg.page/ +file://** */ +https://codeberg.org/username/repo.git +https://username.codeberg.page/** diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..ea1d3d0 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,141 @@ +# markdownlint YAML configuration +# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml + +# Default state for all rules +default: true + +# Path to configuration file to extend +extends: null + +# MD003/heading-style/header-style - Heading style +MD003: + # Heading style + style: 'atx' + +# MD004/ul-style - Unordered list style +MD004: + style: 'dash' + +# MD007/ul-indent - Unordered list indentation +MD007: + # Spaces for indent + indent: 2 + # Whether to indent the first level of the list + start_indented: false + +# MD009/no-trailing-spaces - Trailing spaces +MD009: + # Spaces for line break + br_spaces: 2 + # Allow spaces for empty lines in list items + list_item_empty_lines: false + # Include unnecessary breaks + strict: false + +# MD010/no-hard-tabs - Hard tabs +MD010: + # Include code blocks + code_blocks: true + +# MD012/no-multiple-blanks - Multiple consecutive blank lines +MD012: + # Consecutive blank lines + maximum: 1 + +# MD013/line-length - Line length +MD013: + # Number of characters + line_length: 500 + # Number of characters for headings + heading_line_length: 100 + # Number of characters for code blocks + code_block_line_length: 80 + # Include code blocks + code_blocks: false + # Include tables + tables: false + # Include headings + headings: true + # Include headings + headers: true + # Strict length checking + strict: false + # Stern length checking + stern: false + +# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines +MD022: + # Blank lines above heading + lines_above: 1 + # Blank lines below heading + lines_below: 1 + +# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content +MD024: + # Only check sibling headings + allow_different_nesting: true + +# MD025/single-title/single-h1 - Multiple top-level headings in the same document +MD025: + # Heading level + level: 1 + # RegExp for matching title in front matter + front_matter_title: "^\\s*title\\s*[:=]" + +# MD026/no-trailing-punctuation - Trailing punctuation in heading +MD026: + # Punctuation characters + punctuation: '.,;:!。,;:!' + +# MD029/ol-prefix - Ordered list item prefix +MD029: + # List style + style: 'one_or_ordered' + +# MD030/list-marker-space - Spaces after list markers +MD030: + # Spaces for single-line unordered list items + ul_single: 1 + # Spaces for single-line ordered list items + ol_single: 1 + # Spaces for multi-line unordered list items + ul_multi: 1 + # Spaces for multi-line ordered list items + ol_multi: 1 + +# MD033/no-inline-html - Inline HTML +MD033: false + +# MD035/hr-style - Horizontal rule style +MD035: + # Horizontal rule style + style: '---' + +# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading +MD036: + # Punctuation characters + punctuation: '.,;:!?。,;:!?' + +# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading +MD041: + # Heading level + level: 1 + # RegExp for matching title in front matter + front_matter_title: "^\\s*title\\s*[:=]" + +# MD044/proper-names - Proper names should have the correct capitalization +MD044: + # List of proper names + # names: + # Include code blocks + code_blocks: false + +# MD046/code-block-style - Code block style +MD046: + # Block style + style: 'fenced' + +# MD048/code-fence-style - Code fence style +MD048: + # Code fence syle + style: 'backtick' diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..aed6467 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "semi": true, + "trailingComma": "all", + "singleQuote": true, + "printWidth": 120, + "tabWidth": 2, + "endOfLine": "lf" +} diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml new file mode 100644 index 0000000..1d97508 --- /dev/null +++ b/.woodpecker/build.yaml @@ -0,0 +1,14 @@ +when: + - event: [pull_request] + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +steps: + build: + image: codeberg.org/woodpecker-plugins/node-pm:1.3.0 + settings: + run: build + with: pnpm + frozen_lockfile: true + ignore_node_modules: true diff --git a/.woodpecker/lint.yaml b/.woodpecker/lint.yaml new file mode 100644 index 0000000..c3142fa --- /dev/null +++ b/.woodpecker/lint.yaml @@ -0,0 +1,37 @@ +when: + - event: [pull_request] + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} + +steps: + lint-markdown: + image: davidanson/markdownlint-cli2:v0.13.0 + commands: + - 'markdownlint-cli2 *.{md,markdown}' + when: + path: '*.{md,markdown}' + + editor-config: + image: mstruebing/editorconfig-checker:v3.0.1 + depends_on: [] + + prettier: + image: docker.io/woodpeckerci/plugin-prettier:0.1.0 + depends_on: [] + settings: + version: 3.2.5 + + links: + image: lycheeverse/lychee:0.14.3 + depends_on: [] + commands: + - lychee . -v + + lint-yaml: + image: pipelinecomponents/yamllint:0.31.2 + depends_on: [] + commands: + - yamllint --strict . + when: + path: '*.{yml,yaml}' diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..f424213 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,21 @@ +ignore: | + pnpm-lock.yaml + node_modules/ + +rules: + comments: + require-starting-space: false + ignore-shebangs: true + min-spaces-from-content: 1 + braces: + min-spaces-inside: 1 + max-spaces-inside: 1 + document-start: + present: false + indentation: + spaces: 2 + indent-sequences: true + line-length: + max: 256 + new-lines: + type: unix diff --git a/Dockerfile b/Dockerfile index ac179d5..285fab5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ WORKDIR /opt/documentation RUN npm install -CMD [ "npm", "run", "serve"] \ No newline at end of file +CMD [ "npm", "run", "serve"] diff --git a/LICENSE.md b/LICENSE.md index 1747420..bd08524 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,9 +1,10 @@ -This website by [The Codeberg Documentation Contributors](CONTRIBUTORS.md) -is licensed under [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en). + + +This website is licensed under [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en). Due to the wiki-like nature of this website, pages usually have multiple authors and are changed frequently. Changes to the original versions of the works as well as their individual authors can be -looked up in [the website's commit history](https://codeberg.org/Codeberg/Documentation/commits/branch/master). +looked up in [the website's commit history](https://codeberg.org/Codeberg/Documentation/commits/branch/main). The Codeberg logos in this website are by @mray, licensed under [CC0 1.0](http://creativecommons.org/publicdomain/zero/1.0/). @@ -15,4 +16,4 @@ licensed under [multiple licenses](https://fontawesome.com/license/free). Codeberg and the Codeberg Logo are trademarks of Codeberg e.V. -"Knut the Polar Bear" has been derived from https://openclipart.org/detail/193243/polar-bear-remix, under CC0 1.0 +"Knut the Polar Bear" has been derived from [https://openclipart.org/detail/193243/polar-bear-remix](https://openclipart.org/detail/193243/polar-bear-remix), under CC0 1.0 diff --git a/README.md b/README.md index b12e27a..8c6037e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Codeberg Documentation + This repository contains the [documentation for Codeberg](https://docs.codeberg.org/), with some code to build it into a static website. @@ -7,22 +8,23 @@ Please have a look into it and consider to help writing the Documentation. This For an introduction on contributing to Codeberg Documentation, please have a look at [the section on improving the documentation](https://docs.codeberg.org/improving-documentation/). - ## Usage + ### Local Development + If you want to work on the documentation, for example by writing your own articles, the easiest way to do so is to fork the documentation repository and develop locally. First, run -```npm install``` +`npm install` to install all dependencies (they will be installed only for this project, not globally). You only have to do this once. Then run -```npm run serve``` +`npm run serve` to start a development web server that by default is listening at `http://localhost:8080`. @@ -42,14 +44,14 @@ You must have a container-engine installed (docker, podman, etc.) First build the container image: ```shell -docker build -t codeberg/documentation-server . +docker build -t Codeberg/Documentation-server . ``` You do not have to rebuild the image every time. Once you build the image you can always start the development webserver using the container engine: ```shell -docker run --rm -v $PWD:/opt/documentation codeberg/documentation-server:latest +docker run --rm -v $PWD:/opt/documentation Codeberg/Documentation-server:latest ``` Use the "External" URL the container outputs on startup to access your documentation. @@ -63,25 +65,27 @@ The parameters are: `--rm` removes the container after it's use `-v` mounts the current (documentation repository root) folder to `/opt/documentation` in the container. -`codeberg/documentation-server:latest` refers to the container image built in the first step (using `docker build`). +`Codeberg/Documentation-server:latest` refers to the container image built in the first step (using `docker build`). ### Build & Deployment + Like for local development, before building and deploying you first have to install the dependencies (once): -```npm install``` +`npm install` To build the entire website to the `_site` directory run -```npm run build``` +`npm run build` Instead, to directly publish the page to Codeberg pages, you can also run -```npm run deploy``` +`npm run deploy` which includes a call to `npm run build`. ### Technical Information + This website uses [Eleventy](https://www.11ty.dev/), a static site generator. It's supplied as a dev-dependency in `package.json` and its dependencies are locked @@ -90,6 +94,7 @@ with `package-lock.json` to try to ensure reproducible builds. It also uses [PageFind](https://pagefind.app/), a static search library. ## License and Contributors + This website (excluding bundled fonts) is licensed under CC BY-SA 4.0. See the [LICENSE](LICENSE.md) file for details. Please refer to the [commit log](https://codeberg.org/Codeberg/Documentation/commits/branch/main) for an exhaustive list of contributors to Codeberg Documentation. diff --git a/assets/css/codeberg-docs.css b/assets/css/codeberg-docs.css index c3065a5..73d2562 100644 --- a/assets/css/codeberg-docs.css +++ b/assets/css/codeberg-docs.css @@ -1,166 +1,206 @@ -:root{ - --admonition-background-color--info: rgba(68, 138, 255, 0.2); - --admonition-background-color--note: rgba(0, 184, 212, 0.2); - --admonition-background-color--warning: rgba(255, 145, 0, 0.2); - --admonition-background-color--tip: rgba(0, 191, 165, 0.2); - --admonition-background-color--question: rgba(100, 221, 23, 0.2); - - --admonition-border-color--info: rgb(68, 138, 255); - --admonition-border-color--note: rgb(0, 184, 212); - --admonition-border-color--warning: rgb(255, 145, 0); - --admonition-border-color--tip: rgb(0, 191, 165); - --admonition-border-color--question: rgb(100, 221, 23); - - --admonition-icon--info: url('data:image/svg+xml;charset=utf-8,'); - --admonition-icon--note: url('data:image/svg+xml;charset=utf-8,'); - --admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,'); - --admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,'); - --admonition-icon--question: url('data:image/svg+xml;charset=utf-8,'); - - --admonition-icon-dimension: 20px; +:root { + --admonition-background-color--info: rgba(68, 138, 255, 0.2); + --admonition-background-color--note: rgba(0, 184, 212, 0.2); + --admonition-background-color--warning: rgba(255, 145, 0, 0.2); + --admonition-background-color--tip: rgba(0, 191, 165, 0.2); + --admonition-background-color--question: rgba(100, 221, 23, 0.2); + + --admonition-border-color--info: rgb(68, 138, 255); + --admonition-border-color--note: rgb(0, 184, 212); + --admonition-border-color--warning: rgb(255, 145, 0); + --admonition-border-color--tip: rgb(0, 191, 165); + --admonition-border-color--question: rgb(100, 221, 23); + + --admonition-icon--info: url('data:image/svg+xml;charset=utf-8,'); + --admonition-icon--note: url('data:image/svg+xml;charset=utf-8,'); + --admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,'); + --admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,'); + --admonition-icon--question: url('data:image/svg+xml;charset=utf-8,'); + + --admonition-icon-dimension: 20px; } -.content :not(img, pre) { max-width: 80ch; } -.content img { border: 5px solid rgba(0, 0, 0, 0.2); max-width: 100%; } -.content blockquote { margin: 0; } -.content-title { margin-top: 20px !important; } +.content :not(img, pre) { + max-width: 80ch; +} +.content img { + border: 5px solid rgba(0, 0, 0, 0.2); + max-width: 100%; +} +.content blockquote { + margin: 0; +} +.content-title { + margin-top: 20px !important; +} -.content pre { border-left: 5px solid #2185d0; } -.dark-mode .content pre { border-left: 5px solid #355379; } +.content pre { + border-left: 5px solid #2185d0; +} +.dark-mode .content pre { + border-left: 5px solid #355379; +} -.content ol { list-style: decimal outside; } -.content ul { list-style: outside; } -.content ol, .content ul { margin-top: 10px; padding-left: 2em; } +.content ol { + list-style: decimal outside; +} +.content ul { + list-style: outside; +} +.content ol, +.content ul { + margin-top: 10px; + padding-left: 2em; +} -.codeberg-design .card, .codeberg-design hr { margin-left: 0; } +.codeberg-design .card, +.codeberg-design hr { + margin-left: 0; +} -a.header-anchor, a.header-anchor:visited { color: var(--lm-base-text-color) !important; text-decoration: none; } -.dark-mode a.header-anchor, .dark-mode a.header-anchor:visited { color: var(--dm-base-text-color) !important; text-decoration: none; } -a.header-anchor:hover { text-decoration: underline; } +a.header-anchor, +a.header-anchor:visited { + color: var(--lm-base-text-color) !important; + text-decoration: none; +} +.dark-mode a.header-anchor, +.dark-mode a.header-anchor:visited { + color: var(--dm-base-text-color) !important; + text-decoration: none; +} +a.header-anchor:hover { + text-decoration: underline; +} -code span .content { margin: 0 !important; } +code span .content { + margin: 0 !important; +} /* Apply code style to generic code */ -pre:not([class*="language-"]) { - background: #2E3440; - color: #f8f8f2; - padding: 1em; - margin: .5em 0; - overflow: auto; - border-radius: 0.3em; +pre:not([class*='language-']) { + background: #2e3440; + color: #f8f8f2; + padding: 1em; + margin: 0.5em 0; + overflow: auto; + border-radius: 0.3em; } /* Override sidebar link style */ -.codeberg-design .sidebar-title a { color: var(--sidebar-title-text-color); } -.codeberg-design .sidebar-title .dark-mode a { color: var(--dm-sidebar-title-text-color); } +.codeberg-design .sidebar-title a { + color: var(--sidebar-title-text-color); +} +.codeberg-design .sidebar-title .dark-mode a { + color: var(--dm-sidebar-title-text-color); +} /* Apply halfmoon style to inline code */ -code:not(pre > code) { - font-size: var(--code-font-size); - line-height: var(--code-line-height); - padding: var(--code-padding); - margin: var(--code-margin); - color: var(--lm-code-text-color); - background-color: var(--lm-code-bg-color); - border: var(--code-border-width) var(--lm-code-border-color); - border-radius: var(--code-border-radius); +code:not(pre > code) { + font-size: var(--code-font-size); + line-height: var(--code-line-height); + padding: var(--code-padding); + margin: var(--code-margin); + color: var(--lm-code-text-color); + background-color: var(--lm-code-bg-color); + border: var(--code-border-width) var(--lm-code-border-color); + border-radius: var(--code-border-radius); } .dark-mode code:not(pre > code) { - color: var(--dm-code-text-color); - background-color: var(--dm-code-bg-color); - border-color: var(--dm-code-border-color); + color: var(--dm-code-text-color); + background-color: var(--dm-code-bg-color); + border-color: var(--dm-code-border-color); } /* Custom Admonition boxes */ .admonition { - background-color: var(--admonition-background-color--info); - border: .2rem solid var(--admonition-border-color--info); - border-radius: .3rem; - - border-left-width: .5rem; - - padding: 1em 1.5em; + background-color: var(--admonition-background-color--info); + border: 0.2rem solid var(--admonition-border-color--info); + border-radius: 0.3rem; + + border-left-width: 0.5rem; + + padding: 1em 1.5em; } .admonition-title { - font-weight: bold; - font-size: 1.2em; + font-weight: bold; + font-size: 1.2em; } .admonition-icon::before { - content: ""; - - background-color: var(--admonition-border-color--info); - - mask-position: center; - mask-repeat: no-repeat; - mask-size: contain; - mask-image: var(--admonition-icon--info); - - -webkit-mask-position: center; - -webkit-mask-repeat: no-repeat; - -webkit-mask-size: contain; - -webkit-mask-image: var(--admonition-icon--info); - - display: inline-block; - margin-right: .4em; - vertical-align: bottom; - - height: 1.5em; - width: 1.5em; + content: ''; + + background-color: var(--admonition-border-color--info); + + mask-position: center; + mask-repeat: no-repeat; + mask-size: contain; + mask-image: var(--admonition-icon--info); + + -webkit-mask-position: center; + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: contain; + -webkit-mask-image: var(--admonition-icon--info); + + display: inline-block; + margin-right: 0.4em; + vertical-align: bottom; + + height: 1.5em; + width: 1.5em; } .admonition.note { - background-color: var(--admonition-background-color--note); - border-color: var(--admonition-border-color--note); + background-color: var(--admonition-background-color--note); + border-color: var(--admonition-border-color--note); } .admonition-icon.note::before { - background-color: var(--admonition-border-color--note); - - mask-image: var(--admonition-icon--note); - -webkit-mask-image: var(--admonition-icon--note); + background-color: var(--admonition-border-color--note); + + mask-image: var(--admonition-icon--note); + -webkit-mask-image: var(--admonition-icon--note); } .admonition.warning { - background-color: var(--admonition-background-color--warning); - border-color: var(--admonition-border-color--warning); + background-color: var(--admonition-background-color--warning); + border-color: var(--admonition-border-color--warning); } .admonition-icon.warning::before { - background-color: var(--admonition-border-color--warning); - - mask-image: var(--admonition-icon--warning); - -webkit-mask-image: var(--admonition-icon--warning); + background-color: var(--admonition-border-color--warning); + + mask-image: var(--admonition-icon--warning); + -webkit-mask-image: var(--admonition-icon--warning); } .admonition.tip { - background-color: var(--admonition-background-color--tip); - border-color: var(--admonition-border-color--tip); + background-color: var(--admonition-background-color--tip); + border-color: var(--admonition-border-color--tip); } .admonition-icon.tip::before { - background-color: var(--admonition-border-color--tip); - - mask-image: var(--admonition-icon--tip); - -webkit-mask-image: var(--admonition-icon--tip); + background-color: var(--admonition-border-color--tip); + + mask-image: var(--admonition-icon--tip); + -webkit-mask-image: var(--admonition-icon--tip); } .admonition.question { - background-color: var(--admonition-background-color--question); - border-color: var(--admonition-border-color--question); + background-color: var(--admonition-background-color--question); + border-color: var(--admonition-border-color--question); } .admonition-icon.question::before { - background-color: var(--admonition-border-color--question); - - mask-image: var(--admonition-icon--question); - -webkit-mask-image: var(--admonition-icon--question); + background-color: var(--admonition-border-color--question); + + mask-image: var(--admonition-icon--question); + -webkit-mask-image: var(--admonition-icon--question); } .admonition-content > *:last-child { - margin-bottom: 0; + margin-bottom: 0; } #search-results { @@ -183,47 +223,47 @@ code:not(pre > code) { } #search-input::placeholder { - --lm-input-placeholder-text-color: rgba(0, 0, 0, 0.8); - --dm-input-placeholder-text-color: rgba(255,255,255,0.8); + --lm-input-placeholder-text-color: rgba(0, 0, 0, 0.8); + --dm-input-placeholder-text-color: rgba(255, 255, 255, 0.8); } #toc { - padding: 5px; + padding: 5px; } #toc ol { - padding: 5px; - margin: 0; + padding: 5px; + margin: 0; } #toc li { - list-style-type: none; - margin-bottom: 0; + list-style-type: none; + margin-bottom: 0; } #toc a { - display: block; - height: auto; + display: block; + height: auto; } #toc-side { - margin-top: 50px; + margin-top: 50px; } #toc-side span { - font-weight: 500; - font-size: 1.5rem; - margin-bottom: 1rem; + font-weight: 500; + font-size: 1.5rem; + margin-bottom: 1rem; } #toc-side ol:first-child { - border-left: 1px solid rgba(0, 0, 0, 0.15); + border-left: 1px solid rgba(0, 0, 0, 0.15); } .dark-mode #toc-side ol:first-child { - border-left: 1px solid rgba(255, 255, 255, 0.15); + border-left: 1px solid rgba(255, 255, 255, 0.15); } #toc-side a { - padding-left: 10px; + padding-left: 10px; } diff --git a/assets/css/prism-nord.css b/assets/css/prism-nord.css index b4cd5bc..f7df66f 100644 --- a/assets/css/prism-nord.css +++ b/assets/css/prism-nord.css @@ -1,24 +1,24 @@ /** * Copied from https://github.com/PrismJS/prism-themes - * - * - * + * + * + * * prism-themes License: - * + * * The MIT License (MIT) - * + * * Copyright (c) 2015 PrismJS - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -26,27 +26,27 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * - * - * + * + * + * + * * Nord Color Theme license: - * + * * MIT License (MIT) - * - * Copyright (c) 2016-present Arctic Ice Studio (https://www.arcticicestudio.com) + * + * Copyright (c) 2016-present Arctic Ice Studio (https://www.arcticicestudio.com) * Copyright (c) 2016-present Sven Greb (https://www.svengreb.de) - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -56,7 +56,6 @@ * SOFTWARE. */ - /** * Nord Theme Originally by Arctic Ice Studio * https://nordtheme.com @@ -64,59 +63,59 @@ * Ported for PrismJS by Zane Hitchcoxc (@zwhitchcox) and Gabriel Ramos (@gabrieluizramos) */ -code[class*="language-"], -pre[class*="language-"] { - color: #f8f8f2; - background: none; - font-family: "Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; +code[class*='language-'], +pre[class*='language-'] { + color: #f8f8f2; + background: none; + font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; } /* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; - border-radius: 0.3em; +pre[class*='language-'] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; + border-radius: 0.3em; } -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #2E3440; +:not(pre) > code[class*='language-'], +pre[class*='language-'] { + background: #2e3440; } /* Inline code */ -:not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; +:not(pre) > code[class*='language-'] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; } .token.comment, .token.prolog, .token.doctype, .token.cdata { - color: #636f88; + color: #636f88; } .token.punctuation { - color: #81A1C1; + color: #81a1c1; } .namespace { - opacity: .7; + opacity: 0.7; } .token.property, @@ -124,15 +123,15 @@ pre[class*="language-"] { .token.constant, .token.symbol, .token.deleted { - color: #81A1C1; + color: #81a1c1; } .token.number { - color: #B48EAD; + color: #b48ead; } .token.boolean { - color: #81A1C1; + color: #81a1c1; } .token.selector, @@ -141,7 +140,7 @@ pre[class*="language-"] { .token.char, .token.builtin, .token.inserted { - color: #A3BE8C; + color: #a3be8c; } .token.operator, @@ -150,34 +149,34 @@ pre[class*="language-"] { .language-css .token.string, .style .token.string, .token.variable { - color: #81A1C1; + color: #81a1c1; } .token.atrule, .token.attr-value, .token.function, .token.class-name { - color: #88C0D0; + color: #88c0d0; } .token.keyword { - color: #81A1C1; + color: #81a1c1; } .token.regex, .token.important { - color: #EBCB8B; + color: #ebcb8b; } .token.important, .token.bold { - font-weight: bold; + font-weight: bold; } .token.italic { - font-style: italic; + font-style: italic; } .token.entity { - cursor: help; + cursor: help; } diff --git a/content/_data/env.js b/content/_data/env.js index 55ddc97..1d7d824 100644 --- a/content/_data/env.js +++ b/content/_data/env.js @@ -1,3 +1,3 @@ module.exports = { - environment: process.env.ELEVENTY_ENV -}; \ No newline at end of file + environment: process.env.ELEVENTY_ENV, +}; diff --git a/content/_data/urls.json b/content/_data/urls.json index 0c764af..27438a3 100644 --- a/content/_data/urls.json +++ b/content/_data/urls.json @@ -1,4 +1,4 @@ { - "commitHistoryMaster": "https://codeberg.org/Codeberg/Documentation/commits", - "docsSourcesMaster": "https://codeberg.org/codeberg/documentation/src" + "commitHistoryMaster": "https://codeberg.org/Codeberg/Documentation/commits", + "docsSourcesMaster": "https://codeberg.org/Codeberg/Documentation/src" } diff --git a/content/_includes/default_layout.njk b/content/_includes/default_layout.njk index 5814e96..230c1f0 100644 --- a/content/_includes/default_layout.njk +++ b/content/_includes/default_layout.njk @@ -1,182 +1,210 @@ - - {% if eleventyNavigation.title %}{{ eleventyNavigation.title }} | {% endif %}Codeberg Documentation + + {% if eleventyNavigation.title %}{{ eleventyNavigation.title }} | {% endif %}Codeberg Documentation - - {% if description %}{% endif %} - - - {% if env.environment == "testing" %}{% endif %} + + {% if description %} + + {% endif %} + + + {% if env.environment == "testing" %} + + {% endif %} - - - + + + - - - - - - - - + + + + - - - + + + - - + + + - - + + - - - + + - {% if page.url != '/' %} - - {% endif %} - + + + - - {% include 'license.njk' %} -
- - + {% if page.url != '/' %} + + {% endif %} + - - -
-
-
-
- {% if eleventyNavigation.title %} -

{{ eleventyNavigation.title }}

- {% endif %} - {% if eleventyNavigation.draft %} - Please note that this article is still a draft and might not have any contents yet. - {% endif %} - {% include 'toc-collapse.njk' %} - {{ content | safe }} -
- {% if page.url != '/' %} - {% include 'contribution_invitation.njk' %} - {% endif %} -
-

© Codeberg Docs Contributors. See LICENSE

-
-
- {% include 'toc-side.njk' %} -
-
-
+ + {% include 'license.njk' %} +
+ + + + + +
+
+
+
+ {% if eleventyNavigation.title %} +

{{ eleventyNavigation.title }}

+ {% endif %} {% if eleventyNavigation.draft %} + Please note that this article is still a draft and might not have any contents yet. + {% endif %} {% include 'toc-collapse.njk' %} + {{ content | safe }} +
+ {% if page.url != '/' %} {% include 'contribution_invitation.njk' %} {% endif %} +
+

© Codeberg Docs Contributors. See LICENSE

+
+
+ {% include 'toc-side.njk' %} +
+
+
+
+ diff --git a/content/_includes/license.njk b/content/_includes/license.njk index bebf59c..41f0b9f 100644 --- a/content/_includes/license.njk +++ b/content/_includes/license.njk @@ -1,26 +1,36 @@ diff --git a/content/_includes/redirect.njk b/content/_includes/redirect.njk index 2e56cdc..2ca8aaf 100644 --- a/content/_includes/redirect.njk +++ b/content/_includes/redirect.njk @@ -1,10 +1,10 @@ - + - - - - - - Redirecting to {{ redirect.to }} - + + + + + + Redirecting to {{ redirect.to }} + diff --git a/content/_includes/toc-collapse.njk b/content/_includes/toc-collapse.njk index 958fa1d..3e9c390 100644 --- a/content/_includes/toc-collapse.njk +++ b/content/_includes/toc-collapse.njk @@ -1,12 +1,12 @@ {% if content | toc %} -