Skip to content

Commit 2e72333

Browse files
authored
Update template (#2)
Update template with more instructions (incl. GitHub Pages) and cleanup index.html with additions
1 parent 7ec3f9c commit 2e72333

File tree

4 files changed

+73
-14
lines changed

4 files changed

+73
-14
lines changed

Diff for: README.md

+29-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
1-
# Simple Docsify Template
1+
# Docsify Template
22

3-
> A simple Docsify template that requires no build steps.
3+
> A simple [Docsify](https://github.com/docsifyjs/docsify/) template for creating Markdown-based documentation sites, with no build process required.
44
5-
Just upload the files to any static web server. Or run `npx serve .` (Node.js users) or `python -m http.server 8000` (Python users) in the repo to serve run locally.
5+
## Site Setup
6+
7+
### Static Webserver
8+
Upload these template files to any static web server. The file `.nojekyll` is only required if hosting the site on GitHub Pages and otherwise can be removed.
9+
10+
### GitHub Pages
11+
12+
#### Hosting Site
13+
14+
To host this template on GitHub Pages do the following:
15+
16+
1. Log into GitHub if you have not done so already
17+
2. Tap the **Use this template** button in the upper-right of this GitHub Repository and choose **Create a new repository**
18+
3. Enter a name for your new Repository and then tap the **Create repository** button
19+
4. Once your new Repostitory is created go to **Settings**, then select **Pages** from the left-hand sidebar, and under **Branch** choose **main** and then tap the **Save** button
20+
5. Wait a minute or two and refresh the same **Pages** page - once your site is ready a message will be displayed at the top of the screen along with a site link and a **Visit site** button
21+
22+
#### Editing Content
23+
24+
How about editing the content of your new Docsify site on GitHub Pages? View the Markdown page you want to edit (for example, **README.md**) and tap the **Pencil Icon**, then save any changes by tapping the green **Commit changes...** button. In just a few moments the Docsify site will be automatically updated to reflect those changes.
25+
26+
### Viewing Locally
27+
Run `npx serve .` (Node.js users) or `python -m http.server 8000` (Python users) in the repo folder to serve run locally.
28+
29+
## Docsify Documentation
30+
31+
To learn more about using Docsify, visit https://docsify.js.org.

Diff for: _sidebar.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- [Read Me](README)
2+
- [Example Second Page](second-page)

Diff for: index.html

+39-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,50 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
4-
<meta charset="UTF-8">
5-
<title>Document</title>
6-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7-
<meta name="description" content="Description">
8-
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport"
8+
content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover">
9+
<meta name="description" content="">
10+
<title>Docsify</title>
11+
12+
<!-- Default Theme -->
913
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
14+
1015
</head>
16+
1117
<body>
1218
<div id="app"></div>
19+
1320
<script>
21+
// Docsify Configuration
1422
window.$docsify = {
15-
name: '',
16-
repo: ''
17-
}
23+
name: 'Simple Docsify Template',
24+
25+
// Sidebar Configuration
26+
auto2top: true,
27+
loadSidebar: true,
28+
maxLevel: 0,
29+
// Set subMaxLevel to 0 to remove automatic display of page table of contents (TOC) in Sidebar
30+
subMaxLevel: 3,
31+
32+
// Search Plugin Configuration
33+
search: {
34+
placeholder: 'Type to search',
35+
noData: 'No matches found.',
36+
// Headline depth, 1 - 6
37+
depth: 2,
38+
}
39+
};
1840
</script>
19-
<!-- Docsify v4 -->
20-
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
41+
42+
<!-- Required -->
43+
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
44+
45+
<!-- Recommended -->
46+
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/zoom-image.min.js"></script>
47+
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.js"></script>
48+
2149
</body>
22-
</html>
50+
</html>

Diff for: second-page.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Example Second Page
2+
3+
This is an example second page that will appear in the Docsify Sidebar.

0 commit comments

Comments
 (0)