Skip to content

Sharing a Lesson as a Webpage

Sean Kross edited this page Jun 3, 2016 · 4 revisions

ATTENTION!

This documentation is deprecated. For the latest version of the swirlify documentation please visit: http://swirlstats.com/swirlify

Students commonly want to be able to reference swirl lessons they've already taken without needing to interactively go through the lesson. The lesson_to_html() function will convert whatever lesson you're working on into a single HTML file that you can share. This code snippet will walk you through:

# Maybe you're already working on a lesson. You can check!
get_current_lesson()

# Or you can interactively set the lesson.yaml you want to share with:
set_lesson()

# Now we can create the HTML file:
lesson_to_html()

The HTML file will appear in the directory that contains the course that this lesson belongs to as [lesson name].html. Now you can put this HTML file online and share your lesson with the world! Here's a list of our favorite websites that host HTML for free: