
A fast and lightweight site for viewing files.
Great for documentation, wiki, notes, etc.
Features
- No database.
- No building.
- Fast - using ajax and cache.
- Supports Markdown, plaintext, HTML, code, images, SVG, GIFs, audio and small videos. Basically anything you can render in a browser.
- Responsive layouts and different color schemes.
- Syntax highlighting for over 169 languages with over 77 themes.
- Configuration (see below).
- Quick filtering in files.
- Use your existing files or existing git repos.
Setup
Docker
Docker is the easiest way to setup PineDocs.
Docker-compose.yml
version: '3'
services:
web:
image: xy2z/pinedocs
ports:
- 3000:80
volumes:
- ./data:/data/pinedocsAfter running docker-compose up -d you can change the config in ./data/config/config.yaml, and add your files (or git clone your documentation) in the ./data/files dir.
Changes will take affect when you reload the page - no need to restart the container.
Docker
Altough docker-compose is recommended, you can also use pure Docker:
docker run -itd -v "$PWD"/data:/data/pinedocs -p 3000:80 xy2z/pinedocs:1.0.5
See more at https://hub.docker.com/r/xy2z/pinedocs/
Manual Setup
Requirements
- PHP 7.0 or above.
- Composer for dependencies.
- A web server (apache2, nginx, etc.)
Setup guide
- Download the latest release or run
git clone - Run
composer installin the root to get dependencies. - Setup the web server to the
PineDocs/publicdir (usephp -S localhost:89 -t publicfor testing)
Configuration
Feel free to edit the config/config.yaml file to fit your needs.
Settings
-
title(string) The title of the site, used in logo, tabs and bookmarks. -
content_dir(string) Path to the dir you want to use. Default is the PineDocs/content/ dir. -
index(string) Relative path to the index file. Default is array ofindex.md,index.html,index.txt,index. -
layout(string) Available layouts:default,wiki. -
color_scheme(string) Available color schemes:pinedocs,simplistic,simplistic-dark,twilight. -
highlight_theme(string) The theme to use for code. See a list at https://highlightjs.org/static/demo/ -
code_transparent_bg(bool) Iftrue, all will use the highlight theme. Iffalse, the background will be transparent. -
open_dirs(int|string) The number of levels of dirs that should be opnened on page load. Useallto open all dirs. -
render_footer(bool) Render the menu footer? -
exclude_files(array) List of files to exclude. Supports regex if the format is /regex/i. -
show_file_extension(bool) Show file extensions. Default is true. -
menu_link_format(string) Values: default, ucfirst, ucwords, uppercase, lowercase. -
render_max_file_size(float) Max file size (in MB) to render. If file is larger, a download link will be shown. Default is50. -
font_family(string) The font used for menu and content. Default isTahoma. -
font_size(string) The font size in menu and content. Default is15px. -
no_extension_markdown(bool) Render files with no extension as markdown, egREADME. Defaulttrue. -
break_code_blocks(bool) Break code blocks in multiple lines instead of horizontally scrolling. Defaultfalse.
License
GNU GPLv3. See LICENSE.txt