diff --git a/.github/stale.yaml b/.github/stale.yaml new file mode 100644 index 00000000..cc727809 --- /dev/null +++ b/.github/stale.yaml @@ -0,0 +1,23 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 90 + +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 30 + +# Issues with these labels will never be considered stale +exemptLabels: + - feature + - enhancement + - bug + +# Label to use when marking an issue as stale +staleLabel: wontfix + +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/.github/workflows/general.yaml b/.github/workflows/general.yaml new file mode 100644 index 00000000..0387e28d --- /dev/null +++ b/.github/workflows/general.yaml @@ -0,0 +1,27 @@ +name: general + +on: + push: + branches: + - main + tags: + - v*.*.* + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - name: Install dependencies + run: npm install + - name: Test software + run: npm test diff --git a/.gitignore b/.gitignore index 9508e8c1..73cfc018 100644 --- a/.gitignore +++ b/.gitignore @@ -1,158 +1,54 @@ -# Logs -logs -*.log -npm-debug.log* -# server -*.python - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt +# Mac +.DS_Store -# node-waf configuration +# Node +node_modules/ +jspm_packages/ .lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) build/Release - -# Dependency directories -node_modules -jspm_packages - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history .node_repl_history - -# Output of 'npm pack' *.tgz - -# Yarn Integrity file -.yarn-integrity - -# Livemark -blog/**/*.html -docs/**/*.html -index.html -404.html - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions +.npm *.so -# Distribution / packaging -.Python -.python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -pip-wheel-metadata/ - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports +# Testing +coverage htmlcov/ +lib-cov .tox/ .coverage .coverage.* .cache -nosetests.xml +.nyc_output coverage.xml *,cover .hypothesis/ +.eslintcache -# Translations -*.mo -*.pot - -# Django stuff: +# Logs +logs *.log -local_settings.py - -# Flask instance folder -instance/ - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# IPython Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# dotenv -.env +npm-debug.log* -# Spyder project settings -.spyderproject +# Runtime data +pids +*.pid +*.seed +*.pid.lock -# Livemark -/blog/**/*.html -/docs/**/*.html -/index.html -/404.html +# Translations +*.mo +*.pot # Extra -package-lock.json -.frictionless/ -.server/ .env -static/ -dist/ -site/ -lib/ -tmp/ -.vim -.vercel -.astro +.vim/ +.yarn/ .user/ +.astro/ +.cache/ +.clinic/ +.vscode/ +.wrangler/ +dist/ +build/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..ae90f705 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +ignore-workspace-root-check=true diff --git a/LICENSE.md b/LICENSE.md index a910c85d..cf1ab25d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,21 +1,24 @@ -The MIT License (MIT) +This is free and unencumbered software released into the public domain. -Copyright (c) 2023 Open Knowledge Foundation +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. -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: +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. -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 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER 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. -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 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. +For more information, please refer to diff --git a/README.md b/README.md index 4603920d..61acf2c1 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,7 @@ Running the project locally: ```bash npm install npm start -``` - -Building profiles: - -```bash -node build.js +npm run build ``` ## Funding diff --git a/assets/styles.css b/assets/styles.css index 924d08ae..062ebe2a 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -39,3 +39,12 @@ body::-webkit-scrollbar-track { border-radius: 3px; background: var(--scrollbar-color); } + +/* Style the Markdown heading links. */ +.sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a { + color: var(--sl-color-white); + text-decoration: none; + &:hover { + text-decoration: underline; + } +} diff --git a/astro.config.js b/astro.config.js index 89cf29a0..e4543b3f 100644 --- a/astro.config.js +++ b/astro.config.js @@ -1,5 +1,7 @@ +import { rehypeHeadingIds } from "@astrojs/markdown-remark" import starlight from "@astrojs/starlight" import { defineConfig } from "astro/config" +import rehypeAutolinkHeadings from "rehype-autolink-headings" // https://astro.build/config export default defineConfig({ @@ -36,9 +38,9 @@ export default defineConfig({ autogenerate: { directory: "extensions" }, }, { - label: "Patterns", + label: "Recipes", collapsed: true, - autogenerate: { directory: "patterns" }, + autogenerate: { directory: "recipes" }, }, { label: "Guides", @@ -98,4 +100,16 @@ export default defineConfig({ ], }), ], + markdown: { + rehypePlugins: [ + rehypeHeadingIds, + [ + rehypeAutolinkHeadings, + { + // Wrap the heading text in a link. + behavior: "wrap", + }, + ], + ], + }, }) diff --git a/build.js b/build.js index c26525d7..52ed93eb 100644 --- a/build.js +++ b/build.js @@ -1,7 +1,7 @@ +import JsonSchema from "@apidevtools/json-schema-ref-parser" import fs from "fs-extra" import { glob } from "glob" import yaml from "js-yaml" -import JsonSchema from "json-schema-ref-parser" import nodePath from "path" const BUILD_DIR = "build/profiles" diff --git a/components/about.astro b/components/about.astro index 6b4b1b1b..0d569675 100644 --- a/components/about.astro +++ b/components/about.astro @@ -1,40 +1,40 @@ --- -import {funding} from '../assets' -import {Image} from 'astro:assets' +import { funding } from "../assets" +import { Image } from "astro:assets" interface Props { - title: string; + title: string } -const { title } = Astro.props; +const { title } = Astro.props ---
- - {title} - Astro - - Open Knowledge Foundation - + + {title} + Astro + + Open Knowledge Foundation +
diff --git a/components/adoption.astro b/components/adoption.astro index 1975ed70..743332e7 100644 --- a/components/adoption.astro +++ b/components/adoption.astro @@ -1,56 +1,121 @@ --- -import { Image } from 'astro:assets'; -import {adoption} from '../assets' +import { Image } from "astro:assets" +import { adoption } from "../assets" --- -