Example course
The courses layout supports the full range of markdown elements/blocks as demonstrated in the example post.
You can also add assessments as follows:
Adding courses
Adding courses involves the following:
- Add a new directory to
/src/site/content/en/learn. - Add an index.md file. You can copy this one from
src/site/content/en/handbook/content-types/example-course/index.mdas a starting point. - Add a data file named using the following convention:
{dir_name}.11tydata.js. - Use the
course11tydatautil to generate the required data. You can use the following file as a starting pointsrc/site/content/en/handbook/content-types/example-course/example-course.11tydata.js. - Create a new directory under
src/site/_data/coursesusing the name passed to thecourse11tydatautil. - Add two files,
meta.ymlandtoc.yml. - Add course sections as subdirectories.
- Add the section urls to
toc.ymland the sidebar will be generated automatically.
Here's what you'll learn:
这篇文档对你有帮助吗?
谢谢你的反馈!