Skip to content

About

A ready-to-use template to create a Docsify Markdown-based open course website. Global navigation elements can be hidden for seamlessly embedding pages (i.e. into an LMS). Includes an optional "Edit this Page" link.

Topics

Resources

Code of conduct

Stars

50 stars

Watchers

4 watching

Forks

Latest commit

 

History

865 Commits

Folders and files

Repository files navigation

Docsify Open Course Starter Kit

Docsify MIT license

Docsify Discord Chat

This is a starter kit to quickly create a Markdown-based open course site with the site generator Docsify (v5 Preview). Global navigation elements can be hidden for seamlessly embedding pages (i.e., into an LMS). Includes an optional "Edit this Page" link.

Rather skip GitHub Pages? The same kind of site works with Docsify-This, straight from your Markdown files in any public repo – start from its Course Site template. Choose this kit when you want your own web address and full control of styling; a site started with Docsify-This moves to it as it is.

Want your own weeks and dates first? The Docsify Site Creator lays out a new course with your own weeks, dates and LMS links, shows it live as you go, and downloads it as this kit, with your pages in its docs/ folder.

Docsify sites draw their pages in the browser, with page addresses after a #, so search engines like Google, Bing, or DuckDuckGo index little more than the home page.

📸 Docsify Open Course Screenshots

Course home page with What's Happening This Week, reminders and Looking Ahead to Next Week, beside the course sidebar with LMS links Course Welcome page with a banner image and links to get started
Schedule page listing each week's topic, readings and due dates Topics page with an A–Z index of the course's topics

Docsify Open Course Starter Kit – the course home and Course Welcome (top), and the Schedule and Topics pages (bottom). Explore a demo at hibbitts-design.github.io/demo-docsify-open-course-starter-kit/

🗂 Variations

Each variation is built on this kit and is a template of its own – open its demo to see it, or start your own site from its template, as in the Quickstart below:

  • Dark – a dark theme · Demo · Template
  • Dark Mode Auto – light or dark, following the reader's system setting · Demo · Template
  • SFU styling – an institution's look, with its font and colours, to match its LMS · Demo · Template
  • SFU styling, dark – the same look in a dark theme · Demo · Template

🚀 GitHub Pages Quickstart

Pre-flight Checklist

  1. GitHub account

Installation and Deployment

  1. Sign in to GitHub if you have not already done so

  2. Tap Use this template on the source repository (upper-right green button) and then choose Create a new repository  Docsify Open Course Starter Kit - Install Page 1

  3. Choose the name for your new repository to contain the copied site files and then tap Create repository from template  Docsify Open Course Starter Kit - Install Page 2

  4. Go to Settings of your newly created repository, tap the Pages tab (on the left-hand side), choose main branch, then docs folder and finally tap the Save button (see more details in the Docsify documentation)  Docsify Open Course Starter Kit - Install Page 3

  5. And you're done! (view your new site using the provided URL on the Pages tab - it can take up to 10 minutes for your site to be initially available)  Docsify Open Course Starter Kit - Install Page 4

Do you use GitLab? You can also use Docsify with GitLab Pages!

✏️ Editing Your Docsify Site Pages on GitHub

  1. Go to the Docsify Markdown (.md) page in the docs folder of your repository you want to edit  Editing Your Docsify Site Pages 1

  2. Tap the Pencil Icon (top left-hand toolbar area) to start the editor  Editing Your Docsify Site Pages 2

  3. Scroll down to the bottom of the page and tap the Commit changes button to save your changes  Editing Your Docsify Site Pages 3

Learn more about creating pages in Docsify.

🔗 Activating the “Edit this Page” Link on Your Docsify Site

  1. At the top-level of your GitHub Repository copy the URL  Docsify Open Course Starter Kit - “Edit this Page” Link 1

  2. Tap on the docs folder  Docsify Open Course Starter Kit - “Edit this Page” Link 2

  3. Tap on the index.html file  Docsify Open Course Starter Kit - “Edit this Page” Link 3

  4. Tap the Pencil Icon (top left-hand toolbar area) to start the editor  Docsify Open Course Starter Kit - “Edit this Page” Link 4

  5. Find the line var gitLinkRepoURL = ''; and enter the URL of your own GitHub Repository between the two quotes (replace github.com with github.dev to use the GitHub.dev web-based editor currently in Beta) and then scroll down to the bottom of the page and tap the Commit changes button to save your changes  Docsify Open Course Starter Kit - “Edit this Page” Link 5

To remove the “Edit this Page” link on your Docsify site, restore the value of gitLinkRepoURL to ''.

💻 Locally Editing Your Docsify Site Pages

Editing Your Docsify Site Pages on Your Desktop

  1. Tap Code on your repository (upper-right green button)
  2. Choose Open Desktop and follow the prompts, installing GitHub Desktop if not already present
  3. You will now be able to edit your Docsify site (in the docs folder) using the desktop editor of your choice (e.g. Atom)
  4. Use GitHub Desktop to push any changes to your repository.

Learn more about using GitHub Desktop.

You can also clone (i.e download) a copy of your repository to your computer and run Docsify locally to preview your site. See the below video for details.

🧩 Embedding your Docsify Page Content into Other Systems

 Docsify Open Course Page Embedded into the Canvas LMS Figure 2. Docsify Open Course Page Embedded into the Canvas LMS. Explore an example Canvas LMS course using Docsify Open Course pages for content at https://canvas.sfu.ca/courses/44038/

The optional embedded (all lowercase) URL parameter hides a site’s sidebar for seamlessly embedding Docsify page content within another platform such as Canvas LMS, Moodle, Microsoft Teams or being displayed in an existing or new Browser tab. The parameter standalone is supported as an alias for embedded.

To only display Docsify page content, add the following to a Docsify page URL:

?embedded=true

Example standard Docsify page:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources

Example Docsify page displaying only page content (i.e., no sidebar is shown):
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true

To optionally show a page Table of Contents (based on included Headers), use the following:

?embedded=true&toc=true

Example Docsify page displaying only page content:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true

Example Docsify page displaying only page content with a page Table of Contents included:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true&toc=true

To optionally override the hiding of the navbar when displaying only page content, use the following:

?embedded=true&navbar=true

Example Docsify page displaying only page content:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true

Example Docsify page displaying only page content with the navbar still displayed:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true&navbar=true

To optionally hide the 'Edit this Page' link, use the following:

?embedded=true&hidegitlink=true

Example Docsify page displaying only page content:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true

Example Docsify page displaying only page content with the 'Edit this Page' link hidden:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true&hidegitlink=true

To optionally show the footer ('_footer.md' file), use the following:

?embedded=true&footer=true

Example Docsify page without footer:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true

Example Docsify page with footer shown:
https://hibbitts-design.github.io/demo-docsify-open-course-starter-kit/#/resources?embedded=true&footer=true

🖼 Presenting your Docsify Page Content as Standalone Webpages

In addition to using URL parameters when embedding Docsify page content into other systems, it is possible to permanently display all pages as standalone, and to also always display a page Table of Contents.

To Display all Pages as Standalone

  1. Open the index.html file for editing.
  2. Locate the line var standalone = false; and change it to var standalone = true;.
  3. Save the index.html file and reload site.

To Display Page Table of Contents

  1. Open the index.html file for editing.
  2. Locate the line var ToC = false; and change it to var showToC = true;.
  3. Save the index.html file and reload site.

Please note a page must have a series of Headings (#, ##, ###) for the Table of Contents to be displayed correctly.

❛❜ Setting the Name of your Docsify Site

  1. Open the index.html file for editing.
  2. Locate the line <title>Docsify Open Course Starter Kit</title> and change the text between the title tags to be displayed as the site name on the Browser tab
  3. Locate the line name: 'Docsify Open Course Starter Kit', and change the text between the quotes to be displayed as the site name at the top of the Docsify Sidebar
  4. Save the index.html file and reload site.

🎨 Sidebar Icons

Sidebar icons are loaded from Iconify, so their color can be changed by editing the color value in each icon URL within _sidebar.md (e.g. color=%23808080, where %23 is the # character).

Local copies of the default icons are also included in the docs/assets/icons folder as a backup, such as when Iconify is unavailable or the site needs to work offline. To use them, replace an icon URL with its local path, e.g. assets/icons/calendar.svg.

⚠️ Troubleshooting

Site not displaying on GitHub Pages
The most likely cause of not seeing your Docsify site on GitHub Pages is that the 'docs' folder is not selected as the source folder. Go to Settings of your repository, tap the Pages tab (on the left-hand side), choose main branch, then docs folder and finally tap the Save button.

🛠 Using an LMS to Host a Docsify Open Course Site

As Docsify Open Course Starter Kit does not require a web server, it can actually be hosted on many LMSs that support file libraries such as Canvas and Moodle.

For example, here is a Docsify Open Course Site hosted within a Canvas course. Single Docsify Open Course site pages can also be embedded while hosted on the same system.

Hosting a Docsify Open Course Site on your LMS

  1. Tap Download on your repository page
  2. Upload to your LMS file storage area, and unzip the upload file
  3. Based on your LMS, determine the external URL required to load the index.html file within the Docsify Docs folder. In Canvas, an example URL would look similar to https://canvas.sfu.ca/courses/44038/files/15884796/download.
⚠️ Once hosted within your LMS, changes made to the source GitHub repository are no longer automatically reflected on your hosted Docsify site. Any GitHub repository updates must be manually uploaded to the LMS file library area.

📚 Docsify and Markdown Resources

Docsify
Docsify Documentation
Docsify Basics by MichaelCurrin

Markdown
Markdown Here Cheatsheet
Markdown Guide

Drafting with help from a generative AI tool? Markdown is the plain text these tools already use, so a draft drops straight in and stays easy to edit by hand. Ask it to reply in Markdown, then assess and modify as required before adding it to a page's .md file in the docs folder.

💡 Content Display Tips and Techniques

Including Code Blocks
Using Prismjs code blocks with syntax highlighting is supported for the languages included with Docsify and as well Bash, Go, Java, Kotlin, PHP, Python and Swift. To embed a code block use the Markdown standard of triple backticks and start the block with the name of the language, for example to embed a block of Javascript code with syntax highlight the following would be used:

```javascript
function test() {
  console.log("Hello world!");
}
```

Which would then appear as:

function test() {
  console.log("Hello world!");
}

Displaying Images in a Grid
3 or more images can be transformed into a responsive grid gallery by including them in lists. For example:

- ![image1](path/to/image1.jpg)
- ![image2](path/to/image2.jpg)
- ![image3](path/to/image3.jpg)

Continue Where You Left Off Link
To show returning students a Continue where you left off link on a course's home page, to the last Sidebar page they read (kept only in their own browser), uncomment the Keep My Place line in docs/index.html. It goes right above the This Week box (announcement) – without one, below the page's heading.

Previous/Next Bar on Phones
To keep Previous/Next in a bar at the bottom of the screen on phones, as in a guide, add class="sticky-pagination" to the <html> tag in docs/index.html.

🧰 Useful Markdown CSS Classes

accordion

<div class="accordion">

<details>
  <summary>Topic One</summary>
  
  Topic one details here.
  
</details>

<details>
  <summary>Topic Two</summary>
  
  Topic two details here.
  
</details>

</div>

announcement
When the Docsify v5 theme is enabled, to style Blockquotes similarly to the default Docsify-This style.

<blockquote class="announcement">
  <h2>What’s Happening This Week</h2>
  <h3>How to explore the problem space?</h3>
  <h4>Important Reminders</h4>
  <ul>
    <li><a href="#">Journey Map</a> assignment <span class='badge'> Tue Jun 12th 11:59pm PDT</span></li>
    <li><a href="#">Course Reflection Log</a> assignment <span class='badge'> Fri Aug 3rd 11:59pm PDT</span></li>
  </ul>

  <h4>Required Reading</h4>
  <ul>
    <li>
      <a href="https://www.smashingmagazine.com/2014/10/the-skeptics-guide-to-low-fidelity-prototyping/">
        The Skeptic’s Guide To Low-Fidelity Prototyping
      </a>
    </li>
  </ul>

  <p>
    <a href="https://canvas.sfu.ca/courses/44038/quizzes/166553" class="button primary">
      Required Reading Quiz due Jun 4th
    </a>
  </p>
</blockquote>

badge

<span class='badge'> Tue Jun 12th 11:59pm PDT</span>
<span class='badge' style='--badge-bg-color: #0164db;'> Tue Jun 12th 11:59pm PDT</span>
<span class='badge' style='--badge-bg-color: #e7c500; --badge-text-color: #000;'> Tue Jun 12th 11:59pm PDT</span>
<span class='badge'> [Tue May 16 2:30pm PT](https://www.timeanddate.com/worldclock/fixedtime.html?msg=CMPT-363+Blackboard+Mini-lectures+and+Activities&iso=20220516T1430&p1=256&ah=1&am=50)</span>  

banner-image (cropped to height of 250px on large screens, 125px on small screens)

![UX - User Experience](images/12650723674_d5c85af332_k.jpg ':class=banner-image')

banner-tall-image (cropped to height of 350px on large screens, 175px on small screens)

![UX - User Experience](images/12650723674_d5c85af332_k.jpg ':class=banner-tall-image')

button

[Required Reading Quiz due Jun 4th](https://canvas.sfu.ca/courses/44038/quizzes/166553 ':class=button')

button-rounded

[Required Reading Quiz due Jun 4th](https://canvas.sfu.ca/courses/44038/quizzes/166553 ':class=button-rounded')

button-secondary

[Required Reading Quiz due Jun 4th](https://canvas.sfu.ca/courses/44038/quizzes/166553 ':class=button-secondary')

button-rounded-secondary

[Required Reading Quiz due Jun 4th](https://canvas.sfu.ca/courses/44038/quizzes/166553 ':class=button-rounded-secondary')

card

<div class="card">

  ## [Card Title](#)
  ![Card Image](images/example.jpg)
  Card content goes here.

</div>

card-list

<div class="card-list">
 <div class="card">

 ## [Blog Post Title Link](#)
 ![Blog Post Image](images/mountain.jpg)

 Blog post preview text goes here with more details about the content.  

 Jan 1, 1970. 

 [Read More](# ":class=navpill")

 </div>
 <div class="card">

 ## [Another Blog Post](#)
 ![Blog Post Image](images/forest.jpg)

 Another blog post preview with different content.  

 Jan 1, 1970. 

 [Read More](# ":class=navpill")
    
 </div>
</div>

card-list-guides / card-list-courses / card-list-sections (three cards in a row, for a list of guides, a list of courses or a guide's sections; for just two cards, use card-list)

<div class="card-list-guides">
 <div class="card">

 ![First Guide](images/example.jpg)

 ## [First Guide](#)

 A short guide to getting started.

 </div>
 <div class="card">

 ![Second Guide](images/example.jpg)

 ## [Second Guide](#)

 Another guide.

 </div>
 <div class="card">

 ![Third Guide](images/example.jpg)

 ## [Third Guide](#)

 One more guide.

 </div>
</div>

card-list-rows (one card per row, for cards without images, such as a guide's sections)

<div class="card-list-rows">
 <div class="card">

 ## [First Section](#)

 A short description of this section.

 </div>
 <div class="card">

 ## [Second Section](#)

 </div>
</div>

card-lines-2 / card-lines-3 (add to any card list to trim each card's text to two or three lines)

<div class="card-list card-lines-2">
 <div class="card">

 ![First Guide](images/example.jpg)

 ## [First Guide](#)

 A short guide to getting started.

 </div>
 <div class="card">

 ![Second Guide](images/example.jpg)

 ## [Second Guide](#)

 A longer description, trimmed to two lines so the cards stay a similar size.

 </div>
</div>

card-rounded

<div class="card-rounded">

  ## [Card Title](#)
  ![Card Image](images/example.jpg)
  Card content goes here.

</div>

embedly-card (for linked article previews, embedded slides/videos, etc.)

<a class="embedly-card" data-card-theme="light" data-card-controls="0" data-card-align="left" href="https://blog.prototypr.io/defining-usability-e7bf42e8abd0">Defining usability</a>

header-image-fade (suggested width of 1200px to 2000px)

![Photo of Mountain](images/mountain.jpg ':class=header-image-fade')

header-image-fade-full-width (suggested size of 1200px to 2000px, and display of Table of Contents is not available)

![Photo of Mountain](images/mountain.jpg ':class=header-image-fade-full-width')

header-image-full-width (suggested size of 1200px to 2000px width and 400px to 600px height, and display of Table of Contents is not available)

![Photo of Mountain](images/mountain.jpg ':class=header-image-full-width')

header-tall-image-full-width (suggested size of 1200px to 2000px width and 400px to 600px height, and display of Table of Contents is not available)

![Photo of Mountain](images/mountain.jpg ':class=header-tall-image-full-width')

header-image-full-width-headings-overlay (Suggested size of 1200px to 2000px width and 400px to 600px height, and display of Table of Contents is not available)

![Photo of Mountain](images/mountain.jpg ":class=header-image-full-width-headings-overlay")

# Page Title

header-tall-image-full-width-headings-overlay (Suggested size of 1200px to 2000px width and 400px to 600px height, and display of Table of Contents is not available)

![Photo of Mountain](images/mountain.jpg ":class=header-tall-image-full-width-headings-overlay")

# Page Title

image-75 (scale image to 75%)

![Photo of Mountain](images/mountain.jpg ':class=image-75')

image-50 (scale image to 50%)

![Photo of Mountain](images/mountain.jpg ':class=image-50')

image-25 (scale image to 25%)

![Photo of Mountain](images/mountain.jpg ':class=image-25')

image-75-border

![Photo of Mountain](images/mountain.jpg ':class=image-75-border')

image-50-border

![Photo of Mountain](images/mountain.jpg ':class=image-50-border')

image-25-border

![Photo of Mountain](images/mountain.jpg ':class=image-25-border')

image-border

![Photo of Mountain](images/mountain.jpg ':class=image-border')

image-border-rounded

![Photo of Mountain](images/mountain.jpg ':class=image-border-rounded')

navpill

[GitHub](https://github.com/hibbitts-design/docsify-this ':class=navpill')
<a class="navpill" href="https://github.com" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>

responsive

<img src="https://raw.githubusercontent.com/hibbitts-design/publishing-with-docsify-this/main/images/docsify-this-web-page-builder.jpg" width="910" height="682" class="responsive image-border" alt="Docsify-This Web Page Builder">

row & column

<div class="row">
<div class="column">

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

</div>
<div class="column">

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

</div>
</div>
<div class="row reverse-columns">
<div class="column">

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

</div>
<div class="column">

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

</div>
</div>
<div class="row">
<div class="column">

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

</div>
<div class="column-right">

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

</div>
</div>

video-container-4by3

<div class="video-container-4by3"><div class="video-container-16by9"><iframe width="560" height="315" src="https://www.youtube.com/embed/lJIrF4YjHfQ"></iframe></div>

video-container-16by9
Automatically added to all iFrames with the source domains 'youtube.com' or 'docs.google.com'.

<div class="video-container-16by9"><iframe width="560" height="315" src="https://www.youtube.com/embed/lJIrF4YjHfQ"></iframe></div>

🎨 Visual Customization

A Docsify Open Course Starter Kit site can be visually customized using CSS within the custom.css file located in the folder docs/assets/css. Using this file new Markdown CSS classes can be defined.

CSS:

.markdown-section .mybutton, .markdown-section .mybutton:hover {
  cursor: pointer;
  color: #CC0000;
  height: auto;
  display: inline-block;
  border: 2px solid #CC0000;
  border-radius: 4rem;
  margin: 2px 0px 2px 0px;
  padding: 8px 18px 8px 18px;
  line-height: 1.2rem;
  background-color: white;
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  font-weight: bold;
  text-decoration: none;
}

Markdown:

[Required Reading Quiz due Jun 4th](https://canvas.sfu.ca/courses/44038/quizzes/166553 ':class=mybutton')

Docsify theme settings can also be configured, as seen in the examples provided in the default custom.css file.

CSS:

:root {
    --link-color: #0F6CBF!important;
}
*/

It is also possible for dual CSS styling to be configured, with CSS applied to when viewing the site (with overriding custom CSS included in a STYLE tag in the _sidebar.md file) and then other CSS settings within the custom.css file applied to when viewing standalone pages (i.e. ?embedded=true)

CSS in Sidebar file (_sidebar.md):

<style>
  :root {
    --link-color: #CC0633;
    --link-text-decoration: none;
    --link-text-decoration--hover: underline;
  }
</style>

🌐 Using MAMP to View Docsify Sites Locally

An alternative to installing Docsify locally (as described following this section) is to use MAMP to view your Docsify sites locally on your own computer.

  1. Download MAMP
  2. Move your local Docsify site to the htdocs folder of MAMP
  3. Turn MAMP on, tap WebStart and then tap My Website
  4. Tap on the folder containing your local Docsify site and then tap on the docs folder

📼 Video Walkthrough of Local Docsify Install/Config

Generating Documentation Sites with GitHub and Docsify - Alysson Alvaran
Video 1. Generating Documentation Sites with GitHub and Docsify - Alysson Alvaran

🙇‍Credits and Special Thanks

All past and current Docsify.js.org maintainers and contributors.

About

A ready-to-use template to create a Docsify Markdown-based open course website. Global navigation elements can be hidden for seamlessly embedding pages (i.e. into an LMS). Includes an optional "Edit this Page" link.

Topics

Resources

Code of conduct

Stars

50 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors