-
Notifications
You must be signed in to change notification settings - Fork 17
Fixed inline code samples being excluded during MSLearn doc gen #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… when `[ToolkitSample(somevalue)]` is instead of `[ToolkitSample(id: somevalue)]`
|
@Arlodotexe it'd be good to document this a bit more while we're here. It only works if you run from the components folder, maybe we should make it more robust so that it can run from the tooling and repo root as well? One trick I did this time too was clone the MicrosoftDocs/CommunityToolkit repo and run the command like: I:\code\WindowsToolkit\components>powershell ..\tooling\Build-Toolkit-Docs.ps1 -OutputDir ..\..\CommunityToolkitDocs\docs\windowsSo it'd directly update the docs in a branch I can submit for PR. In the line 101 if for skipping when no samples, I added an output as well:
That helped me understand that it was seeing the components from wherever I ran it, but then wasn't finding the proper relative path. |
|
I need to regenerate without Labs components, I did notice we have the intro section which I think is just here and not in our main repo. Also, we have a couple of extra links (to labs and the gallery). So it'd be good to think of in the future ways to weave those in for automation. I'm seeing the short-links for the code samples now: But I'm trying to remember how that pathing works, as we don't have a copy of the code in this repo. Though I do see that working for things like Triggers today: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/windows/triggers/ Ah, it's defined here: https://github.com/MicrosoftDocs/CommunityToolkit/blob/12b54cfcf1f476d1e8b44750fcade525a4da7d28/.openpublishing.publish.config.json#L30-L36 We should have a comment about how this works and point this out. As if other toolkits want to do this, then we need to have new entries there |
|
Future thought: It'd be hard, but maybe easier with Uno, is if we could get snapshots of the samples running (first frame) and save out a png which we could then have above each sample code section, as the docs are all just blocks of text right now. Could be good to insert headers above them too for some visual separation and linking |
The |
|
It looks like the WIP check is stuck here? |

Fixed an issue where inline mslearn code samples weren't generated when
[ToolkitSample(somevalue)]is used instead of[ToolkitSample(id: somevalue)]Closes #276