A template repo for authoring kslides presentation.
To create a kslides presentation, generate a new repository using this repo as a template.
All changes to this template are documented in the CHANGELOG.md file. Check back occasionally for any changes that should to be incorporated into your kslides repo.
Open your newly created kslides repo with IntelliJ and edit
the src/main/kotlin/Slides.kt
file. The kslides repo
README.md
describes the various kslides blocks.
Presentations served by HTTP load static content from /src/main/resources/public
, whereas
filesystem presentations load static content from /docs
.
Make sure to run ./gradlew clean build
after making changes to /src/main/resources/public
.
- Go to your kslides content repo on GitHub
- Click on Settings -> Pages
- Under Source, choose the master branch and the /docs folder and click on Save
- Open the src/main/kotlin/Slides.kt file
- Ensure the output{} block contains:
enableFileSystem = true
- Click on the green arrow next to the
fun main()
declaration to run the program and generate the html content in the /docs folder - Add the newly generated html files in the
/docs
folder to git - Commit and push the changes to GitHub
- Wait a minute or so and your slides will be available at https://username.github.io/repo_name/
- Create an account on Netlify
- Click on Add a new site -> Import and existing project
- Click on the GitHub button and select your slides repo
- Go to your Netlify dashboard and click on the newly added repo.
- To edit your Netlify subdomain name, click on the Domain settings button and then click on the Options button
- Your repo already has a netlify.toml file that will instruct Netlify to use your
/docs
folder as an html source - Open the src/main/kotlin/Slides.ht file
- Insure
enableFileSystem = true
is set in the output{} block - Click on the green arrow next to the
fun main()
declaration to run the program and generate the html content in the /docs folder - Add the newly generated html files in the
/docs
folder to git - Commit and push the changes to GitHub
- Wait a minute or so and your slides will be available at https://site-name/netlify.app/
- Create an account on Heroku
- Install the Heroku CLI
- Open the src/main/kotlin/Slides.ht file
- Ensure the output{} block contains:
enableHttp = true
- Create a new Heroku app with:
heroku create slideshow_name
- Commit and push the changes to Heroku with:
git push heroku master
- Open the app in a browser with:
heroku open
The build.gradle
file uses these repositories:
repositories {
google()
mavenCentral()
maven { url = 'https://repo.kotlin.link' }
maven { url = 'https://jitpack.io' }
}
and has these dependencies:
dependencies {
implementation "com.github.kslides.kslides:kslides-core:$kslides_version"
implementation "io.ktor:ktor-server-html-builder:$ktor_version"
implementation "org.jetbrains.kotlin-wrappers:kotlin-css:$css_version"
implementation "com.github.pambrose:srcref:$srcref_version"
implementation "space.kscience:plotlykt-core:$plotly_version"
}