diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6e59035..71c49ac 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,15 +22,14 @@ "esbenp.prettier-vscode", "streetsidesoftware.code-spell-checker", "ms-vscode.remote-explorer", - "usernamehw.errorlens" + "usernamehw.errorlens", + "Trunk.io" ] } }, - "forwardPorts": [ - 3000 - ], + "forwardPorts": [3000], "containerUser": "vscode", - "postCreateCommand": "yarn install", + "postCreateCommand": "yarn install && curl -fsSL https://get.trunk.io -o install.sh && chmod +x install.sh && ./install.sh", "waitFor": "postCreateCommand", // otherwise automated jest tests fail "features": { "node": { diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..a5781eb --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,13 @@ +name: Lint Check (pre-commit) + +permissions: + contents: read + checks: write + issues: write + pull-requests: write + +on: [push] + +jobs: + pre-commit: + uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.1.0 diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk-check.yml new file mode 100644 index 0000000..3ff330e --- /dev/null +++ b/.github/workflows/trunk-check.yml @@ -0,0 +1,27 @@ +name: Trunk Check +on: [push, pull_request, workflow_dispatch] +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: read-all + +jobs: + trunk_check: + name: Trunk Check Runner + runs-on: ubuntu-latest + permissions: + checks: write # For trunk to post annotations + contents: read # For repo checkout + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Trunk Check + uses: trunk-io/trunk-action@v1 + with: + check-mode: all + post-annotations: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..27c2a4b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,37 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + + - repo: https://github.com/psf/black + rev: 23.9.1 # Use the latest stable version + hooks: + - id: black + + - repo: https://github.com/pre-commit/mirrors-eslint + rev: v8.50.0 # Use the latest stable version + hooks: + - id: eslint + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.0 # Use the latest stable version + hooks: + - id: prettier + + - repo: https://github.com/markdownlint/markdownlint + rev: v0.12.0 # Use the latest stable version + hooks: + - id: markdownlint + + - repo: https://github.com/zricethezav/gitleaks + rev: v8.17.0 # Use the latest stable version + hooks: + - id: gitleaks + +exclude: | + ^static/.* + ^node_modules/.* diff --git a/.trunk/.gitignore b/.trunk/.gitignore new file mode 100644 index 0000000..15966d0 --- /dev/null +++ b/.trunk/.gitignore @@ -0,0 +1,9 @@ +*out +*logs +*actions +*notifications +*tools +plugins +user_trunk.yaml +user.yaml +tmp diff --git a/.trunk/configs/.isort.cfg b/.trunk/configs/.isort.cfg new file mode 100644 index 0000000..b9fb3f3 --- /dev/null +++ b/.trunk/configs/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +profile=black diff --git a/.trunk/configs/.markdownlint.yaml b/.trunk/configs/.markdownlint.yaml new file mode 100644 index 0000000..b40ee9d --- /dev/null +++ b/.trunk/configs/.markdownlint.yaml @@ -0,0 +1,2 @@ +# Prettier friendly markdownlint config (all formatting rules disabled) +extends: markdownlint/style/prettier diff --git a/.trunk/configs/.shellcheckrc b/.trunk/configs/.shellcheckrc new file mode 100644 index 0000000..8c7b1ad --- /dev/null +++ b/.trunk/configs/.shellcheckrc @@ -0,0 +1,7 @@ +enable=all +source-path=SCRIPTDIR +disable=SC2154 + +# If you're having issues with shellcheck following source, disable the errors via: +# disable=SC1090 +# disable=SC1091 diff --git a/.trunk/configs/.yamllint.yaml b/.trunk/configs/.yamllint.yaml new file mode 100644 index 0000000..184e251 --- /dev/null +++ b/.trunk/configs/.yamllint.yaml @@ -0,0 +1,7 @@ +rules: + quoted-strings: + required: only-when-needed + extra-allowed: ["{|}"] + key-duplicates: {} + octal-values: + forbid-implicit-octal: true diff --git a/.trunk/configs/ruff.toml b/.trunk/configs/ruff.toml new file mode 100644 index 0000000..f5a235c --- /dev/null +++ b/.trunk/configs/ruff.toml @@ -0,0 +1,5 @@ +# Generic, formatter-friendly config. +select = ["B", "D3", "E", "F"] + +# Never enforce `E501` (line length violations). This should be handled by formatters. +ignore = ["E501"] diff --git a/.trunk/configs/svgo.config.mjs b/.trunk/configs/svgo.config.mjs new file mode 100644 index 0000000..55b4a7a --- /dev/null +++ b/.trunk/configs/svgo.config.mjs @@ -0,0 +1,14 @@ +export default { + plugins: [ + { + name: "preset-default", + params: { + overrides: { + removeViewBox: false, // https://github.com/svg/svgo/issues/1128 + sortAttrs: true, + removeOffCanvasPaths: true, + }, + }, + }, + ], +}; diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..318754a --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,42 @@ +# This file controls the behavior of Trunk: https://docs.trunk.io/cli +# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml +version: 0.1 +cli: + version: 1.25.0 +# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) +plugins: + sources: + - id: trunk + ref: v1.7.4 + uri: https://github.com/trunk-io/plugins +# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) +runtimes: + enabled: + - go@1.21.0 + - node@22.16.0 + - python@3.10.8 +# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) +lint: + enabled: + - actionlint@1.7.9 + - bandit@1.9.2 + - black@25.12.0 + - checkov@3.2.495 + - git-diff-check + - isort@7.0.0 + - markdownlint@0.47.0 + - osv-scanner@2.3.1 + - oxipng@10.0.0 + - prettier@3.7.4 + - ruff@0.14.9 + - shellcheck@0.11.0 + - shfmt@3.6.0 + - svgo@4.0.0 + - trufflehog@3.92.3 + - yamllint@1.37.1 +actions: + enabled: + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + - trunk-upgrade-available diff --git a/Makefile b/Makefile index 10eea0d..9012f19 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all install build start +.PHONY: all install build start trunk-check all: install start @@ -10,3 +10,6 @@ start: # Start local development server build: # Generate static content for GitHub Pages deployment yarn build + +lint: # Run code quality checks + trunk check diff --git a/README.md b/README.md index c4df291..58e4c55 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ blog/2000-10-30-my-blog-example/ 3. Add your full Markdown blog post content inside the `index.md` file. Example + ```shell $ cat blog/2000-10-30-my-blog-example/index.md --- @@ -66,33 +67,32 @@ socials: # [optional] Include your socials (like your Github, X, Linkedin > Note: The Discourse comments plugin only works for production website (a.k.a. https://bemanproject.org/). You cannot test it locally or on preview deployments. Check [Integrate Discourse comment feature for blog posts](https://github.com/bemanproject/website/issues/25) for more details. - 4. Open a `DRAFT PR` and `wait` up to one minute for a preview deployment of your blog post. -* Draft PR example: [Add blog post: My Blog Example #54](https://github.com/bemanproject/website/pull/54/). +- Draft PR example: [Add blog post: My Blog Example #54](https://github.com/bemanproject/website/pull/54/). -* Click on the `Deploy Preview` URL (format `https://deploy-preview-${PR NUMBER}--bemanproject.netlify.app/`). +- Click on the `Deploy Preview` URL (format `https://deploy-preview-${PR NUMBER}--bemanproject.netlify.app/`). -* Successful CI preview deployment example: +- Successful CI preview deployment example: ![CI preview deployment success message](./images/tutorial/add-a-blog/ci-preview-deployment-success-message.gif) -* Test your deployment. +- Test your deployment.
[DEBUG] Inspect CI preview deployment error logs. The CI preview deployment logs should be public. Please ping a codeowner otherwise. -* `DRAFT` PR example with CI preview deployment error - [#49](https://github.com/bemanproject/website/pull/49). +- `DRAFT` PR example with CI preview deployment error - [#49](https://github.com/bemanproject/website/pull/49). -* Click on the `Latest deploy log` URL - e.g., https://app.netlify.com/sites/bemanproject/deploys/6809108974fd910008633aa9. +- Click on the `Latest deploy log` URL - e.g., https://app.netlify.com/sites/bemanproject/deploys/6809108974fd910008633aa9. -* Logs inspect example: +- Logs inspect example: ![](./images/tutorial/add-a-blog/ci-preview-deployment-failure-message.gif) -* Fix the error, commit and push the changes. Wait for new deployment. +- Fix the error, commit and push the changes. Wait for new deployment. > If you need to browse through more recent CI preview deployments logs use https://app.netlify.com/sites/bemanproject/deploys/. Note: netlify provides a single a single CI preview deployment for each PR - latest commit, but stores logs for multiple ones. @@ -101,7 +101,7 @@ The CI preview deployment logs should be public. Please ping a codeowner otherwi
[DEBUG] Inspect local deployment error logs. -* On local setup, run `make` (see [Local development](#local-development)) and check if there is any error in the console - example: +- On local setup, run `make` (see [Local development](#local-development)) and check if there is any error in the console - example: ```shell $ make @@ -120,9 +120,9 @@ $ make - DavidSankel ``` -* Fix the error, re-deploy the local website. +- Fix the error, re-deploy the local website. -* Commit and push the changes. Wait for a new CI preview deployment. +- Commit and push the changes. Wait for a new CI preview deployment.
@@ -131,6 +131,7 @@ $ make 6. Apply the review feedback. Get approval. Merge the PR. + 7. The updates are automatically deployed to the production website after a few minutes - check https://bemanproject.github.io/website/. ## Local development @@ -204,11 +205,10 @@ To start a local development server, run: $ make start ``` -If everything is properly installed, the command should open a browser window on http://localhost:3000/. +If everything is properly installed, the command should open a browser window on http://localhost:3000/. Most changes are reflected live without having to restart the server. - ### Generate static content for GitHub Pages deployment To generate static from the project that can be served using any static contents hosting service (like `gh-pages`). diff --git a/blog/2025-01-13-beman-intro/index.md b/blog/2025-01-13-beman-intro/index.md index ef3a3d8..e753842 100644 --- a/blog/2025-01-13-beman-intro/index.md +++ b/blog/2025-01-13-beman-intro/index.md @@ -7,8 +7,8 @@ comments: true # Beman Project Introduction Online -David Sankel’s talk on Beman at 2024 CppCon is now online! -The presentation answers many questions about the project purpose and policies. +David Sankel’s talk on Beman at 2024 CppCon is now online! +The presentation answers many questions about the project purpose and policies. https://youtu.be/f4JinCpcQOg diff --git a/blog/2025-01-29-nyc-hackathon/index.md b/blog/2025-01-29-nyc-hackathon/index.md index a8a6f9c..bdc50e8 100644 --- a/blog/2025-01-29-nyc-hackathon/index.md +++ b/blog/2025-01-29-nyc-hackathon/index.md @@ -11,7 +11,8 @@ comments: true Adobe hosted an exciting and intense half-day Beman hackathon where we worked on adding new Beman libraries, addressed infrastructure issues, and brainstormed -designs for the Beman website. +designs for the Beman website. + It was awesome to collaborate in person. Here's diff --git a/blog/2025-07-06-sofia-hackathon/images/beman-tidy-board.png b/blog/2025-07-06-sofia-hackathon/images/beman-tidy-board.png index 56c9cc9..37d6409 100644 Binary files a/blog/2025-07-06-sofia-hackathon/images/beman-tidy-board.png and b/blog/2025-07-06-sofia-hackathon/images/beman-tidy-board.png differ diff --git a/blog/2025-07-06-sofia-hackathon/index.md b/blog/2025-07-06-sofia-hackathon/index.md index 6648c4b..8bf693b 100644 --- a/blog/2025-07-06-sofia-hackathon/index.md +++ b/blog/2025-07-06-sofia-hackathon/index.md @@ -9,16 +9,15 @@ comments: true ![intro](./images/intro-v2.png) - During the ISO WG21 C++ Meeting in [Sofia, June 2025](https://wg21.link/N5004), we hosted an in-person Beman - Evening Session — a mix of short presentations, a hands-on hackathon, and plenty of big ideas for the future of C++. What started as a relaxed gathering quickly turned into a productive (and caffeinated) brainstorming hub, where we explored potential C++29 library proposals, shared early-stage experiments, and even wrote code live. It was part workshop, part jam session, and fully in the spirit of what makes the C++ community so unique: collaboration, creativity, and a shared passion for pushing the language forward. -Since November 2024, we have been organizing Beman presentations at ISO WG21 C++ meetings (Warsaw 2024 - Poland, Hagenberg 2025 - Austria). Since we have been receiving positive feedback, we decided to organize another one in Sofia, June 2025 - Bulgaria. (Note that our next session will be at CppCon in September in Colorado - stay tuned for more details!) +Since November 2024, we have been organizing Beman presentations at ISO WG21 C++ meetings (Warsaw 2024 - Poland, Hagenberg 2025 - Austria). Since we have been receiving positive feedback, we decided to organize another one in Sofia, June 2025 - Bulgaria. (Note that our next session will be at CppCon in September in Colorado - stay tuned for more details!) ![intro](./images/intro-v1.png) -We had a great turnout, with 25 participants. The evening started with a great discussion about The Beman Project and where it is going, especially considering the C++26 is closed and the design cycle for C++29 is starting. +We had a great turnout, with 25 participants. The evening started with a great discussion about The Beman Project and where it is going, especially considering the C++26 is closed and the design cycle for C++29 is starting. We presented our first [Production ready. API may undergo changes.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#production-ready-api-may-undergo-changes) library, which is the [beman.optional](https://github.com/bemanproject/optional) library, hoping to get it into the C++26 standard and become [Production ready. Stable API.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#production-ready-stable-api). We counted a total of 10 [Under development and not yet ready for production use.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#production-ready-stable-api) Beman libraries. @@ -34,7 +33,7 @@ The implication during the hackathon was substantial, with 10 participants worki We were very happy with the impact of that evening (Wednesday evening, in the middle of the ISO WG21 C++ Meeting), but surprises continued ... -After Friday's LEWG session, [P3655R1: std::zstring_view](https://wg21.link/P3655R1) was presented and got feedback to continue the proposed direction. As an immediate consequence of this event, a new author created the [beman.cstring_view](https://github.com/bemanproject/cstring_view) library, to pursue the C++29 proposal. +After Friday's LEWG session, [P3655R1: std::zstring_view](https://wg21.link/P3655R1) was presented and got feedback to continue the proposed direction. As an immediate consequence of this event, a new author created the [beman.cstring_view](https://github.com/bemanproject/cstring_view) library, to pursue the C++29 proposal. The cherry on the cake was the Saturday's plenary! Lots and lots of great news for Beman folks! diff --git a/blog/2025-09-15-beman-infra-containers/index.md b/blog/2025-09-15-beman-infra-containers/index.md index 7017071..05514f4 100644 --- a/blog/2025-09-15-beman-infra-containers/index.md +++ b/blog/2025-09-15-beman-infra-containers/index.md @@ -44,38 +44,49 @@ The simplest way to understand how the infra-containers are used is to look at a ```json { "clang": [ - { "versions": ["20"], + { + "versions": ["20"], "tests": [ - {"cxxversions": ["c++26"], + { + "cxxversions": ["c++26"], "tests": [ - { "stdlibs": ["libstdc++", "libc++"], + { + "stdlibs": ["libstdc++", "libc++"], "tests": [ - "Debug.Default", "Release.Default", "Release.MaxSan", - "Debug.Werror", "Debug.Dynamic" + "Debug.Default", + "Release.Default", + "Release.MaxSan", + "Debug.Werror", + "Debug.Dynamic" ] } ] }, - { "cxxversions": ["c++23", "c++20"], + { + "cxxversions": ["c++23", "c++20"], "tests": [ - {"stdlibs": ["libstdc++", "libc++"], "tests": ["Release.Default"]} + { "stdlibs": ["libstdc++", "libc++"], "tests": ["Release.Default"] } ] } ] }, - { "versions": ["19", "18"], + { + "versions": ["19", "18"], "tests": [ - { "cxxversions": ["c++26", "c++23", "c++20"], + { + "cxxversions": ["c++26", "c++23", "c++20"], "tests": [ - {"stdlibs": ["libstdc++", "libc++"], "tests": ["Release.Default"]} + { "stdlibs": ["libstdc++", "libc++"], "tests": ["Release.Default"] } ] } ] }, - { "versions": ["17"], + { + "versions": ["17"], "tests": [ - { "cxxversions": ["c++26", "c++23", "c++20"], - "tests": [{"stdlibs": ["libc++"], "tests": ["Release.Default"]}] + { + "cxxversions": ["c++26", "c++23", "c++20"], + "tests": [{ "stdlibs": ["libc++"], "tests": ["Release.Default"] }] } ] } diff --git a/blog/authors.yml b/blog/authors.yml index 85039f5..11683a8 100644 --- a/blog/authors.yml +++ b/blog/authors.yml @@ -26,7 +26,7 @@ dabrahams: github: dabrahams dietmarkuehl: - name: Dietmar Kühl + name: Dietmar Kühl title: Software Developer url: http://www.dietmar-kuehl.de/ image_url: https://avatars.githubusercontent.com/u/1319703?v=4 @@ -37,7 +37,7 @@ dietmarkuehl: linkedin: dietmar-kühl ednolan: - name: Eddie Nolan + name: Eddie Nolan title: C++ Developer url: https://www.ednolan.com/ image_url: https://avatars.githubusercontent.com/u/907967?v=4 @@ -64,7 +64,7 @@ JeffGarland: github: JeffGarland mguludag: - name: Muhammed Galib Uludağ + name: Muhammed Galib Uludağ title: SW Engineer (C++ CMake Linux Automotive) url: https://github.com/mguludag image_url: https://avatars.githubusercontent.com/u/12413639?v=4 diff --git a/docs/beman_library_maturity_model.md b/docs/beman_library_maturity_model.md index ba708d1..b357996 100644 --- a/docs/beman_library_maturity_model.md +++ b/docs/beman_library_maturity_model.md @@ -26,7 +26,7 @@ These Beman-compliant libraries are production-ready, fully implementing the tar ### Production ready. Stable API. -These production-ready libraries offer stable, standardized APIs. They are part of the C++ Standard and can be used as a polyfill for compilers lacking native support. Note that these libraries will be retired after two standardization cycles (6 years). +These production-ready libraries offer stable, standardized APIs. They are part of the C++ Standard and can be used as a polyfill for compilers lacking native support. Note that these libraries will be retired after two standardization cycles (6 years). > These libraries are recommended for production usage. @@ -37,11 +37,10 @@ These libraries were archived and no longer maintained. These libraries are not > These libraries are not recommended for production use! > These libraries were removed from the Beman main distribution, but the initial authors could still support them outside the Beman Project. - Transition examples: -* They were [Production ready. Stable API.](./beman_library_maturity_model.md#production-ready-stable-api) at some point, but are no longer developed or maintained, being superseded by native compiler implementations - `Mature retirement`. +- They were [Production ready. Stable API.](./beman_library_maturity_model.md#production-ready-stable-api) at some point, but are no longer developed or maintained, being superseded by native compiler implementations - `Mature retirement`. -* They were [Production ready. API may undergo changes.](./beman_library_maturity_model.md#production-ready-api-may-undergo-changes) at some point, but are no longer developed or maintained, being rejected from the ISO C+ Standardization - `Early retirement`. +- They were [Production ready. API may undergo changes.](./beman_library_maturity_model.md#production-ready-api-may-undergo-changes) at some point, but are no longer developed or maintained, being rejected from the ISO C+ Standardization - `Early retirement`. -* They were [Under development and not yet ready for production use.](./beman_library_maturity_model.md#under-development-and-not-yet-ready-for-production-use) at some point and were abandoned - `Early retirement`. +- They were [Under development and not yet ready for production use.](./beman_library_maturity_model.md#under-development-and-not-yet-ready-for-production-use) at some point and were abandoned - `Early retirement`. diff --git a/docs/beman_standard.md b/docs/beman_standard.md index e6ceb00..f42faf9 100644 --- a/docs/beman_standard.md +++ b/docs/beman_standard.md @@ -38,7 +38,7 @@ needs. To make changes: 1. Create a [discourse topic](https://discourse.boost.org) detailing the change and how it aligns with the core principles. 2. After some community discussion, create a PR with the actual change on - [GitHub](https://github.com/bemanproject/beman) and apply the *Beman leads* label. + [GitHub](https://github.com/bemanproject/beman) and apply the **Beman leads** label. The PR should also link to the discourse topic. 3. Continue discussions on the PR and discourse topic. 4. Await a leads decision based on the community feedback. @@ -131,18 +131,19 @@ Here is snapshot of `default branch` settings in `exemplar` repository: **Requirement**: There must be a default `Rulesets` configured for any Beman repository (library, infrastructre, documentation, etc.) Use the following example: -* Go to your repository's settings - e.g., [exemplar/settings](https://github.com/bemanproject/exemplar/settings/). -* Go to `Code and automation` / `Rules` / `Rulesets` - e.g., [exemplar/settings/rulesets](https://github.com/bemanproject/exemplar/settings/rules/). -* You should have a single ruleset named `Default` - e.g., [exemplar/settings/rulesets/beman](https://github.com/bemanproject/exemplar/settings/rulesets/beman). -* Create (via `New ruleset` button) or update (click on `Default` ruleset) it to include the following rules: - * Rulset Name: `Default` - * Enforcement status: `Active` - * Bypass list: Check `Organization admin` and `Repository admin` - * Target branch: Check `Include default branch` - * Go to `Rules` section - * Check `Restrict deletions` and `Block force pushes` - * Check `Require a pull request before merging` and configure it to have `Required approvals: 1`, `Require review from Code Owners` and `Allowed merge methods: Merge, Squash, Rebase`. -* Click `Create` to save the ruleset. + +- Go to your repository's settings - e.g., [exemplar/settings](https://github.com/bemanproject/exemplar/settings/). +- Go to `Code and automation` / `Rules` / `Rulesets` - e.g., [exemplar/settings/rulesets](https://github.com/bemanproject/exemplar/settings/rules/). +- You should have a single ruleset named `Default` - e.g., [exemplar/settings/rulesets/beman](https://github.com/bemanproject/exemplar/settings/rulesets/beman). +- Create (via `New ruleset` button) or update (click on `Default` ruleset) it to include the following rules: + - Rulset Name: `Default` + - Enforcement status: `Active` + - Bypass list: Check `Organization admin` and `Repository admin` + - Target branch: Check `Include default branch` + - Go to `Rules` section + - Check `Restrict deletions` and `Block force pushes` + - Check `Require a pull request before merging` and configure it to have `Required approvals: 1`, `Require review from Code Owners` and `Allowed merge methods: Merge, Squash, Rebase`. +- Click `Create` to save the ruleset. Here is a snapshot of `default branch` settings in `exemplar`: @@ -153,7 +154,8 @@ Here is a snapshot of `default branch` settings in `exemplar`: **Recommendation**: The repository should not use git submodules. Check `cmake.use_find_package` for alternatives. Known exceptions: -* [mpark/wg21: Framework for Writing C++ Committee Papers](https://github.com/mpark/wg21): A non-C++ submodule designed for drafting ISO C++ papers using LaTeX or Markdown. + +- [mpark/wg21: Framework for Writing C++ Committee Papers](https://github.com/mpark/wg21): A non-C++ submodule designed for drafting ISO C++ papers using LaTeX or Markdown. ## Release @@ -180,11 +182,11 @@ Known exceptions: - Build system changes - Documentation updates - 2.4. A "New Contributors" section listing all first-time contributors. + 2.4. A "New Contributors" section listing all first-time contributors. - 2.5. A "Full Changelog" link to the complete list of commits. + 2.5. A "Full Changelog" link to the complete list of commits. - 2.6. A "Contributors" section listing all contributors to this release. Note: This section is autogenerated by GitHub Releases! + 2.6. A "Contributors" section listing all contributors to this release. Note: This section is autogenerated by GitHub Releases! Use the following format: @@ -199,13 +201,12 @@ Use the following format: This release has a status of [Under development and not yet ready for production use.](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#under-development-and-not-yet-ready-for-production-use). - ## Changelog -* by @${USER} in https://github.com/bemanproject/${REPO}/pull/${PR_ID} -* ... +- by @${USER} in https://github.com/bemanproject/${REPO}/pull/${PR_ID} +- ... **Full Changelog**: https://github.com/bemanproject/${REPO}/compare/${PREV_VERSION}...${CURRENT_VERSION} @@ -213,9 +214,8 @@ This release has a status of [Under development and not yet ready for production -* @${USER} made their first contribution in https://github.com/bemanproject/${REPO}/pull/#${PR_ID} -* ... - +- @${USER} made their first contribution in https://github.com/bemanproject/${REPO}/pull/#${PR_ID} +- ... ``` Complete examples can be found in [https://github.com/bemanproject/exemplar/releases](https://github.com/bemanproject/exemplar/releases). @@ -224,12 +224,10 @@ Here is a snapshot of notes for a particular release in `exemplar`: ![](./images/release.notes-example01.png) - ### **[release.godbolt_trunk_version]** **Recommendation**: A Beman library should have at least a trunk version deployed on godbolt with nightyclone mode activated. Check [tutorial: Compiler Explorer Deployment](https://github.com/bemanproject/beman/blob/main/guidelines/compiler-explorer-deployment.md). - ## Top-level The top-level of a Beman library repository must consist of `CMakeLists.txt`, `LICENSE`, and `README.md` files. @@ -269,6 +267,7 @@ Examples: **Requirement**: Following the title, the `README.md` must have a one-line badge list. Examples: library status (`[readme.library_status]`), CI status, code coverage, Compiler Explorer example. Example: + ```markdown ![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg) ![Continuous Integration Tests](https://github.com/bemanproject/exemplar/actions/workflows/ci_tests.yml/badge.svg) ![Lint Check (pre-commit)](https://github.com/bemanproject/exemplar/actions/workflows/pre-commit.yml/badge.svg) [![Compiler Explorer Example](https://img.shields.io/badge/Try%20it%20on%20Compiler%20Explorer-grey?logo=compilerexplorer&logoColor=67c52a)](https://godbolt.org) ``` @@ -326,7 +325,7 @@ If the library has been deployed onto Compiler Explorer, add this badge and repl ```markdown **Implements**: [`std::optional` (P2988R5)](https://wg21.link/P2988R5) and -[Give *std::optional* Range Support (P3168R1)](https://wg21.link/P3168R1). +[Give **std::optional** Range Support (P3168R1)](https://wg21.link/P3168R1). ``` ### **[readme.library_status]** @@ -362,6 +361,7 @@ or **Requirement**: Following the library status line and a new line, the `README.md` must have a `LICENSE` section. Use exactly the following format: + ```markdown ## License @@ -418,7 +418,6 @@ find_package( [REQUIRED]) See `[cmake.skip_tests]` in this document for a working example or [exemplar/blob/main/CMakeLists.txt](https://github.com/bemanproject/exemplar/blob/main/CMakeLists.txt). - ### **[cmake.project_name]** **Recommendation**: The CMake project name should be identical to the beman library name. @@ -520,7 +519,6 @@ endif() The `CMakeLists.txt` in the test directory can declare any test-only dependendencies that are required. For instance: - ```CMake # File: /tests/CMakeLists.txt # ... @@ -581,7 +579,7 @@ add_subdirectory(beman) # Don't do this add_subdirectory(optional) # Don't do this ``` -### **[cmake.implicit_defaults]** +### **[cmake.implicit_defaults]** **Recommendation**: Where CMake commands have reasonable default values, and the project does not intend to change those values, the parameters should be left implicitly defaulted rather than enumerated in the command. @@ -798,19 +796,19 @@ first possible line in all files which can contain a comment Examples: -* C++ files shall use the following form: +- C++ files shall use the following form: ```C++ // SPDX-License-Identifier: ``` -* CMake files and scripts shall use the following form: +- CMake files and scripts shall use the following form: ```CMake # SPDX-License-Identifier: ``` -* Markdown files will use a comment following the title: +- Markdown files will use a comment following the title: ```markdown # Title diff --git a/docs/code_of_conduct.md b/docs/code_of_conduct.md index f9b139d..6e80811 100644 --- a/docs/code_of_conduct.md +++ b/docs/code_of_conduct.md @@ -13,13 +13,13 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception The Beman Project community works to be welcoming and kind among itself and to others, with a deep commitment to psychological safety, and we want to ensure that doesn’t change as we grow and evolve. To that end, we have a few ground rules that we ask all community members to adhere to: -* be welcoming, -* be friendly and patient, -* be considerate, -* be kind, -* be careful in the words that we choose, -* when we disagree, try to understand the reason -* recognize when progress has stopped, and take a step back. +- be welcoming, +- be friendly and patient, +- be considerate, +- be kind, +- be careful in the words that we choose, +- when we disagree, try to understand the reason +- recognize when progress has stopped, and take a step back. This list isn't exhaustive. Rather, take it in the spirit in which it’s intended -- a guide to make it easier to communicate and participate in the community. @@ -36,74 +36,73 @@ If you believe someone is violating the code of conduct, please report it to the More detailed guidance on how to participate effectively in our community spaces: -* **Be welcoming.** - - We strive to be a community that welcomes and supports - people of all backgrounds and identities. - This includes, but is not limited to, members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, physical appearance, age, size, family status, relationship status, political belief, religion or lack thereof, and mental and physical ability. - -* **Be friendly and patient.** - - We want to encourage people to participate in our community in a constructive manner, so we can keep a friendly atmosphere. - This is especially important because many of our communication - tools on the Internet are low-fidelity and make it difficult to understand - each other. - Be patient, acknowledge that we are all on a learning journey, and stay supportive so that we can learn how to collaborate effectively as a group. - -* **Be considerate.** - - Your work will be used by other people, and you in turn will depend on the work of others. - Any decision you make will affect users and colleagues, and you should take those consequences into account. - Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language. - -* **Be kind.** - - Not all of us will agree all the time, but disagreement is no excuse for poor behavior and hurtful words. - We might all experience some frustration now and then, but we cannot allow that frustration to turn into - a personal attack. - It’s important to remember that a community where people feel threatened is not a productive one. - Members of our community should be kind when dealing with other members as well as with people outside the - Beman Project community. - -* **Be careful in the words that we choose and be kind to others.** - - Do not use insults or put downs. - Harassment and other exclusionary behaviors aren’t acceptable. This includes, but is not limited to: - - * Violent threats or language directed against another person. - * Discriminatory jokes and language. - * Posting sexually explicit or violent material. - * Posting, or threatening to post, other people’s personally identifying - information without their explicit permission ("doxing"). - * Personal insults, especially those using racist or sexist terms. - * Unwelcome sexual attention. - * Advocating for, or encouraging, any of the above behavior. - * In general, if someone asks you to stop, then stop. Persisting after - being asked to stop is considered harassment. - -* **When we disagree, we try to understand the reason.** - - Disagreements, both social and technical, happen all the time. - It is important that we resolve disagreements and differing views constructively. - Remember that we’re different. - The strength of the project comes from its varied community: people from a wide range of backgrounds. - Different people have different perspectives on issues. - Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. - Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. - Instead, focus on helping to resolve issues and learning from mistakes. - -* **Recognize when progress has stopped, and take a step back.** - - Regardless of whether you're trying to resolve a disagreement or anything else, think - about whether you're making progress. - Sometimes messaging doesn't give time to think about a situation fully, and repeating positions can make people - defensive. - Step back for a few minutes or hours to think through the issue before responding again. - Consider pulling in another community member to give a fresh perspective. - Maybe meet over VC (video call) instead. - Switching approaches can help resume progress. - -No weapons are allowed at Beman Project events. +- **Be welcoming.** + + We strive to be a community that welcomes and supports + people of all backgrounds and identities. + This includes, but is not limited to, members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, physical appearance, age, size, family status, relationship status, political belief, religion or lack thereof, and mental and physical ability. + +- **Be friendly and patient.** + + We want to encourage people to participate in our community in a constructive manner, so we can keep a friendly atmosphere. + This is especially important because many of our communication + tools on the Internet are low-fidelity and make it difficult to understand + each other. + Be patient, acknowledge that we are all on a learning journey, and stay supportive so that we can learn how to collaborate effectively as a group. + +- **Be considerate.** + + Your work will be used by other people, and you in turn will depend on the work of others. + Any decision you make will affect users and colleagues, and you should take those consequences into account. + Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language. + +- **Be kind.** + + Not all of us will agree all the time, but disagreement is no excuse for poor behavior and hurtful words. + We might all experience some frustration now and then, but we cannot allow that frustration to turn into + a personal attack. + It’s important to remember that a community where people feel threatened is not a productive one. + Members of our community should be kind when dealing with other members as well as with people outside the + Beman Project community. + +- **Be careful in the words that we choose and be kind to others.** + + Do not use insults or put downs. + Harassment and other exclusionary behaviors aren’t acceptable. This includes, but is not limited to: + - Violent threats or language directed against another person. + - Discriminatory jokes and language. + - Posting sexually explicit or violent material. + - Posting, or threatening to post, other people’s personally identifying + information without their explicit permission ("doxing"). + - Personal insults, especially those using racist or sexist terms. + - Unwelcome sexual attention. + - Advocating for, or encouraging, any of the above behavior. + - In general, if someone asks you to stop, then stop. Persisting after + being asked to stop is considered harassment. + +- **When we disagree, we try to understand the reason.** + + Disagreements, both social and technical, happen all the time. + It is important that we resolve disagreements and differing views constructively. + Remember that we’re different. + The strength of the project comes from its varied community: people from a wide range of backgrounds. + Different people have different perspectives on issues. + Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. + Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. + Instead, focus on helping to resolve issues and learning from mistakes. + +- **Recognize when progress has stopped, and take a step back.** + + Regardless of whether you're trying to resolve a disagreement or anything else, think + about whether you're making progress. + Sometimes messaging doesn't give time to think about a situation fully, and repeating positions can make people + defensive. + Step back for a few minutes or hours to think through the issue before responding again. + Consider pulling in another community member to give a fresh perspective. + Maybe meet over VC (video call) instead. + Switching approaches can help resume progress. + +No weapons are allowed at Beman Project events. Weapons include, but are not limited to, explosives (including fireworks), guns, and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. @@ -129,33 +128,33 @@ If you believe someone is violating the code of conduct, you can report it to th **All reports will be kept confidential**, and are only used by the conduct team to address conduct issues and keep the Beman Project community safe and inclusive. -Please send reports concerning a member of the conduct team directly to other members of the conduct team. +Please send reports concerning a member of the conduct team directly to other members of the conduct team. This allows discussion of the complaint to more easily exclude the concerned member as a [special case](#special-cases). If you believe anyone is in **physical danger**, please notify appropriate law enforcement first. If you are unsure what law enforcement agency is appropriate, please include this in your report and we will attempt to notify them. -If the violation occurs at an event and requires immediate attention, you can also reach out to any of the event organizers or staff. -Event organizers and staff will be prepared to handle the incident and be able to help. +If the violation occurs at an event and requires immediate attention, you can also reach out to any of the event organizers or staff. +Event organizers and staff will be prepared to handle the incident and be able to help. If you cannot find one of the organizers, the venue staff can locate one for you. Specific event information will include detailed contact information for that event. In person reports will still be kept confidential exactly as above, but also feel free to email the conduct team, anonymously if needed. ### Filing a report -Reports can be as formal or informal as needed for the situation at hand. -If possible, please include as much information as you can. +Reports can be as formal or informal as needed for the situation at hand. +If possible, please include as much information as you can. If you feel comfortable, please consider including: -* Your contact info, so we can get in touch with you if we need to follow up. -* Names -- real, nicknames, or pseudonyms -- of any individuals involved. If - there were other witnesses besides you, please try to include them as well. -* When and where the incident occurred. Please be as specific as possible. -* Your account of what occurred, including any private chat logs or email. -* Links for any public records, including community discussions. -* Any extra context for the incident. -* Whether you believe this incident is ongoing. -* Any other information you believe we should have. +- Your contact info, so we can get in touch with you if we need to follow up. +- Names -- real, nicknames, or pseudonyms -- of any individuals involved. If + there were other witnesses besides you, please try to include them as well. +- When and where the incident occurred. Please be as specific as possible. +- Your account of what occurred, including any private chat logs or email. +- Links for any public records, including community discussions. +- Any extra context for the incident. +- Whether you believe this incident is ongoing. +- Any other information you believe we should have. ### What happens after contacting the conduct team? @@ -164,24 +163,24 @@ business day, and we will aim to respond much quicker than that. The conduct team will review the incident as soon as possible and try to determine: -* What happened and who was involved. -* Whether this event constitutes a code of conduct violation. -* Whether this is an ongoing situation, or if there is a threat to anyone’s - physical safety. +- What happened and who was involved. +- Whether this event constitutes a code of conduct violation. +- Whether this is an ongoing situation, or if there is a threat to anyone’s + physical safety. If this is determined to be an ongoing incident or a threat to physical safety, -the conduct team's immediate priority will be to protect everyone involved. +the conduct team's immediate priority will be to protect everyone involved. This means we may delay an "official" response until we believe that the situation has ended and that everyone is physically safe. The conduct team will try to contact other parties involved or witnessing the event to gain clarity on what happened and understand any different perspectives. -Once the conduct team has a complete account of the events they will make a decision as to how to respond. +Once the conduct team has a complete account of the events they will make a decision as to how to respond. Responses may include: -* Nothing, if no violation occurred or it has already been appropriately resolved. -* One or more [enforcement actions](#enforcement-action-guidelines). -* Involvement of relevant law enforcement if appropriate. +- Nothing, if no violation occurred or it has already been appropriately resolved. +- One or more [enforcement actions](#enforcement-action-guidelines). +- Involvement of relevant law enforcement if appropriate. If the situation is not resolved within one week, we’ll respond to the original reporter with an update and explanation. @@ -190,24 +189,24 @@ Once we’ve determined our response, we will separately contact the original re taking. We will take into account feedback from the individuals involved on the appropriateness of our response, but we don’t guarantee we’ll act on it. -After any incident, the Beman Project leads may choose to make a public statement about the incident. +After any incident, the Beman Project leads may choose to make a public statement about the incident. If that’s the case, the identities of anyone involved will remain confidential unless instructed otherwise by those individuals. ### Appealing -Only permanent resolutions, such as bans, or requests for public actions may be appealed. +Only permanent resolutions, such as bans, or requests for public actions may be appealed. To appeal a decision of the conduct team, contact the [Beman leads](governance.md) with your appeal and they will review the case. In general, it is **not** appropriate to appeal a particular decision in public -areas of GitHub or Discord. -Doing so would involve disclosure of information which should remain confidential. -Disclosing this kind of information publicly may be considered a separate and, potentially, more serious violation of the Code of Conduct. +areas of GitHub or Discord. +Doing so would involve disclosure of information which should remain confidential. +Disclosing this kind of information publicly may be considered a separate and, potentially, more serious violation of the Code of Conduct. This is not meant to limit discussion of the Code of Conduct, the conduct team itself, or the appropriateness of responses in general, but **please** refrain from mentioning specific facts about cases without the explicit permission of all parties involved. ### Special cases If a complaint is raised against a member of the Beman Project leads, they will be excluded from conduct discussion and decisions, including appeals. -They will only be included as needed for an involved party, such as to get their perspective or to notify them of decisions. +They will only be included as needed for an involved party, such as to get their perspective or to notify them of decisions. Such complaints may lead to a member's responsibilities being revoked. ## Enforcement action guidelines @@ -219,30 +218,30 @@ The conduct team may take additional action they deem appropriate for any violat involved: 1. **Correction** - * **Behavior:** Use of inappropriate language or other minor violations of - the code of conduct. - * **Action:** A private, written message providing clarity around the - nature of the violation and an explanation of why the behavior was - inappropriate. - A public apology may be requested. + - **Behavior:** Use of inappropriate language or other minor violations of + the code of conduct. + - **Action:** A private, written message providing clarity around the + nature of the violation and an explanation of why the behavior was + inappropriate. + A public apology may be requested. 1. **Warning** - * **Behavior:** A code of conduct violation through a single moderate - incident, or a series of minor violations. - * **Action:** In addition to the correction action, a temporary - restriction forbidding interaction with the people involved for a - specified period of time, including unsolicited interaction with the - conduct team. - Violating these terms may lead to a ban. + - **Behavior:** A code of conduct violation through a single moderate + incident, or a series of minor violations. + - **Action:** In addition to the correction action, a temporary + restriction forbidding interaction with the people involved for a + specified period of time, including unsolicited interaction with the + conduct team. + Violating these terms may lead to a ban. 1. **Temporary ban** - * **Behavior:** A serious violation of the code of conduct, including - sustained inappropriate behavior. - * **Action:** In addition to the warning action, a temporary ban from use - of Beman Project's community spaces for a specified period of time. External channels, such as social media, should not be used to bypass these restrictions during the temporary ban. - Violating these terms may lead to a permanent ban. + - **Behavior:** A serious violation of the code of conduct, including + sustained inappropriate behavior. + - **Action:** In addition to the warning action, a temporary ban from use + of Beman Project's community spaces for a specified period of time. External channels, such as social media, should not be used to bypass these restrictions during the temporary ban. + Violating these terms may lead to a permanent ban. 1. **Permanent ban** - * **Behavior:** Demonstrating a pattern of violation of the code of - conduct. - * **Action:** A permanent ban from use of Beman Project's community spaces. + - **Behavior:** Demonstrating a pattern of violation of the code of + conduct. + - **Action:** A permanent ban from use of Beman Project's community spaces. ## Acknowledgements diff --git a/docs/governance.md b/docs/governance.md index 13f683c..9a42bc0 100644 --- a/docs/governance.md +++ b/docs/governance.md @@ -39,7 +39,7 @@ Beman Leads are currently: Jeff Garland, Inbal Levi, and Eddie Nolan. ### 3.1.2 Adding and removing Beman Leads -Any member of Beman Project Leads may step down or be replaced when they are no longer able to contribute effectively. +Any member of Beman Project Leads may step down or be replaced when they are no longer able to contribute effectively. The Beman Project Leads can nominate and decide on adding, removing, or replacing members by a majority decision. ## 3.2 Beman Project Contributors: @@ -48,7 +48,7 @@ The Beman Project Contributors are individuals who help execute the facilities p ### 3.2.3 Adding and removing Beman Project Contributors -The Beman Project Leads may accept new members or remove members to the Beman Project Contributors by majority decision. There is no restriction to the number of Project Contributors. +The Beman Project Leads may accept new members or remove members to the Beman Project Contributors by majority decision. There is no restriction to the number of Project Contributors. ## 3.3 Beman Project Library Authors: @@ -56,7 +56,7 @@ The Beman Project Library Authors are the Library authors who are maintaining an ### 3.3.3 Adding and removing Beman Project Library Authors: -Beman Project Library Authors apply for acceptance into Beman Project when they have reached the point of path toward standardization. +Beman Project Library Authors apply for acceptance into Beman Project when they have reached the point of path toward standardization. This would be the submission of a Paper to the Committee, request to have a library to help write their paper, or a similar path. Removal as a Beman Project Library Author may be done when the library no longer becomes part of the Beman Project. diff --git a/docs/images/release.notes-example01.png b/docs/images/release.notes-example01.png index d9a7de8..895cfdc 100644 Binary files a/docs/images/release.notes-example01.png and b/docs/images/release.notes-example01.png differ diff --git a/docs/images/repository.default_branch-example01.png b/docs/images/repository.default_branch-example01.png index 366a787..723750e 100644 Binary files a/docs/images/repository.default_branch-example01.png and b/docs/images/repository.default_branch-example01.png differ diff --git a/docusaurus.config.ts b/docusaurus.config.ts index b204dd0..fc7a98a 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -1,18 +1,18 @@ -import { themes as prismThemes } from 'prism-react-renderer'; -import type { Config } from '@docusaurus/types'; -import type * as Preset from '@docusaurus/preset-classic'; -import { execSync } from 'child_process'; +import { themes as prismThemes } from "prism-react-renderer"; +import type { Config } from "@docusaurus/types"; +import type * as Preset from "@docusaurus/preset-classic"; +import { execSync } from "child_process"; -const remarkEmbedder = require('@remark-embedder/core'); -const YouTubeTransformer = require('./src/components/youtube-transformer.js'); +const remarkEmbedder = require("@remark-embedder/core"); +const YouTubeTransformer = require("./src/components/youtube-transformer.js"); // Note: This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) -let branchName = process.env.NETLIFY ? process.env.HEAD : 'main'; +let branchName = process.env.NETLIFY ? process.env.HEAD : "main"; // Get the current branch name using git command try { - const output = execSync('git branch --show-current', { - encoding: 'utf-8', + const output = execSync("git branch --show-current", { + encoding: "utf-8", }).trim(); if (output) { branchName = output; @@ -22,42 +22,40 @@ try { console.error(`Error determining branch name: ${err}`); } - const config: Config = { - title: 'The Beman Project', - tagline: - 'Tomorrow\'s C++ Standard Libraries Today', - favicon: './img/beman_logo.png', + title: "The Beman Project", + tagline: "Tomorrow's C++ Standard Libraries Today", + favicon: "./img/beman_logo.png", // Set the production url of your site here - url: 'https://bemanproject.org/', + url: "https://bemanproject.org/", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/', + baseUrl: "/", // GitHub pages deployment config. - organizationName: 'bemanproject', // Usually your GitHub org/user name. - projectName: 'website', // Usually your repo name. + organizationName: "bemanproject", // Usually your GitHub org/user name. + projectName: "website", // Usually your repo name. - onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", // Even if you don't use internationalization, you can use this field to set // useful metadata like html lang. For example, if your site is Chinese, you // may want to replace "en" with "zh-Hans". i18n: { - defaultLocale: 'en', - locales: ['en'], + defaultLocale: "en", + locales: ["en"], }, - staticDirectories: ['static', 'images'], + staticDirectories: ["static", "images"], presets: [ [ - 'classic', + "classic", { docs: { - sidebarPath: './sidebars.ts', + sidebarPath: "./sidebars.ts", remarkPlugins: [ [remarkEmbedder, { transformers: [YouTubeTransformer] }], ], @@ -65,19 +63,19 @@ const config: Config = { blog: { showReadingTime: true, feedOptions: { - type: ['rss', 'atom'], + type: ["rss", "atom"], xslt: true, }, remarkPlugins: [ [remarkEmbedder, { transformers: [YouTubeTransformer] }], ], // Blogging config - onInlineTags: 'warn', - onInlineAuthors: 'warn', - onUntruncatedBlogPosts: 'throw', // Enforce truncation of blog posts for previews of blog posts. + onInlineTags: "warn", + onInlineAuthors: "warn", + onUntruncatedBlogPosts: "throw", // Enforce truncation of blog posts for previews of blog posts. }, theme: { - customCss: './src/css/custom.css', + customCss: "./src/css/custom.css", }, } satisfies Preset.Options, ], @@ -85,45 +83,45 @@ const config: Config = { themeConfig: { //TODO: Replace with your project's social card - image: './img/beman_logo.png', + image: "./img/beman_logo.png", navbar: { - title: 'The Beman Project', + title: "The Beman Project", logo: { - alt: 'The Beman Project Logo', - src: './img/beman_logo.png', + alt: "The Beman Project Logo", + src: "./img/beman_logo.png", }, items: [ { - type: 'docSidebar', - sidebarId: 'docsSidebar', - position: 'left', - label: 'Docs', + type: "docSidebar", + sidebarId: "docsSidebar", + position: "left", + label: "Docs", }, - { to: '/libraries', label: 'Libraries', position: 'left' }, - { to: '/blog', label: 'Blog', position: 'left' }, + { to: "/libraries", label: "Libraries", position: "left" }, + { to: "/blog", label: "Blog", position: "left" }, { - 'aria-label': 'Discourse Forum', - 'className': 'navbar--discourse-link', - 'href': 'https://discourse.bemanproject.org/', - 'position': 'right', + "aria-label": "Discourse Forum", + className: "navbar--discourse-link", + href: "https://discourse.bemanproject.org/", + position: "right", }, { - 'aria-label': 'GitHub Repository', - 'className': 'navbar--github-link', - 'href': 'https://github.com/bemanproject', - 'position': 'right', + "aria-label": "GitHub Repository", + className: "navbar--github-link", + href: "https://github.com/bemanproject", + position: "right", }, ], }, footer: { - style: 'dark', + style: "dark", copyright: `Copyright © ${new Date().getFullYear()} The Beman Project. Built with Docusaurus.`, }, prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula, }, - discourseUrl: 'https://discourse.bemanproject.org/', // Temporary change, re-deploy. + discourseUrl: "https://discourse.bemanproject.org/", // Temporary change, re-deploy. } satisfies Preset.ThemeConfig, }; diff --git a/images/badges/beman_badge-beman_library_production_ready_api_may_undergo_changes.svg b/images/badges/beman_badge-beman_library_production_ready_api_may_undergo_changes.svg index 2b0054b..ca49b43 100644 --- a/images/badges/beman_badge-beman_library_production_ready_api_may_undergo_changes.svg +++ b/images/badges/beman_badge-beman_library_production_ready_api_may_undergo_changes.svg @@ -1 +1 @@ -Library status: production ready (api may undergo changes)Library statusproduction ready (api may undergo changes) \ No newline at end of file +Library status: production ready (api may undergo changes)Library statusproduction ready (api may undergo changes) \ No newline at end of file diff --git a/images/badges/beman_badge-beman_library_production_ready_stable_api.svg b/images/badges/beman_badge-beman_library_production_ready_stable_api.svg index eaaa640..f0bab42 100644 --- a/images/badges/beman_badge-beman_library_production_ready_stable_api.svg +++ b/images/badges/beman_badge-beman_library_production_ready_stable_api.svg @@ -1 +1 @@ -Library status: production ready (stable api)Library statusproduction ready (stable api) \ No newline at end of file +Library status: production ready (stable api)Library statusproduction ready (stable api) \ No newline at end of file diff --git a/images/badges/beman_badge-beman_library_retired.svg b/images/badges/beman_badge-beman_library_retired.svg index eb5dd60..a9e1afc 100644 --- a/images/badges/beman_badge-beman_library_retired.svg +++ b/images/badges/beman_badge-beman_library_retired.svg @@ -1 +1 @@ -Library status: retiredLibrary statusretired \ No newline at end of file +Library status: retiredLibrary statusretired \ No newline at end of file diff --git a/images/badges/beman_badge-beman_library_under_development.svg b/images/badges/beman_badge-beman_library_under_development.svg index 986a1a6..2bbf4f6 100644 --- a/images/badges/beman_badge-beman_library_under_development.svg +++ b/images/badges/beman_badge-beman_library_under_development.svg @@ -1 +1 @@ -Library status: under developmentLibrary statusunder development \ No newline at end of file +Library status: under developmentLibrary statusunder development \ No newline at end of file diff --git a/images/badges/cpp26.svg b/images/badges/cpp26.svg index 11d3ccd..2d54103 100644 --- a/images/badges/cpp26.svg +++ b/images/badges/cpp26.svg @@ -1,7 +1 @@ - -Standard Target: C++26 - - - Standard Target - C++26 - +Standard Target: C++26Standard TargetC++26 \ No newline at end of file diff --git a/images/badges/cpp29.svg b/images/badges/cpp29.svg index 513e666..d1f2545 100644 --- a/images/badges/cpp29.svg +++ b/images/badges/cpp29.svg @@ -1,7 +1 @@ - - Standard Target: C++29 - - - Standard Target - C++29 - +Standard Target: C++29Standard TargetC++29 \ No newline at end of file diff --git a/images/banners/beman_banner.png b/images/banners/beman_banner.png index 31a72b5..2c1216e 100644 Binary files a/images/banners/beman_banner.png and b/images/banners/beman_banner.png differ diff --git a/images/banners/beman_banner_reversed.png b/images/banners/beman_banner_reversed.png index 1104e4d..3e712bb 100644 Binary files a/images/banners/beman_banner_reversed.png and b/images/banners/beman_banner_reversed.png differ diff --git a/images/beman_flow-beman_library_maturity_model.png b/images/beman_flow-beman_library_maturity_model.png index a71b4b7..61d8533 100644 Binary files a/images/beman_flow-beman_library_maturity_model.png and b/images/beman_flow-beman_library_maturity_model.png differ diff --git a/images/logos/beman_logo-beman_library_production_ready_api_may_undergo_changes.png b/images/logos/beman_logo-beman_library_production_ready_api_may_undergo_changes.png index 70f15b1..3160224 100644 Binary files a/images/logos/beman_logo-beman_library_production_ready_api_may_undergo_changes.png and b/images/logos/beman_logo-beman_library_production_ready_api_may_undergo_changes.png differ diff --git a/images/logos/beman_logo-beman_library_production_ready_stable_api.png b/images/logos/beman_logo-beman_library_production_ready_stable_api.png index 0938ba7..ece8f1d 100644 Binary files a/images/logos/beman_logo-beman_library_production_ready_stable_api.png and b/images/logos/beman_logo-beman_library_production_ready_stable_api.png differ diff --git a/images/logos/beman_logo-beman_library_retired.png b/images/logos/beman_logo-beman_library_retired.png index 51850d0..8a7bb78 100644 Binary files a/images/logos/beman_logo-beman_library_retired.png and b/images/logos/beman_logo-beman_library_retired.png differ diff --git a/images/logos/beman_logo-beman_library_under_development.png b/images/logos/beman_logo-beman_library_under_development.png index 4ac28bc..40367b2 100644 Binary files a/images/logos/beman_logo-beman_library_under_development.png and b/images/logos/beman_logo-beman_library_under_development.png differ diff --git a/images/logos/beman_logo.png b/images/logos/beman_logo.png index e729f12..1042e5e 100644 Binary files a/images/logos/beman_logo.png and b/images/logos/beman_logo.png differ diff --git a/images/logos/beman_logo_reversed.png b/images/logos/beman_logo_reversed.png index 8980e58..fc338ba 100644 Binary files a/images/logos/beman_logo_reversed.png and b/images/logos/beman_logo_reversed.png differ diff --git a/images/qr/beman-qr.png b/images/qr/beman-qr.png index 15df5f5..a26305e 100644 Binary files a/images/qr/beman-qr.png and b/images/qr/beman-qr.png differ diff --git a/scripts/README.md b/scripts/README.md index be2e728..f324fd7 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -7,6 +7,7 @@ This directory contains scripts for the Beman Project website. This script is used to sync the Beman Project documentation from the `beman/` repo to this `website/` repo. Steps: + 1. Copy images from `beman/images/` to `website/images/` and `website/static/images/`. 2. Copy documentation from `beman/docs/` to `website/docs/`. 3. Insert sidebar position into the documentation files. diff --git a/scripts/sync-docs.py b/scripts/sync-docs.py index 86ccacd..1582e66 100644 --- a/scripts/sync-docs.py +++ b/scripts/sync-docs.py @@ -5,17 +5,21 @@ import shutil from pathlib import Path + def parse_args(): """ Parse the CLI arguments. """ parser = argparse.ArgumentParser() - parser.add_argument("beman_repo_path", help="path to root of beman repo to clone from", type=str) + parser.add_argument( + "beman_repo_path", help="path to root of beman repo to clone from", type=str + ) args = parser.parse_args() return args + def copy_images(beman_repo_path: Path, website_repo_path: Path): """ Copy directory beman/images/ to /static/images/ for website build. @@ -23,26 +27,26 @@ def copy_images(beman_repo_path: Path, website_repo_path: Path): """ tasks = [ { - 'source': beman_repo_path / 'images', - 'target': website_repo_path / 'images', + "source": beman_repo_path / "images", + "target": website_repo_path / "images", }, { - 'source': beman_repo_path / 'images', - 'target': website_repo_path / 'static' / 'images', + "source": beman_repo_path / "images", + "target": website_repo_path / "static" / "images", }, { - 'source': beman_repo_path / 'docs' / 'images', - 'target': website_repo_path / 'docs' / 'images', + "source": beman_repo_path / "docs" / "images", + "target": website_repo_path / "docs" / "images", }, { - 'source': beman_repo_path / 'docs' / 'images', - 'target': website_repo_path / 'static' / 'docs' / 'images', + "source": beman_repo_path / "docs" / "images", + "target": website_repo_path / "static" / "docs" / "images", }, ] - + for task in tasks: - beman_images_path = task['source'] - target_directory = task['target'] + beman_images_path = task["source"] + target_directory = task["target"] print(f"Copying images from {beman_images_path} to {target_directory}") # Remove the target_directory if it exists and create it again. @@ -50,6 +54,7 @@ def copy_images(beman_repo_path: Path, website_repo_path: Path): shutil.rmtree(target_directory) shutil.copytree(beman_images_path, target_directory) + def insert_sidebar_position(file_path: Path, sidebar_position: int): """ Insert the sidebar position into the file. @@ -58,16 +63,22 @@ def insert_sidebar_position(file_path: Path, sidebar_position: int): sidebar_position: {sidebar_position} --- """ - with open(file_path, 'r') as file: + with open(file_path, "r") as file: lines = file.readlines() - lines.insert(0, f'---\n') - lines.insert(1, f'sidebar_position: {sidebar_position}\n') - lines.insert(2, f'---\n') - lines.insert(3, f'\n') - with open(file_path, 'w') as file: + lines.insert(0, f"---\n") + lines.insert(1, f"sidebar_position: {sidebar_position}\n") + lines.insert(2, f"---\n") + lines.insert(3, f"\n") + with open(file_path, "w") as file: file.writelines(lines) -def sync_beman_docs(beman_repo_path: Path, website_repo_path: Path, relative_path: str, sidebar_position: int): + +def sync_beman_docs( + beman_repo_path: Path, + website_repo_path: Path, + relative_path: str, + sidebar_position: int, +): """ Copy beman/{relative_path} to /docs/{relative_path} for website build. Insert the sidebar position into the file. @@ -80,6 +91,7 @@ def sync_beman_docs(beman_repo_path: Path, website_repo_path: Path, relative_pat print(f"Inserting sidebar position {sidebar_position} into {website_path}") insert_sidebar_position(website_path, sidebar_position) + def main(): """ The sync-docs main entry point. @@ -90,13 +102,16 @@ def main(): website_repo_path = Path(__file__).parent.parent copy_images(beman_repo_path, website_repo_path) - sync_beman_docs(beman_repo_path, website_repo_path, 'docs/README.md', 1) - sync_beman_docs(beman_repo_path, website_repo_path, 'docs/beman_library_maturity_model.md', 2) - sync_beman_docs(beman_repo_path, website_repo_path, 'docs/beman_standard.md', 3) - sync_beman_docs(beman_repo_path, website_repo_path, 'docs/mission.md', 4) - sync_beman_docs(beman_repo_path, website_repo_path, 'docs/faq.md', 5) - sync_beman_docs(beman_repo_path, website_repo_path, 'docs/governance.md', 6) - sync_beman_docs(beman_repo_path, website_repo_path, 'docs/code_of_conduct.md', 7) + sync_beman_docs(beman_repo_path, website_repo_path, "docs/README.md", 1) + sync_beman_docs( + beman_repo_path, website_repo_path, "docs/beman_library_maturity_model.md", 2 + ) + sync_beman_docs(beman_repo_path, website_repo_path, "docs/beman_standard.md", 3) + sync_beman_docs(beman_repo_path, website_repo_path, "docs/mission.md", 4) + sync_beman_docs(beman_repo_path, website_repo_path, "docs/faq.md", 5) + sync_beman_docs(beman_repo_path, website_repo_path, "docs/governance.md", 6) + sync_beman_docs(beman_repo_path, website_repo_path, "docs/code_of_conduct.md", 7) + if __name__ == "__main__": main() diff --git a/sidebars.ts b/sidebars.ts index e870e26..b8f94d4 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -1,4 +1,4 @@ -import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; // Note: This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) @@ -13,7 +13,7 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; Create as many sidebars as you want. */ const sidebars: SidebarsConfig = { - docsSidebar: [{type: 'autogenerated', dirName: '.'}], + docsSidebar: [{ type: "autogenerated", dirName: "." }], }; export default sidebars; diff --git a/src/components/DiscourseComments/index.tsx b/src/components/DiscourseComments/index.tsx index 83864d2..daed214 100644 --- a/src/components/DiscourseComments/index.tsx +++ b/src/components/DiscourseComments/index.tsx @@ -1,6 +1,6 @@ -import React, { useEffect } from 'react'; -import { useLocation } from '@docusaurus/router'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import React, { useEffect } from "react"; +import { useLocation } from "@docusaurus/router"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; export default function DiscourseComments() { const { @@ -13,7 +13,9 @@ export default function DiscourseComments() { // If discourseUrl is not defined, return null to skip rendering if (!discourseUrl) { - console.log('DiscourseComments: No discourseUrl defined in themeConfig, skipping render'); + console.log( + "DiscourseComments: No discourseUrl defined in themeConfig, skipping render", + ); return null; } @@ -27,16 +29,15 @@ export default function DiscourseComments() { } useEffect(() => { - - const baseUrl = url.endsWith('/') ? url.slice(-1, 1) : url; // Ensure baseUrl does not end with a slash + const baseUrl = url.endsWith("/") ? url.slice(-1, 1) : url; // Ensure baseUrl does not end with a slash const forum = discourseUrl; const embedUrl = baseUrl + window.location.pathname; - console.log('Discourse comments component mounted'); - console.log('Base URL:', baseUrl); - console.log('Current pathname:', pathname); - console.log('Discourse URL:', forum); - console.log('Embed URL:', embedUrl); + console.log("Discourse comments component mounted"); + console.log("Base URL:", baseUrl); + console.log("Current pathname:", pathname); + console.log("Discourse URL:", forum); + console.log("Embed URL:", embedUrl); // Update or set DiscourseEmbed window.DiscourseEmbed = { @@ -45,22 +46,24 @@ export default function DiscourseComments() { }; // Remove existing Discourse iframe if present - const existingIframe = document.querySelector('#discourse-comments iframe'); + const existingIframe = document.querySelector("#discourse-comments iframe"); if (existingIframe && existingIframe.parentNode) { existingIframe.parentNode.removeChild(existingIframe); } // Load or reload the embed script - const existingScript = document.querySelector(`script[src="${forum}javascripts/embed.js"]`); + const existingScript = document.querySelector( + `script[src="${forum}javascripts/embed.js"]`, + ); if (existingScript) { existingScript.parentNode.removeChild(existingScript); } - const script = document.createElement('script'); - script.src = forum + 'javascripts/embed.js'; + const script = document.createElement("script"); + script.src = forum + "javascripts/embed.js"; script.async = true; - script.onload = () => console.log('Discourse script loaded successfully'); - script.onerror = () => console.error('Failed to load Discourse script'); + script.onload = () => console.log("Discourse script loaded successfully"); + script.onerror = () => console.error("Failed to load Discourse script"); document.body.appendChild(script); return () => { @@ -68,7 +71,7 @@ export default function DiscourseComments() { script.parentNode.removeChild(script); } // Clean up iframe on unmount - const iframe = document.querySelector('#discourse-comments iframe'); + const iframe = document.querySelector("#discourse-comments iframe"); if (iframe && iframe.parentNode) { iframe.parentNode.removeChild(iframe); } @@ -76,4 +79,4 @@ export default function DiscourseComments() { }, [pathname, discourseUrl]); // Depend on pathname to re-run on route changes return
; -} \ No newline at end of file +} diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx index 20257e2..4b9919d 100644 --- a/src/components/HomepageFeatures/index.tsx +++ b/src/components/HomepageFeatures/index.tsx @@ -1,7 +1,7 @@ -import type {ReactNode} from 'react'; -import clsx from 'clsx'; -import Heading from '@theme/Heading'; -import styles from './styles.module.css'; +import type { ReactNode } from "react"; +import clsx from "clsx"; +import Heading from "@theme/Heading"; +import styles from "./styles.module.css"; type FeatureItem = { title: string; @@ -10,40 +10,60 @@ type FeatureItem = { const FeatureList: FeatureItem[] = [ { - title: 'Mission', + title: "Mission", description: ( - <> The Beman Project’s mission is to support the efficient design and adoption of the highest quality C++ Standard libraries through implementation experience, user feedback, and technical expertise. - Founded at C++Now in 2024 the project strives to aggregate libraries proposed for ISO standardization making a simple usage experience for the C++ Community to try out new libraries. For library authors we assist by helping to make best modern development practices easy. Including CI, coverage, and packaging. - This project is a completely volunteer effort. Please connect with us on our discourse if you’d like to help. + <> + {" "} + The Beman Project’s mission is to support the efficient design and + adoption of the highest quality C++ Standard libraries through + implementation experience, user feedback, and technical expertise. + Founded at C++Now in 2024 the project strives to aggregate libraries + proposed for ISO standardization making a simple usage experience for + the C++ Community to try out new libraries. For library authors we + assist by helping to make best modern development practices easy. + Including CI, coverage, and packaging. This project is a completely + volunteer effort. Please connect with us on our discourse if you’d like + to help. ), }, { - title: 'For Library Users', + title: "For Library Users", description: ( <> - The Beman Project strives to be a distributor of a single-download library collection for C++ libraries proposed for standardization. Our goals are to provide stable distributions that match with the latest versions of C++ proposals. - (check The Beman Libraries page). - Please note that it’s early days for the project so we’re still building our tooling and other details – please join the discussion at our discourse . + The Beman Project strives to be a distributor of a single-download + library collection for C++ libraries proposed for standardization. Our + goals are to provide stable distributions that match with the latest + versions of C++ proposals. (check{" "} + The Beman Libraries page). Please note that + it’s early days for the project so we’re still building our tooling and + other details – please join the discussion at{" "} + our discourse . ), }, { - title: 'For Library Authors', + title: "For Library Authors", description: ( <> - Submission into the Beman Project is easy – start a discussion on our discourse and the welcome team will help get you started. A general precondition is an intent to submit a library for standardization. If you don’t have repository yet, or you want to upgrade to our standard we can help. Once your library is ready and has a paper, we’ll include it in the Beman super project . - Please note that it’s early days for the project so we’re still building our tooling and other details. + Submission into the Beman Project is easy – start a discussion{" "} + on our discourse and + the welcome team will help get you started. A general precondition is an + intent to submit a library for standardization. If you don’t have + repository yet, or you want to upgrade to our standard we can help. Once + your library is ready and has a paper, we’ll include it in{" "} + the Beman super project . + Please note that it’s early days for the project so we’re still building + our tooling and other details. ), }, ]; -function Feature({title, description}: FeatureItem) { +function Feature({ title, description }: FeatureItem) { return ( -
-
-
+
+
{title}

{description}

diff --git a/src/components/youtube-transformer.js b/src/components/youtube-transformer.js index 7d805e7..8c7c346 100644 --- a/src/components/youtube-transformer.js +++ b/src/components/youtube-transformer.js @@ -1,12 +1,12 @@ const YouTubeTransformer = { - name: 'YouTube', + name: "YouTube", shouldTransform(url) { - return url.includes('youtube.com') || url.includes('youtu.be'); + return url.includes("youtube.com") || url.includes("youtu.be"); }, getHTML(url) { - const videoId = url.includes('youtu.be') - ? url.split('/').pop() - : new URL(url).searchParams.get('v'); + const videoId = url.includes("youtu.be") + ? url.split("/").pop() + : new URL(url).searchParams.get("v"); return `