Skip to content

Update Examples generation script to use up-to-date version #4106

@ksen0

Description

@ksen0

Increasing Access

The editor makes getting started easier by surfacing examples from the main dropdown menu:

Image

Feature enhancement details

Currently, the examples in https://editor.p5js.org/p5/sketches are built from the archive site. Instead, they should match the examples on https://p5js.org/, and include the updated attribution block as it appears on the website. (https://github.com/processing/p5.js-website/tree/main/src/content/examples or https://p5js.org/examples/)

Addressing this would include:

  • Updating the script
    'https://api.github.com/repos/processing/p5.js-website-legacy/contents/src/data/examples/en',
    to fetch from the accurate repository
  • Optionally, if it makes more sense, add a PR to p5.js-website that introduces a machine readable json version of the examples. For example, the p5.js-website provides https://p5js.org/reference/data.json - so a new machine readable resource could be added as "https://p5js.org/examples/data.json"
  • In any case: the updated script should use the version of the example that corresponds to the current main site. This way, when we switch to p5.js v2, it is easy to update the examples to match all the v2 updates

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardEnhancementImprovement to an existing featureOn HoldWork on this issue is paused for nowp5v2 switch: recommendedThis would be very valuable to complete before p5v2 becomes default, but is not a strict requirement

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions