source-academy/modules

[CSG]: expose sample snippets in module documentation

Closed this issue · 1 comments

Feature

The module documentation in
https://source-academy.github.io/modules/documentation/modules/csg.html
should include sample snippets.

It is currently bare.

The live deployment of modules documentation is currently impacted by bug #221. This causes the summaries written for all the modules to not be present:

https://source-academy.github.io/modules/documentation/modules/curve.html

image

Lee Yi sent me a screenshot on Telegram early this morning that I believe depicts a working fix:

image

Currently, I have also just finished revamping the CSG functions file, which includes a rewrite of its documentation and summary. Although, there is only one (newly written) introductory example snippet in the summary itself. I have split up the current samples.md in master and added a fair few more snippets, each in their own JS file in the CSG bundles folder.

Perhaps I could add a GitHub link to this folder in the module summary, as adding some or all of the snippets to the summary itself would make it extremely long, pushing down the list of variables and functions on the documentation page.

I expect to write up a PR soon. Once the PR as well as the aforementioned documentation bug have been addressed, they should resolve this issue.