Irev-Dev / cadhub

We're out to raise awareness and put CodeCAD on the map. The success of CadHub can be measured by the amount it promotes the use of CodeCAD within the mechanical/manufacturing industry and the strength the CadHub community.
https://cadhub.xyz
GNU General Public License v3.0
319 stars 60 forks source link

Back-links from live demos to documentation #613

Open drf5n opened 2 years ago

drf5n commented 2 years ago

It might be nice to add links to the demos on CadHub, like https://cadhub.xyz/u/irevdev/round-anything-demo/ide back to the documention it is aimed at, such as https://learn.cadhub.xyz/docs/round-anything/api-reference#polyround

If the doc https://learn.cadhub.xyz/docs/round-anything/api-reference#polyround links into the hub with https://cadhub.xyz/dev-ide/openscad#fetch_text_v1=https%3A%2F%2Fraw.githubusercontent.com%2FIrev-Dev%2FRound-Anything%2Fmaster%2Fexamples%2Fpolyround.scad , then the code shown in the IDE should back link to the documentation like

// polyRound example for https://learn.cadhub.xyz/docs/round-anything/api-reference#polyround

include <Round-Anything-1.0.4/polyround.scad>

radiiPoints=[
    [-4, 0,  1   ],
    [5,  3,  1.5 ],
    [0,  7,  0.1 ],
    [8,  7,  10  ],
    [20, 20, 0.8 ],
    [10, 0,  10  ]
];
linear_extrude(3)polygon(polyRound(radiiPoints,30));

Then someone who had followed the deep link into the code and may cut and paste the text into their own project, can follow it back to the documentation. The demo code can provide its own context to help advertise the project, rather than being a browsing cul-de-sac that doesn't lead deeper into the project.

Certainly, the end users could click up though the header to docs and drill back down to the specific concept being documented, but the direct lateral link directly from the demos to deep into the specific part of the documentation provides a lot more information-value-per-click and use the demos keep the eyes of the users on the project.


Edit: I see the code is at https://github.com/Irev-Dev/Round-Anything/blob/master/examples/polyround.scad

What I'm asking is that https://github.com/Irev-Dev/Round-Anything/blob/master/examples/polyround.scad would have a link to https://learn.cadhub.xyz/docs/round-anything/api-reference#polyround in its comment.