Short description of the website Defaults to 'Markdown Documents Showcase'.
copyright
Copyright text in footer HTML format. Defaults to 'Powered by <a href="https://github.com/ychongsaytc/deepwiki" target="_blank">DeepWiki</a>.'.
theme
Slug name of current theme, must be matched a directory name in deepwiki-themes/ (see Theme Development). Defaults to 'default'.
docs_path
Directory to find document files. Defaults to 'deepwiki-docs-example'.
assets_path
Directory to find asset files. Defaults to 'deepwiki-docs-example/assets'.
home_route
The default route (a path to the landing document) for root page visits. Defaults to 'quick-start'.
display_chapter
Display chapter number (like 1.1.a.) before document title. Defaults to false.
display_index
Display contents index navigation (based on content outline). Defaults to false.
rewrite
Enable global URL Rewrite (see URL Rewrite to enable rewrite feature for your server). Defaults to false.
footer_code
HTML code at the end of <body>, can be placed your Google Analytics code, "Fork me on GitHub" badge, and anything you want. Defaults to empty.
password
Main password to view the website, fill in this to enable site authentication. Defaults to empty.
cookie_salt
A random string for encrypt cookies data, important. Defaults to empty.
Directory Structure
deepwiki-docs/ Document files in Markdown, plain text, HTML
/index.json A JSON specified all document titles, filenames, slug names and hierarchy
/assets/ Asset files (e.g. images and attachments)
deepwiki-config/config.json Main configuration file in JSON
deepwiki-themes/ DeepWiki themes
/default/ The default theme of DeepWiki
/xxx/ A theme named xxx
deepwiki-vendor/ The necessary components
Writing Documents
All documents must be placed in DeepWiki documents directory (defaults to deepwiki-docs/, can be changed in DeepWiki configuration).
Arrange your documents through file naming
Basic way to arrange your documents, will be overwrite by the definition in DeepWiki configuration (see Define all documents in configuration below).
Full functional naming example
1. Parent Page One [parent-1].md
1.1. Child Page One [child-1].md
1.2. Child Page Two [child-2].md
1.2.1. Grandchild Page One [grandchild-1].md
1.2.2. Grandchild Page Two [grandchild-2].md
1.2.3. Grandchild Page Three [grandchild-3].md
1.3. Child Page Two [child-3].md
2. Parent Page Two [parent-2].md
3. Parent Page Three [parent-3].md
Chapter Number: (optional) Using digits or letters ended with a point (.). If not set, the document will act in flat hierarchy.
Document Title: (mandatory) The title of document.
Document Slug Name: (optional) A string to be the identifier (or short name) of the document, enclosed by a pair of square brackets ([ and ]). Leave this blank to use sanitized document title as slug name.
Document File Extension Name: (mandatory) Possible values are: .markdonw, .md, .mdown, .txt, .html, etc.
A. Crescendo.md
B. Mundum.md
C. Fulgura.md
D. Habendum.md
D.1. Discordia.md
D.2. Instabilis.md
D.3. Erectos.md
D.3.a. Utramque.md
D.3.b. Flamma.md
E. Scythiam.md
Define all documents in configuration
The documents can be defined in configuration file (deepwiki-docs/index.json), including titles, slug names, filenames and hierarchy.
If you are using Git to manage your documents, you can setup an auto deployment tool to deploy files onto DeepWiki.
DeepDeploy is such an Auto Deployment system, deploying Git repository to any server (via FTP/SFTP). It's easy to use:
Go to DeepDeploy, sign in and create a project.
Add your repository contains document file to the project.
Add your DeepWiki server FTP/SFTP information to Server section, with setting Path to Deploy to the DeepWiki document files path (e.g. /deepwiki-docs/src or /home/ubuntu/public_html/deepwiki-docs/src).
Save the project and trigger your first auto deployment.
Theme Development
DeepWiki allow you to custom your own template. The files structure is:
deepwiki-themes/xxx/ A theme named xxx
/xxx/theme.json Theme configuration in JSON
/xxx/index.html Document page template
/xxx/404.html Not Found (404 HTTP status) page template
/xxx/login.html User Login page template
请发表评论