Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Conversation

@Potherca
Copy link
Contributor

@Potherca Potherca commented Aug 23, 2024

This MR add logic to extract all JS and HTML code blocks from the docs, so they can be saved to individual files.

An HTML file with some styling and logic has also been added to run the extracted examples.

To show output, console.log has been hijacked to render HTML.

As most examples do not show their result, the examples do not always show output.

Which examples should not be shown, can be decided by removing them from the menu in the HTML.

The result can be seen in action at https://contrib.pother.ca/MetroJS/examples/

At this point there are some errors because:

  • a variable is undefined (url, client, myClientId, or response),
  • the examples contain a syntax error
  • Missing CORS headers at example.com

These can be addressed in future MRs.

@Potherca Potherca force-pushed the docs/runable-examples branch from 8dee544 to 77f4586 Compare August 24, 2024 07:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant