- Copy
.env.example
to.env
and addDB_*
settings. composer install
to fetch PHP dependenciesnpm install
to fetch JS dependenciesphp artisan migrate
to populate database tablesphp artisan storage:link
to linkpublic/storage
tostorage/app/public
php artisan key:generate
to add a key to your.env
file
npm run dev
This will start a local server on http://localhost:3000/ .
It will also start a php artisan course:watch
process that watches for changes to courses.
When changes are detected, it runs php artisan course:load
before notifying browsersync to reload the browser.
npm run prod
Add your course folder under storage/app/courses
, then run
php artisan courses:load
This will import/update all courses.
A course consists of
{course-name}
: Course contents{course-name}/course.json
: Header, footer, list of modules{course-name}/modules/{module-name}.md
: Course module as Markdown{course-name}/exercises/{exercise-name}.json
: Exercise as JSON{course-name}/resources/{resource-name}.(jpg|png|...)
: Images
TODO
TODO
TODO
To embed a YouTube video with identifier AL0ecpu86Gk
:
<youtube-video id="AL0ecpu86Gk"></youtube-video>
The player will resize to fit the width of the module and default to aspect ratio 16:9
.
For other aspect ratios, you can set the aspect-ratio
argument to the height divided by the width.
For instance, for a 4:3
video, set aspect-ratio
to 3 / 4 = 0.75
:
<youtube-video id="AL0ecpu86Gk" :aspect-ratio="0.75"></youtube-video>
TODO: Markdown syntax?