From f5b18c3490ebceb12787aec68f71a47442bc3311 Mon Sep 17 00:00:00 2001 From: SITADRITA1 <mrlime2018@gmail.com> Date: Mon, 3 Mar 2025 22:29:03 +0100 Subject: [PATCH 1/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c93f7089b..0d86eb30d9 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you are here to edit or translate content, please do so inside [the `src/cont For making code changes, please check out the [technical overview](./docs/technical_overview.md) to get started. ### Adding Libraries -Follow the steps in the <a href="./docs/contributing_libraries.md">Contributing Libraries</a> doc if you would like to add your libary to the collection! +Follow the steps in the <a href="./docs/contributing_libraries.md">Contributing Libraries</a> doc if you would like to add your library to the collection! ## Add Yourself to p5.js Contributors We recognize all types of contributions. This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Add yourself to the [p5.js repository readme](https://github.com/processing/p5.js/blob/main/README.md#contributors) by following the [instructions here](https://github.com/processing/p5.js/issues/2309)! From 171a9cd337835696f9d2eaa0f031e63264540f3d Mon Sep 17 00:00:00 2001 From: SITADRITA1 <mrlime2018@gmail.com> Date: Mon, 3 Mar 2025 22:34:16 +0100 Subject: [PATCH 2/7] Update contributing_libraries.md --- docs/contributing_libraries.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing_libraries.md b/docs/contributing_libraries.md index cea1fc4d3c..52b6c41a75 100644 --- a/docs/contributing_libraries.md +++ b/docs/contributing_libraries.md @@ -19,6 +19,6 @@ p5.js welcomes libraries contributed by others! <a href="https://github.com/proc 4. Add a **high-res colored image of 1500x1000px** of your library into `src/content/libraries/images` 5. Submit a pull request and we'll review your submission -We add libraries that are open-source, includes some documentation and examples, and <a href="https://github.com/processing/p5.js/blob/main/CODE_OF_CONDUCT.md">follow our code of conduct.</a> This directory targets beginner users, so we aim to ensure users have a smooth experience getting started with any library linked to. +We add libraries that are open-source, include some documentation and examples, and <a href="https://github.com/processing/p5.js/blob/main/CODE_OF_CONDUCT.md">follow our code of conduct.</a> This directory targets beginner users, so we aim to ensure users have a smooth experience getting started with any library linked to. If you have any questions, feel free to open an issue or create a work-in-progress PR and ask us anything! From f32c5e0e17fec446b62a2de31a26ba962c0eaa51 Mon Sep 17 00:00:00 2001 From: SITADRITA1 <mrlime2018@gmail.com> Date: Mon, 3 Mar 2025 22:36:38 +0100 Subject: [PATCH 3/7] Update localization.md --- docs/localization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/localization.md b/docs/localization.md index dcc12f160c..969b4b9a42 100644 --- a/docs/localization.md +++ b/docs/localization.md @@ -29,7 +29,7 @@ Taking the tutorials page as an example: Both of these routes use the [TutorialsLayout](/src/layouts/TutorialsLayout.astro) to render the page by passing in the content in the correct language. -The main difference between these two routing files is how they retrieve the correct translation. The English version retreives the English version of the content. The other translations retrieve their version of the content and then fill in any gaps with English versions. See `getCollectionInLocaleWithFallbacks()` for how this works. +The main difference between these two routing files is how they retrieve the correct translation. The English version retrieves the English version of the content. The other translations retrieve their version of the content and then fill in any gaps with English versions. See `getCollectionInLocaleWithFallbacks()` for how this works. Because of this subtle duplication, we try to keep the files in `src/pages/` as short as possible and move rendering logic into the [layout files](/src/layouts/). From 0af41f9a72228d69fe007e4766d0a520c366fe9a Mon Sep 17 00:00:00 2001 From: SITADRITA1 <mrlime2018@gmail.com> Date: Mon, 3 Mar 2025 22:38:10 +0100 Subject: [PATCH 4/7] Update styles_architecture.md --- docs/styles_architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/styles_architecture.md b/docs/styles_architecture.md index 328126fdc6..92d2abc6b2 100644 --- a/docs/styles_architecture.md +++ b/docs/styles_architecture.md @@ -6,7 +6,7 @@ There are a few ways you can write CSS in this project: ### 1. Use [Tailwind](https://tailwindcss.com/) css classes directly within layouts and components -This is often the fastest way to add custom styles if you are familair with [Tailwind](https://tailwindcss.com/). See a good example in `/src/p5/p5.js-website/src/components/Footer/index.astro`. +This is often the fastest way to add custom styles if you are familiar with [Tailwind](https://tailwindcss.com/). See a good example in `/src/p5/p5.js-website/src/components/Footer/index.astro`. ### 2. Write styles in the [SCSS](https://sass-lang.com/) files in `/styles` and use those classes in layouts and components From 11f038f09399560a31df4f86001339f106f22164 Mon Sep 17 00:00:00 2001 From: H_vik <hritvik111@gmail.com> Date: Mon, 17 Mar 2025 20:43:46 +0530 Subject: [PATCH 5/7] fix: add trailing slashes to broken links for proper navigation --- src/components/Footer/index.astro | 24 +++++++++++------------ src/content/text-detail/en/about.mdx | 4 ++-- src/content/text-detail/es/about.mdx | 4 ++-- src/content/text-detail/hi/about.mdx | 4 ++-- src/content/text-detail/ko/about.mdx | 4 ++-- src/content/text-detail/zh-Hans/about.mdx | 4 ++-- src/layouts/AboutLayout.astro | 2 +- src/layouts/HomepageLayout.astro | 10 +++++----- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/components/Footer/index.astro b/src/components/Footer/index.astro index 3bb5f2b7f2..8cb5d3026b 100644 --- a/src/components/Footer/index.astro +++ b/src/components/Footer/index.astro @@ -26,25 +26,25 @@ const bannerEntry = await getEntry("banner", currentLocale); <div> <div class="mb-5" id="resources-footer-category">{t("Resources")}</div> <ul aria-labelledby="resources-footer-category"> - <li><a href="/reference">{t("Reference")}</a></li> - <li><a href="/tutorials">{t("Tutorials")}</a></li> - <li><a href="/examples">{t("Examples")}</a></li> - <li><a href="/contribute">{t("Contribute")}</a></li> - <li><a href="/community">{t("Community")}</a></li> - <li><a href="/about">{t("About")}</a></li> + <li><a href="/reference/">{t("Reference")}</a></li> + <li><a href="/tutorials/">{t("Tutorials")}</a></li> + <li><a href="/examples/">{t("Examples")}</a></li> + <li><a href="/contribute/">{t("Contribute")}</a></li> + <li><a href="/community/">{t("Community")}</a></li> + <li><a href="/about/">{t("About")}</a></li> <li><a href="https://editor.p5js.org">{t("Start Coding")}</a></li> - <li><a href="/donate">{t("Donate")}</a></li> + <li><a href="/donate/">{t("Donate")}</a></li> </ul> </div> <div class="lg:col-span-2 grid grid-cols-subgrid"> <div> <div class="mb-5" id="info-footer-category">{t("Information")}</div> <ul aria-labelledby="info-footer-category"> - <li><a href="/download">{t("Download")}</a></li> - <li><a href="/contact">{t("Contact")}</a></li> - <li><a href="/copyright">{t("Copyright")}</a></li> - <li><a href="/privacy-policy">{t("Privacy Policy")}</a></li> - <li><a href="/terms-of-use">{t("Terms of Use")}</a></li> + <li><a href="/download/">{t("Download")}</a></li> + <li><a href="/contact/">{t("Contact")}</a></li> + <li><a href="/copyright/">{t("Copyright")}</a></li> + <li><a href="/privacy-policy/">{t("Privacy Policy")}</a></li> + <li><a href="/terms-of-use/">{t("Terms of Use")}</a></li> </ul> </div> <div class="lg:col-start-2 mt-xl lg:mt-0"> diff --git a/src/content/text-detail/en/about.mdx b/src/content/text-detail/en/about.mdx index cbdb377a87..c6fc0afe50 100644 --- a/src/content/text-detail/en/about.mdx +++ b/src/content/text-detail/en/about.mdx @@ -36,6 +36,6 @@ Community values: </div> <div class='mt-xl'> -<LinkButton variant='link' url='/contribute/access'>Access Statement</LinkButton> -<LinkButton variant='link' url='/code-of-conduct'>Code of Conduct</LinkButton> +<LinkButton variant='link' url='/contribute/access/'>Access Statement</LinkButton> +<LinkButton variant='link' url='/code-of-conduct/'>Code of Conduct</LinkButton> </div> \ No newline at end of file diff --git a/src/content/text-detail/es/about.mdx b/src/content/text-detail/es/about.mdx index 3aaa0ab140..b818c0683c 100644 --- a/src/content/text-detail/es/about.mdx +++ b/src/content/text-detail/es/about.mdx @@ -29,6 +29,6 @@ Valores de la comunidad: </div> <div class='mt-xl'> -<LinkButton variant='link' url='/contribute/access'>Access Statement</LinkButton> -<LinkButton variant='link' url='/code-of-conduct'>Code of Conduct</LinkButton> +<LinkButton variant='link' url='/contribute/access/'>Access Statement</LinkButton> +<LinkButton variant='link' url='/code-of-conduct/'>Code of Conduct</LinkButton> </div> \ No newline at end of file diff --git a/src/content/text-detail/hi/about.mdx b/src/content/text-detail/hi/about.mdx index 30670c29d0..d77d5389c8 100644 --- a/src/content/text-detail/hi/about.mdx +++ b/src/content/text-detail/hi/about.mdx @@ -29,6 +29,6 @@ P5.js समुदाय प्रौद्योगिकी के साथ </div> <div class='mt-xl'> -<LinkButton variant='link' url='/contribute/access'>प्रवेश विवरण</LinkButton> -<LinkButton variant='link' url='/code-of-conduct'>आचार संहिता</LinkButton> +<LinkButton variant='link' url='/contribute/access/'>प्रवेश विवरण</LinkButton> +<LinkButton variant='link' url='/code-of-conduct/'>आचार संहिता</LinkButton> </div> \ No newline at end of file diff --git a/src/content/text-detail/ko/about.mdx b/src/content/text-detail/ko/about.mdx index 9067b787c1..a892a1ee40 100644 --- a/src/content/text-detail/ko/about.mdx +++ b/src/content/text-detail/ko/about.mdx @@ -29,6 +29,6 @@ p5.js 커뮤니티는 기술을 통해 예술과 디자인에 관련된 탐구 </div> <div class='mt-xl'> -<LinkButton variant='link' url='/contribute/access'>접근성 성명서</LinkButton> -<LinkButton variant='link' url='/code-of-conduct'>행동 강령</LinkButton> +<LinkButton variant='link' url='/contribute/access/'>접근성 성명서</LinkButton> +<LinkButton variant='link' url='/code-of-conduct/'>행동 강령</LinkButton> </div> \ No newline at end of file diff --git a/src/content/text-detail/zh-Hans/about.mdx b/src/content/text-detail/zh-Hans/about.mdx index 510a5eb0b6..b9ce49dd12 100644 --- a/src/content/text-detail/zh-Hans/about.mdx +++ b/src/content/text-detail/zh-Hans/about.mdx @@ -29,6 +29,6 @@ p5.js 鼓励通过迭代编码来实现创意表达。我们重视代码开源 </div> <div class='mt-xl'> -<LinkButton variant='link' url='/contribute/access'>可及性声明</LinkButton> -<LinkButton variant='link' url='/code-of-conduct'>行为规范</LinkButton> +<LinkButton variant='link' url='/contribute/access/'>可及性声明</LinkButton> +<LinkButton variant='link' url='/code-of-conduct/'>行为规范</LinkButton> </div> \ No newline at end of file diff --git a/src/layouts/AboutLayout.astro b/src/layouts/AboutLayout.astro index f097b5e48e..5f98c57f34 100644 --- a/src/layouts/AboutLayout.astro +++ b/src/layouts/AboutLayout.astro @@ -78,7 +78,7 @@ const displayedFeaturedPeople = sortedFeaturedPeople.slice(0, 6); )) } </ul> - <LinkButton variant="link" url="/people" class="mt-md min-w-[220px]" + <LinkButton variant="link" url="/people/" class="mt-md min-w-[220px]" >{t("All People")}</LinkButton > </section> diff --git a/src/layouts/HomepageLayout.astro b/src/layouts/HomepageLayout.astro index 14dff6ba3f..2c0e703b7d 100644 --- a/src/layouts/HomepageLayout.astro +++ b/src/layouts/HomepageLayout.astro @@ -41,7 +41,7 @@ setJumpToState(null); class="col-span-2 lg:col-span-3 order-1 grid grid-cols-subgrid content-start" > <h2 class="col-span-3">{data.referenceHeaderText}</h2> - <LinkButton class="col-span-1 w-full" variant="link" url="/reference" + <LinkButton class="col-span-1 w-full" variant="link" url="/reference/" >{t("Reference")}</LinkButton > </div> @@ -49,7 +49,7 @@ setJumpToState(null); class="col-span-2 lg:col-span-3 order-2 lg:order-4 grid grid-cols-subgrid content-start" > <h2 class="col-span-full">{data.examplesHeaderText}</h2> - <LinkButton class="col-span-1 w-full" variant="link" url="/examples" + <LinkButton class="col-span-1 w-full" variant="link" url="/examples/" >{t("Examples")}</LinkButton > </div> @@ -64,7 +64,7 @@ setJumpToState(null); <div class="content-grid-simple mb-xl"> <div class="col-span-2 lg:col-span-3 grid grid-cols-subgrid content-start"> <h2 class="col-span-3">{data.communityHeaderText}</h2> - <LinkButton class="col-span-1 w-full" variant="link" url="/community" + <LinkButton class="col-span-1 w-full" variant="link" url="/community/" >{t("Community")}</LinkButton > </div> @@ -84,7 +84,7 @@ setJumpToState(null); <div class="grid grid-cols-subgrid col-span-1 lg:col-span-2"> <h2 class="col-span-2">{t("Donate to p5.js")}</h2> <div class="col-span-1"> - <LinkButton class="w-full" variant="link" url="/donate" + <LinkButton class="w-full" variant="link" url="/donate/" >{t("Donate")}</LinkButton > </div> @@ -92,7 +92,7 @@ setJumpToState(null); <div class="grid grid-cols-subgrid col-span-1 lg:col-span-2"> <h2 class="col-span-2">{t("Download p5.js")}</h2> <div class="col-span-1"> - <LinkButton class="w-full" variant="link" url="/download" + <LinkButton class="w-full" variant="link" url="/download/" >{t("Download Library")}</LinkButton > </div> From d856e8c18cd1a2fd6ebe0037832986e9583e59a3 Mon Sep 17 00:00:00 2001 From: webermayank <111176033+webermayank@users.noreply.github.com> Date: Tue, 18 Mar 2025 01:32:59 +0530 Subject: [PATCH 6/7] Added scripts to clear parsers/in and parsers/out after build:reference --- src/scripts/parsers/reference.ts | 10 +++++++++- src/scripts/utils.ts | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/scripts/parsers/reference.ts b/src/scripts/parsers/reference.ts index d0c4472379..1395782e80 100644 --- a/src/scripts/parsers/reference.ts +++ b/src/scripts/parsers/reference.ts @@ -1,4 +1,4 @@ -import { cloneLibraryRepo, p5RepoUrl, readFile } from "../utils"; +import { cloneLibraryRepo,cleanUpDirectory, p5RepoUrl, readFile } from "../utils"; import fs from "fs/promises"; import { exec, execSync } from "child_process"; import path from "path"; @@ -13,6 +13,10 @@ const localPath = path.join(__dirname, "in", "p5.js"); const localSoundPath = path.join(__dirname, "in", "p5.sound.js"); const yuidocOutputPath = path.join(__dirname, "out") +//Directory to clean after cloning the libraries +const parsersInPath = path.join(__dirname, "in"); +const parsersOutPath = path.join(__dirname, "out"); + /** * Main function to clone the p5.js library and save the YUIDoc output to a file */ @@ -77,6 +81,10 @@ export const parseLibraryReference = ); await serveYuidocOutput('data'); + + //delete the cloned directories + await cleanUpDirectory(parsersInPath ); + await cleanUpDirectory(parsersOutPath ); return combined; }; diff --git a/src/scripts/utils.ts b/src/scripts/utils.ts index 1e022cf017..f6aebd25c0 100644 --- a/src/scripts/utils.ts +++ b/src/scripts/utils.ts @@ -304,3 +304,15 @@ export const rewriteRelativeMdLinks = (markdownText: string): string => { return `[${linkText}](${updatedUrl})`; }); }; +/** + * Deletes the contents of the given directory. + * @param dirPath Path to the directory to clean up. + */ +export const cleanUpDirectory = async (dirPath: string) => { + try { + await fs.rm(dirPath, { recursive: true, force: true }); + console.log(`Cleaned up directory: ${dirPath}`); + } catch (err) { + console.error(`Error cleaning up directory ${dirPath}: ${err}`); + } +}; From 18ef33a8ff96e676e065d5c978acd92d3e199783 Mon Sep 17 00:00:00 2001 From: kit <1304340+ksen0@users.noreply.github.com> Date: Tue, 18 Mar 2025 08:08:04 +0100 Subject: [PATCH 7/7] Add beta website deployment action (#733) * Update deploy.yml * Update and rename deploy.yml to staging_deploy.yml * Update staging_deploy.yml * Remove GitHub Actions step timeout * Update staging_deploy.yml * Update staging_deploy.yml * Update beta_deploy.yml * Update and rename staging_deploy.yml to beta_deploy.yml * Add files via upload --------- Co-authored-by: Kenneth Lim <hello@limzykenneth.com> --- .github/workflows/beta_deploy.yml | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/beta_deploy.yml diff --git a/.github/workflows/beta_deploy.yml b/.github/workflows/beta_deploy.yml new file mode 100644 index 0000000000..0c9decef88 --- /dev/null +++ b/.github/workflows/beta_deploy.yml @@ -0,0 +1,42 @@ +name: Deploy beta to Netlify + +on: + # Trigger the workflow every time you push to the `main` branch + # Using a different branch name? Replace `main` with your branch’s name + push: + branches: ["2.0"] + # Allows you to run this workflow manually from the Actions tab on GitHub. + workflow_dispatch: + +# Allow this job to clone the repo and create a page deployment +permissions: + contents: read + pages: write + id-token: write + +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + + - name: Checkout your repository using git + uses: actions/checkout@v4 + + - name: Install, build, and upload your site output + env: + NODE_OPTIONS: "--max_old_space_size=4096" + uses: withastro/action@v2 + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v3.0 + with: + publish-dir: './dist' + production-branch: main + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Deploy from GitHub Actions" + enable-pull-request-comment: false + enable-commit-comment: false + overwrites-pull-request-comment: false + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}