How to set html css tutorial ; want to disply HTMl file in preview tab #431
Describe the bugI want to create CSS tutorials and added
but in preview tab it keep loading the default template which have Viteand everytim when I refresh i fo npm install so my questions are
Link to a StackBlitz project which shows the errorNo response Steps to reproduce
Expected behaviorIn preview tab ; it must show my HTML file and do not install on every refresh here is the repo link : https://github.com/xkeshav/tutorial-kit Screenshotsthis is how it looks when loadedpage load Platform
Additional contextNo response |
Replies: 3 comments 6 replies
|
Hey @xkeshav,
In the template you'll need to create a Node project that serves the html file. In
On page refresh you need to run these commands in order to have dependencies installed and server running. However you don't need to refresh page when moving between tutorial's lessons.
It's mentioned here on the documentation: https://tutorialkit.dev/reference/configuration/#focus Have you checked https://demo.tutorialkit.dev? Its sources are available at https://github.com/stackblitz/tutorialkit/tree/main/docs/demo. You could use those as reference. |
|
Thanks. this works great. followup questions. here is forked stackblitz link
|
|
Thank you very much for helping me quickly. for eg. / src/content/tutorial/meta.md---
type: tutorial
template: basic-html
mainCommand: ['npm run start', 'Starting http server']
prepareCommands:
- ['npm install', 'Installing dependencies']
---
<h1>Welcome to Popover Tutorial</h1>or in /src/content/tutorial/basics/meta.md |


_filesor_solutionare used by default.It will be visible if you don't provide
_files/index.html. Template files are used by default,_filesoverwrite them._solutionis used when Solve-button is clicked.