Move the pointer to the left of the page, so the small cross shows up. Click and add a Live Code View widget.
If you hit Create at this point, the Live Code View is created but it displays a message about the token being not found.
It doesn't matter.
Switch to your favorite IDE.
Locate the code block you want to embed in your note and paste the token into a comment.
Save the file.
Back to CodeStory, the Live Code View should now be connected!
If it's not, check that your code sources are properly configured. You should check that the file:
- has an extension that's one the supported file types,
- has a path that belongs to a defined source,
- is not excluded by glob and specific exclusions.
Use the inspector to adjust the number of lines that should be displayed.
Doing so also automatically confirms the Live Code View.
New in CodeStory 2021.1 : Check out Smart contexts.
Here is an example of what the final note could look like. As you can see, no need to be verbose!