learndesk
v1.0.4
Published
A learning platform engine — build course websites with HTML, Tailwind CSS, and Eleventy
Downloads
709
Maintainers
Readme
learndesk
A learning platform engine — build beautiful, interactive course websites with HTML, Tailwind CSS, and Eleventy.
Usage
For Course Authors
- Create a new repo and add the framework:
npm init -y
npm install learndesk @11ty/eleventy- Create a minimal
.eleventy.js:
module.exports = function(eleventyConfig) {
return require('learndesk')(eleventyConfig);
};- Create your course structure:
my-course/
├── .eleventy.js
├── package.json
└── src/
├── _data/
│ └── site.json # Course metadata
├── index.njk # Homepage (use {% include "components/home.njk" %} for default)
├── module-1/
│ ├── index.md # Module content
│ └── module-1.11tydata.json # Quiz data (optional)
└── module-2/
└── ...- Configure
src/_data/site.json:
{
"name": "Your Course Name",
"description": "Course description",
"author": "Your Name",
"repository": "https://github.com/you/your-course",
"themeColor": "#3399dd",
"logo": "/assets/img/learndesk-logo.png",
"modules": [
{
"name": "Module Title",
"slug": "module-1",
"description": "Module description",
"topics": ["Topic 1", "Topic 2"],
"expectedTimeForCompletion": "45 minutes",
"tags": ["beginner", "topic"]
}
]
}- Run:
npx eleventy --serveUpdating
When the framework releases a new version:
npm update learndeskThat's it. No manual copying, no git pulls.
Overriding Framework Templates
The framework provides default templates for the homepage, header, footer, and sidebar. To customize any of these, create a file with the same name in your src/_includes/ directory. The Nunjucks loader checks your course's _includes/ first, then falls back to the framework's.
For example, to customize the footer, create src/_includes/footer.njk in your course.
Development
Clone this repo and run the demo course:
npm install
cd demo && npm install && cd ..
npm run devThe demo is a fully functional course you can use as a reference.
Publishing a New Version
npm version patch # or minor / major
npm publish
git push --tagsThen courses can update with npm update @learndesk.
Release Workflow
- Make UI/UX changes in the framework
- Test with the demo:
npm run build - Bump version:
npm version patch - Publish:
npm publish - Push:
git push --tags origin main - All courses update with
npm update @learndesks
License
MIT
