blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Scaffolding for Third Party Plugins

Open alschmiedt opened this issue 4 years ago • 2 comments

Category

Component gh-pages

Is your feature request related to a problem? Please describe. We need a place to showcase third party plugins. We currently use gh-pages to display our plugins and examples. We would like to use this same site to display third party plugins.

Describe the solution you'd like For a third party plugin just display the README page and add links to the github repository and npm page under "View code" and "View on npm". We should also display a banner or something on this page saying that it is a third party plugin.

Describe alternatives you've considered

  • Add an "Explore plugins" page on the developer guides.
  • Add an example that uses each plugin. This would be nice, but requires more maintenance on our part.

Additional context

alschmiedt avatar Jun 22 '21 22:06 alschmiedt

Additional information:

  • We use Jekyll to make our githb pages content look good
  • Jekyll layouts determine what a page looks like
  • 'layout' sections in _config.yml set which layout is used for each page
  • We currently use a layout named default for examples and plugins
  • Layouts grab information from a page object and can use the information in the page (for example, to add an npm link to the correct package)
  • This object is called "front matter" in Jekyll documentation
  • For our examples and plugins we generate front matter during predeploy, in addition to running builds and copying files to the correct directories
    • Those end up in the examples and plugins folders that you can see if you switch to the gh-pages branch
    • For instance, here's the index page for the block-test plugin before processing by Jekyll

With all this, I think the steps are:

  • Put another folder in the gh-pages directory, named something like third-party-plugins
  • Add one page per third-party plugin that we want to showcase
    • Either manually added per third-party plugin, or generated from some data file. Manually added would be sufficient until we get enough that it's cumbersome.
  • Add a layout that has links and the readme, but not the playground
  • Add a mapping in _config.yml to set the layout correctly
  • Add links from gh-pages/index.md

rachel-fenichel avatar Jun 23 '21 00:06 rachel-fenichel

Note that this is for making it a nice page per third party plugin. A stopgap is to put a link directly in gh-pages/index.md to the correct npm page, and that's a one-liner.

rachel-fenichel avatar Jun 23 '21 00:06 rachel-fenichel