Git Product home page Git Product logo

perlite's Introduction

Perlite

GitHub release (latest by date) GitHub GitHub last commit

A web based markdown viewer optimized for Obsidian Notes

Just put your whole Obsidian vault or markdown folder/file structure in your web directory. The page builds itself.

Its an open source alternative to obisidian publish.

Read more about Perlite and staging tips on my blog post: Perlite on Secure77.

Demo

Perlite Demo

Demo Screenshot

Graph Screenshot

Features

  • Auto build up, based on your folder (vault) structure
  • Support Obsidian Themes
  • Full responsive
  • No manual parsing or converting necessary
  • Full interactive Graph
  • LaTeX and Mermaid support
  • Link to Obsidian Vault
  • Search
  • Support Obisdian tags, links and images

Changelog

Changelog

previous versions

Install

Just put the content of the perlite directory in your web root directory, your notes should resident as a subfolder of perlite.

For Docker just check the DOCKER readme.

Requirements

  • Web server, tested with coverage
  • Php-fpm, tested with coverage and coverage
  • Php module mb_strings for the parsedown (apt install php-mbstring)
  • Php module yaml_parse for the metadata (apt install php-yaml)

Required Obsidian Options

  • In the options Files & Links you need to set the New link format to Relative path to file Link Options

โš ๏ธ You must recreate the image links to take effect!

Themes

In your vault, there must be the .obsidian folder with the subfolder themes, perlite will load all themes presented in this folder. Perlite will also check for the file appearance.json in the .obsidian folder to get your default theme. Make sure that your webserver has access to the files in the .obsidian folder.

Graph

  • For the Graph you need to install the plugin Metadata Extractor, you can also do this via the build in Community Plugin Browser
  • Make sure to turn on the plugin
  • In the settings, set the path of the metadata.json to your local vault root folder (like C:\Users\John\MyNotes\metadata.json, when your vault is MyNotes). if you transfer your vault later to a webserver, make sure the metadata.json will be transferred too.
  • Also dont forget to set a timer how often the file should be written or just enable Write JSON files automatically when Obsidian launches

Plugin Options

Hide Folders and Files

  • If you want to exclude specific folders, e.g. your attachment folder you can set the HIDE_FOLDERS variable or replace $hideFolders = getenv('HIDE_FOLDERS'); in the helper.php with something like this $hideFolders = 'attachments';
  • Folders and files starting with a "." (dot) are exclude by default Folders Options

Advanced Options and Infos

About, Start Page and LineBreaks

  • The About opens a .md file in a modal window (.about.md per default), you can change this in the helper.php $about variable
  • The Startpage is set to README.md, you can change this in the helper.php $index variable and in the perlite.js homeFile variable
  • If you want to use the classic Markdown behavior for line breaks, set the variable LINE_BREAKS to false

Graph

The Graph is implemented with vis.js, so there are many options you can play on with, you can adjust them via the options object in the perlite.js

Root Dir

  • Without setting a NOTES_PATH enviroment variable, Perlite takes the perlite directory as root folder, this means, you need to copy your content of the vault folder into the perlite directory (including metadata.json if you want a graph).
  • If you want to change or specify the root directory of your vault, you can do this by changing the variable $rootDir in the helper.php or by setting the NOTES_PATH as php variable.

Dependencies (all included)

  • coverage
  • coverage
  • coverage
  • coverage
  • coverage
  • coverage
  • coverage

Security

  • The Safemode from Parsedown is active, but I would not recommend to allow untrusted user input.
  • You should prevent that the .md files are direct accessible via the browser (only the php engine need access to it) or at least make sure that the md files will be downloaded and not be rendered by browser
  • You should prevent that the metadata.json file is direct accessible via the browser (only the php engine need access to it). The extracted metadata.json contains the whole obsidian structure, so this file could be sensitive if you plan to exclude some files or folders from Perlite. However, the parsing is done by the php engine and it checks for every path if the file really exists in the provided vault, so files you excluded from the vault will also not be visible in the graph, but they are still present in the metadata.json. This is why you should prevent access to it.

Why Perlite?

Wiki: Perlite is an amorphous volcanic glass ... typically formed by the hydration of obsidian.

perlite's People

Contributors

secure-77 avatar tooa avatar chmac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.