Skip to content

Commit

Permalink
basic structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurizio Brioschi committed Apr 16, 2020
1 parent fa7695e commit 5595c41
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:8.16.1-alpine

RUN npm i docsify-cli -g

EXPOSE 3000

WORKDIR /home/node

COPY src/ .
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# docsify
docsify docker basic structure to create fast and usable documentation
docsify
---
[docsify](https://docsify.js.org/#/) docker basic structure to create fast and usable documentation.

## How read/write documentation
- spin up the container for the documentation with `docker-compose up --build -d`
- go on [http://localhost:3000](http://localhost:3000) and read the documentation in your local browser
- add your document in markdown format inside the folder *src*

## Important to know
- If you create a new folder, the root document of the folder must be a **readme.md** file
- All configurations to the website must be done inside the file [src/index.html](src/index.html)
following [docsify](https://docsify.js.org/#/) documentation
- reload the page in your browser to see changes
- you can link every document to each other using relative path.
- If you want to add a left navigation menu, add a file *_sidebar.md* to the folder
- If you want to add a navigation on top, just add an entry in the *nav* tag inside *src/index.html*
- add this variable `{docsify-updated}` on top of your markdown page to display the last update of the file
12 changes: 12 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.7"

services:
doc:
build:
context: .
dockerfile: Dockerfile
volumes:
- ${PWD}/src:/home/node
ports:
- 3000:3000
command: docsify serve .
Empty file added src/.nojekyll
Empty file.
2 changes: 2 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## My doc title
---
Empty file added src/_sidebar.md
Empty file.
36 changes: 36 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="Description">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
<nav>
<a href="#/">Home</a>
</nav>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Here type your documentation title',
repo: 'https://link-to-your-repo',
relativePath: true,
themeColor: '#0000FF',
loadSidebar: true,
subMaxLevel: 6,
formatUpdated: '{DD}/{MM}/{YYYY} {HH}:{mm}',
search: 'auto', // default
search: [
],
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="//unpkg.com/docsify-copy-code"></script>
</body>
</html>

0 comments on commit 5595c41

Please sign in to comment.