This commit is contained in:
Chewico 2025-09-01 20:50:07 +02:00
parent 353c3b4144
commit 2ba3e000b5
173 changed files with 51384 additions and 19 deletions

2
.obsidian/app.json vendored
View File

@ -1,4 +1,4 @@
{ {
"alwaysUpdateLinks": true, "alwaysUpdateLinks": true,
"newLinkFormat": "absolute" "newLinkFormat": "relative"
} }

View File

@ -182,39 +182,54 @@
"obsidian-excalidraw-plugin:New drawing": false "obsidian-excalidraw-plugin:New drawing": false
} }
}, },
"active": "0644bc4d722f4d8a", "active": "7cf6e446d7bedc7b",
"lastOpenFiles": [ "lastOpenFiles": [
"Perlite/web/config/perlite.conf",
"Perlite/web/config",
"Perlite/web",
"Perlite/screenshots/screenshot.png",
"Perlite/screenshots/plugin_options.png",
"Perlite/screenshots/plugin.png",
"Perlite/screenshots/link.png",
"Perlite/screenshots/graph.png",
"Perlite/screenshots/folders.png",
"Perlite/screenshots",
"Perlite/perlite/vendor/erusev/parsedown/composer.json",
"Perlite/perlite/vendor/erusev/parsedown/README.md",
"Perlite/perlite/vendor/erusev/parsedown/Parsedown.php",
"Perlite/perlite/vendor/erusev/parsedown/LICENSE.txt",
"Perlite/perlite/vendor/erusev/parsedown",
"Perlite/perlite/vendor/composer/platform_check.php",
"Perlite/perlite/vendor/composer/installed.php",
"Perlite/perlite/vendor/composer/installed.json",
"Perlite/perlite/perlite.svg",
"Perlite/perlite/logo.svg",
"Perlite/perlite/Demo/README.md",
"Perlite/perlite/Demo/Demo Documents/docs/aufbau.webp",
"Perlite/perlite/Demo/Demo Documents/background.png",
"Perlite/perlite/Demo/Demo Documents/Markdown Samples.md",
"Perlite/perlite/Demo/Demo Documents/Links and Embedded.md",
"Perlite/perlite/Demo/Demo Documents/Latex and Mermaid.md",
"Perlite/perlite/Demo/Demo Documents/Images.md",
"Perlite/perlite/Demo/Demo Documents/Callouts and Frontmatter.md",
"Perlite/SECURITY.md",
"Perlite/README.md",
"Perlite/Changelog.md",
"Introducción Quimica/Elementos y átomos.md", "Introducción Quimica/Elementos y átomos.md",
"Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.svg",
"Introducción Quimica/Composición de materiales.md", "Introducción Quimica/Composición de materiales.md",
"Introducción Quimica/Iones.md", "Introducción Quimica/Iones.md",
"Dr.md", "Dr.md",
"Introducción Quimica/TablaPeriódica.png",
"Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.md", "Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.md",
"Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.excalidraw",
"Ilustraciónes",
"Introducción Quimica",
"Docs/Introducción Quimica/TablaPeriódica.png",
"Docs/Introducción Quimica/Iones.md", "Docs/Introducción Quimica/Iones.md",
"Docs/Introducción Quimica/Elementos y átomos.md", "Docs/Introducción Quimica/Elementos y átomos.md",
"Docs/Introducción Quimica/Composición de materiales.md", "Docs/Introducción Quimica/Composición de materiales.md",
"Docs/Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.md", "Docs/Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.md",
"Docs/Introducción Quimica",
"Docs/Ilustraciónes",
"Docs",
"site/Introducción Quimica/TablaPeriódica.png",
"site/Introducción Quimica/Iones.md", "site/Introducción Quimica/Iones.md",
"site/Introducción Quimica/Elementos y átomos.md", "site/Introducción Quimica/Elementos y átomos.md",
"site/Introducción Quimica/Composición de materiales.md", "site/Introducción Quimica/Composición de materiales.md",
"site/Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.md", "site/Ilustraciónes/Drawing 2025-09-01 19.07.05.excalidraw.md",
"site/Introducción Quimica",
"site/Ilustraciónes",
"site",
"Dockerfile",
"Introducción Quimica/Ilustraciónes/Ilustración1.md", "Introducción Quimica/Ilustraciónes/Ilustración1.md",
"Excalidraw/Drawing 2025-09-01 18.57.37.excalidraw.md", "Excalidraw/Drawing 2025-09-01 18.57.37.excalidraw.md",
"Excalidraw/Drawing 2025-09-01 18.57.14.excalidraw.md", "Untitled.canvas"
"Untitled.canvas",
"2025-09-01.md"
] ]
} }

29
Perlite/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
.trash
notes
perlite/Demo/.trash
perlite/Demo/Thumbs.db
perlite/Demo/.obsidian/plugins
perlite/Demo/.obsidian/app.json
perlite/Demo/.obsidian/community-plugins.json
perlite/Demo/.obsidian/core-plugins-migration.json
perlite/Demo/.obsidian/core-plugins.json
perlite/Demo/.obsidian/graph.json
perlite/Demo/.obsidian/hotkeys.json
perlite/Demo/.obsidian/workspace.json
perlite/Demo/Test Canvas.canvas
perlite/logo2.svg
Thumbs.db
perlite-dev
_Notes
perlite/.scripts/vendor
perlite/.scripts/release.sh
perlite/.scripts/canvas.js
perlite/Link Tests/root_image.png
perlite/Link Tests/folder1/image_parentFolder.png
perlite/Link Tests/folder1/folder 2/image_sameFolder.png
perlite/Link Tests/folder1/folder 2/parent_andRoot_folder_test.md
perlite/Link Tests/folder1/folder 2/same_folder_test.md
perlite/Link Tests/folder1/folder 2/subfolder_test.md
perlite/Link Tests/folder1/folder 2/docs/image_subFolder.png
perlite/Link Tests/folder1/folder 2/docs/subfolder_document.md
perlite/sec.jpg

277
Perlite/Changelog.md Normal file
View File

@ -0,0 +1,277 @@
## 1.6
- get rid of mb_strlen, fixed issue [#151](https://github.com/secure-77/Perlite/issues/151) thanks to @Sephral
- hide X / Twitter when not set, issue [#152](https://github.com/secure-77/Perlite/issues/152), thanks to @EKNr1
- implemented settings.php, issue [#119](https://github.com/secure-77/Perlite/issues/119), thanks to @EKNr1
- implemented pretty urls, issue [#140](https://github.com/secure-77/Perlite/issues/140)
- removed not used Dockerfile
- fixed issue [#148](https://github.com/secure-77/Perlite/issues/148)
- fixed issue [#149](https://github.com/secure-77/Perlite/issues/149)
- implemented highlight support [#150](https://github.com/secure-77/Perlite/issues/150)
- implemented TOC mobile support [#141](https://github.com/secure-77/Perlite/issues/141)
- implemented Tags in side view [#122](https://github.com/secure-77/Perlite/issues/122)
- added possibility to allow access to MD files in hidden folders via HIDDEN_FILE_ACCESS variable, thanks to @EKNr1 for the idea.
- updated katex to 0.16.22
- updated highlight.js to 11.11.1
- updated mermaid to 11.6.0
\
**Important Update Note**\
As Perlite is now using pretty URLs you need to change your Nginx / Webserver config to make perlite work again after this release! This affects also the docker version, you need to get the latest [perlite.conf](https://github.com/secure-77/Perlite/blob/main/web/config/perlite.conf)
Please take a look at the [updated wiki](https://github.com/secure-77/Perlite/wiki/01---Setup-(no-Docker)#adjust-the-nginx-config) for more details.
## 1.5.9
- added YouTube link support [#133](https://github.com/secure-77/Perlite/issues/133) thanks to @rsubr
- added image postion support thanks to @ar0x4
- fixed direct page links [#90](https://github.com/secure-77/Perlite/issues/90)
- added support for webp images [#126](https://github.com/secure-77/Perlite/issues/126)
- fixed kartex problem PR [#131](https://github.com/secure-77/Perlite/pull/131) thanks to @Yaro2709
- fixed obsidian edit link thanks to klgzzz
- changed site title to use the env. variable site_title
- fixed issue [#128](https://github.com/secure-77/Perlite/issues/128) thanks to @rgaricano
- added m4a support thanks to @rgaricano
- added img link support to external urls issue [#89](https://github.com/secure-77/Perlite/issues/89)
- added tasks support, issue [#118](https://github.com/secure-77/Perlite/issues/118)
- updated mermaid to 11.2.1
- updated katex to 0.16.11
- updated highlight.js to 11.10.0
- changed base image for perlite_web to nginx:stable, issue [#100](https://github.com/secure-77/Perlite/issues/100)
## 1.5.8
- merged PR #111 thanks to @selfiens
- merged PR #112 thanks to @selfiens
- merged PR #106 thanks to @Shardbyte
- updated obsidian app.css
- fixed yaml frontmatter [#107](https://github.com/secure-77/Perlite/issues/107)
- added support for alternate image text [#92](https://github.com/secure-77/Perlite/issues/92)
- added support for collapsed callouts [#113](https://github.com/secure-77/Perlite/issues/113)
- added support for embedded pdf and videos [#105](https://github.com/secure-77/Perlite/issues/105)
- added random node function [#109](https://github.com/secure-77/Perlite/issues/109)
- added support for absolut pathes [#90](https://github.com/secure-77/Perlite/issues/90)
- updated Demo Documetns and Themes
- updated build.sh to force composer updates
- updated highlight.js to 11.9.0
- updated katex to 0.16.9
- updated vis-network to 9.1.9
- added new custom logo and social media section
- fixed issue Folder arrow marker randomly disappears [#94](https://github.com/secure-77/Perlite/issues/94)
- changed to show TOC and local Graph at the same time
## 1.5.7
- added social media meta tags and variables
- added github action for docker build process and arm support, issue #65
- improved loading performance, the graph linking will only be done at the first page load, issue #97
- provided a python script to perform as alternative for the link generation, issue #97
- included mermaid 10.3.0 via cdn as composer had issues to load it
- updated highlight.js to 11.8.0
- updated katex to 0.16.8
- updated jquery to 3.7.1
- fixed issue #74 (custom heading links)
- fixed heading references in links to other notes
- implemented copy code button issue #68
- added a little padding for the headers
- merged PR #102 (thx to @selfiens)
- seperated php composer into two files (npm-assets and php-assets)
- fixed issue #91
## 1.5.6
- fixed heading references (issue #74)
- added safemode environment variable (PR #88) thanks to @NotGovernor
- added default side panel size related of screen size (issue #85)
## 1.5.5
- updated some html structure to fit the latest app.css and theme styles
- updated app.css
- removed Bootstrap dependency
- fixed ampersand problem in global graph (issue #47)
- added default font size environment variable (issue #80)
- added escape key function for modal close button (PR #82) thank to @stellarix
- added homepage environment variable (PR #84) thanks to @NotGovernor
- added composer
- added build script
- updated highlight.js to 11.7.0
- updated jquery to 3.7.0
- updated mermaid to 8.12.1
- updated vis-network to 9.1.6
## 1.5.4
- fixed img max width
- fixed image modal (issue #58)
- fixed double links to nodes (issue #45) thanks to @catrone3
- added svg format, thanks to @lennartbrandin
- added variable for allowed file link types, thanks to @dbohn
- changed the gprah render solver from barnesHut to forceAtlas2Based to improve perfomance (issue #66)
- added graph loading text
- added option and default behavior to disable Pop Hovers
- added default behavior to show table of content instead of local graph
## 1.5.3
- support file links with exclamation mark and aliases (issue #55)
- support image resizing (issue #54)
- fixed $refName missing php variable (PR #56)
## 1.5.2
- fixed $closing variable error
- set focus to search field
- fixed #Header reference in internal links (Issue #32)
- fixed error with links to non existing files (Graph)
- fixed ampersand problem in internal links and graph (Issue #47)
- added mousehover for internal links, feature request #43
- added popup feature for internal links on mobile (setting), feature request #43
- fixed padding-right issue on mobile view
- moved some instructions to the wiki
- added light mode (in the settings)
- updated katex to 0.16.4
- fixed problem with two _ (underscorces) per line in katex context
## 1.5.1
- fixed tags containing a hyphen or slash (Issue #39)
- fixed docker-compose-dev.yml config
- fixed callouts and contiuned quotes (Issue #40 and #27)
- fixed logo position
- Demo Vault is default if no NOTES_PATH is defined
- fixed line breaks if LINE_BREAKS isn´t defined
## 1.5
- Complete redesign based on obsidian css
- support for Obsidian themes
- added tag search
- added metadata support
- added different settings for the graph styling
- added different settings for the viewer, like text size
- settings stored in local browser storage
- updated JQuery to version 3.6.1
- updated HighlightJS to version 11.6.0
- updated Docker image to use latest php:fpm-alpine version (8.1.11)
- updatet Nginx config to allow Themes
- added docker compose variable for markdown linebreaks
## 1.4.5 RC
- added "edit button", enable it via cookie, thx to @Tooa
## 1.4.4
- some code cleanup
- replaced mermaid.min.js with the correct one (29.1.)
- implemented start page (README.md) for non mobile view
- hide graph display, when node has no graph
- some visual graph updates
- changed order: folders are now always on top
- fixed sort order to be case insensitive
- adjusted the docker image and container naming
- updated the nginx version to 1.22 and php to 7.4.30 for docker
- adjusted blockquote style and added callouts support (thanks to @Tooa)
- fixed sidebar menu height
- fixed problem with direct links and `&` chars
- fixed a graph linking error when some files are missing from the metadata.json
## 1.4.3
- added mermaid 8.7.0 (mermaid.min.js)
- changed order for folders and files with underscores (they are now on top)
- added sec77/perlite:latest to the docker hub
- changed the docker compose files, the hub images is used now
- updated vis-js to version 9.1.2
- fixed problems with multiple links in one line
## 1.4.2
- enabled simple line break in parsedown
- fixed sidebar height
- fixed max img width & height
- removed # from title
- added Perlite Discord Server
- added support for custom internal Obsidian link names
- improved style of tables
- url update in browser
## 1.4.1
- some code cleanup
- added separate perlite.svg for the about header
- changed nginx docker config
- fixed multibyte utf basename to support chinese characters in file name and path
- fixed menu collapse problem when folder name contains dots or begins with a number
- fixed image size in mobile view
- fixed image line break issue
- fixed full graph view when current node has no links and no-link filter is enabled
- changed color of current node in the graph view
- LaTeX support
- added katex.min.js
- added katex.min.css
- added fonts
- added auto-render.min.js
- fixed navigator when file or folder names are to long
## 1.4
- updated highlight.js to 11.4.0
- updated Bootstrap JS files to 5.1.3
- changed default (dark) theme from darkly to Bootswatch theme "slate"
- fixed direct links when Perlite is in a subfolder of the root direcotry
- removed the flatly theme, a11y-light theme and disabled the "light mode"
- many layout redesigns like
- changed the header size
- moved the searchbar to the navbar
- added Nerd Fonts as default Font
- added a right navbar for the graph
- highlight current navbar entry
- set focus on current navbar entry if called by a link
- other small layout changes
- added separated scrollbars for navbar and content
- added rel="noopener noreferrer" attributes for external links
- added icon for external links
- added a visual graph via vis.js
- metadata.json parsing (only adds nodes if they really exists in the folder structure)
- show graph and direct links for every note in the right navbar
- added modal for full graph view
- added filter (hide nodes without link) in the full graph view (saved via cookie)
- improved the search
- enabled case insensitive
- included filename for the search
- removed the "open recent search" (because its unnecessary)
- updated the Readme
- updated the Demo Documents
## 1.3
- added support for inplace links
- added support for PDF files / links
- changed in place image behaviour
- new logo
- added favicon
- adjust image view in about modal
- changed "About" behaviour
- added changelog
- outsourced docker instructions from readme
- changes link behaviour (added link get parameter to fix problems with unwanted queries)
- removed "not allowed" content
- added cookie for theme settings
- adjust mobile margins
## 1.2
- added Docker
- added direct Links
- changed base dir logic
- update Readme
## 1.1
- added mobile responsive
- added search
- added theme support and darkmode
## 1.0
- First prod. ready release

21
Perlite/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 secure-77
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

77
Perlite/README.md Normal file
View File

@ -0,0 +1,77 @@
# Perlite
![GitHub release (latest by date)](https://img.shields.io/github/v/release/secure-77/perlite) ![GitHub](https://img.shields.io/github/license/secure-77/perlite) ![GitHub last commit](https://img.shields.io/github/last-commit/secure-77/Perlite)
A web based markdown viewer optimized for [Obsidian](https://obsidian.md/) 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 [obsidian publish](https://obsidian.md/publish).
Read more about Perlite and staging tips on my blog post: [Perlite on Secure77](https://secure77.de/perlite).
If you want to discuss Perlite you can join the [Perlite Discord Server](https://discord.gg/pkJ347ssWT)
## Demo
[Perlite Demo](https://perlite.secure77.de/)
![Demo Screenshot](https://raw.githubusercontent.com/secure-77/Perlite/main/screenshots/screenshot.png "Demo Screenshot")
![Graph Screenshot](https://raw.githubusercontent.com/secure-77/Perlite/main/screenshots/graph.png "Graph Screenshot")
## Features
- Auto build up, based on your folder (vault) structure
- No Database required
- Obsidian Themes Support
- Fully Responsive
- No manual parsing or converting necessary
- Full interactive Graph
- LaTeX and Mermaid Support
- Link to Obsidian Vault
- Search
- Obsidian tags, links, images and preview Support
- Dark and Light Mode
## Install
Please make sure you read the [required settings](https://github.com/secure-77/Perlite/wiki/03---Perlite-Settings#required-settings) first!
You can download the latest release from github or git clone the project and use docker.
- For non Docker please check [Setup](https://github.com/secure-77/Perlite/wiki/01---Setup-(no-Docker))
- For Docker, please check [Docker Setup](https://github.com/secure-77/Perlite/wiki/02---Setup-Docker)
## Wiki
Please check the [wiki](https://github.com/secure-77/Perlite/wiki), here you will find further information, for example:
- [Themes](https://github.com/secure-77/Perlite/wiki/Themes)
- [Graph Setup and Settings](https://github.com/secure-77/Perlite/wiki/Graph)
- [Perlite Settings](https://github.com/secure-77/Perlite/wiki/03---Perlite-Settings)
- [Troubleshooting](https://github.com/secure-77/Perlite/wiki/Troubleshooting)
## Security
- The [Safemode](https://github.com/erusev/parsedown#security) 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.
## Contributing
Want to contribute? Awesome! Please use the [dev branch](https://github.com/secure-77/Perlite/tree/dev) for pull requests.
## Why Perlite?
[Wiki](https://en.wikipedia.org/wiki/Perlite):
*Perlite is an amorphous volcanic glass ... typically formed by the hydration of obsidian.*
## Previous Versions and Changelog
- [Changelog](https://github.com/secure-77/Perlite/blob/main/Changelog.md)
- [Perlite 1.4.4 Demo](https://perlite.secure77.de/1.4.4)
- [Perlite 1.3 Demo](https://perlite.secure77.de/1.3)

5
Perlite/SECURITY.md Normal file
View File

@ -0,0 +1,5 @@
# Security Policy
## Reporting a Vulnerability
If you have found a vulnerability, please send an email to sec77@ secure77.de or contact me via direct message on Discord sec77#5109

View File

@ -0,0 +1,44 @@
services:
perlite:
image: sec77/perlite:dev
container_name: perlite-build
environment:
- NOTES_PATH=Demo
- HIDE_FOLDERS=docs,private,trash
- HIDDEN_FILE_ACCESS=false
- LINE_BREAKS=true
- ABSOLUTE_PATHS=false
- ALLOWED_FILE_LINK_TYPES=pdf,mp4
- DISABLE_POP_HOVER=true
- SHOW_TOC=true
- SHOW_LOCAL_GRAPH=true
- HOME_FILE=README
- FONT_SIZE=15
- HTML_SAFE_MODE=true
- TEMP_PATH=/tmp
- SITE_TITLE=Demo
- SITE_TYPE=article
- SITE_URL=
- SITE_IMAGE=
- SITE_DESC=
- SITE_NAME=Perlite
- SITE_TWITTER=https://x.com/
- SITE_LOGO=perlite.svg
- SITE_HOMEPAGE=https://perlite.secure77.de/
- SITE_GITHUB=https://github.com/
volumes:
- ./perlite:/var/www/perlite
- ./perlite/Demo:/var/www/perlite/Demo:ro
web:
image: nginx:stable
container_name: perlite_web-build
ports:
- 80:80
volumes:
- ./web/config/perlite.conf:/etc/nginx/conf.d/default.conf:ro
- ./perlite:/var/www/perlite
- ./perlite/Demo:/var/www/perlite/Demo:ro
depends_on:
- perlite

View File

@ -0,0 +1,45 @@
services:
perlite:
image: sec77/perlite:dev
container_name: perlite-dev
restart: unless-stopped
environment:
- NOTES_PATH=Demo
- HIDE_FOLDERS=docs,private,trash
- HIDDEN_FILE_ACCESS=false
- LINE_BREAKS=true
- ABSOLUTE_PATHS=false
- ALLOWED_FILE_LINK_TYPES=pdf,mp4
- DISABLE_POP_HOVER=false
- SHOW_TOC=true
- SHOW_LOCAL_GRAPH=true
- HOME_FILE=README
- FONT_SIZE=15
- HTML_SAFE_MODE=true
- TEMP_PATH=/tmp
- SITE_TITLE=Demo
- SITE_TYPE=article
- SITE_URL=
- SITE_IMAGE=
- SITE_DESC=
- SITE_NAME=Perlite
- SITE_TWITTER=https://x.com/
- SITE_LOGO=perlite.svg
- SITE_HOMEPAGE=https://perlite.secure77.de/
- SITE_GITHUB=https://github.com/
volumes:
- ./perlite/Demo:/var/www/perlite/Demo:ro
web:
image: nginx:stable
container_name: perlite_web
restart: unless-stopped
ports:
- 80:80
volumes:
- ./web/config/perlite.conf:/etc/nginx/conf.d/default.conf:ro
volumes_from:
- perlite
depends_on:
- perlite

View File

@ -0,0 +1,45 @@
services:
perlite:
image: sec77/perlite:latest
container_name: perlite
restart: unless-stopped
environment:
- NOTES_PATH=School
- HIDE_FOLDERS=docs,private,trash
- HIDDEN_FILE_ACCESS=false
- LINE_BREAKS=true
- ABSOLUTE_PATHS=false
- ALLOWED_FILE_LINK_TYPES=pdf,mp4
- DISABLE_POP_HOVER=false
- SHOW_TOC=true
- SHOW_LOCAL_GRAPH=true
- HOME_FILE=README
- FONT_SIZE=15
- HTML_SAFE_MODE=true
- TEMP_PATH=/tmp
- SITE_TITLE=Chewico Docs
- SITE_TYPE=article
- SITE_URL=
- SITE_IMAGE=
- SITE_DESC=
- SITE_NAME=Chewico Docs
- SITE_TWITTER=https://x.com/
- SITE_LOGO=perlite.svg
- SITE_HOMEPAGE=
- SITE_GITHUB=https://git.frostdeer.com/Chewico/School.git
volumes:
- ./perlite/School:/var/www/perlite/School:ro
web:
image: nginx:stable
container_name: perlite_web
restart: unless-stopped
ports:
- 80:80
volumes:
- ./web/config/perlite.conf:/etc/nginx/conf.d/default.conf:ro
volumes_from:
- perlite
depends_on:
- perlite

View File

@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={757:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};r.d(o,{default:function(){return p}});var i=r(757),a=r.n(i);const l=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},s=/^\\begin{/;var d=function(e,t){let n;const r=[],o=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;n=e.search(o),-1!==n;){n>0&&(r.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));const o=t.findIndex((t=>e.startsWith(t.left)));if(n=l(t[o].right,e,t[o].left.length),-1===n)break;const i=e.slice(0,n+t[o].right.length),a=s.test(i)?i:e.slice(t[o].left.length,n);r.push({type:"math",data:a,rawData:i,display:t[o].display}),e=e.slice(n+t[o].right.length)}return""!==e&&r.push({type:"text",data:e}),r};const c=function(e,t){const n=d(e,t.delimiters);if(1===n.length&&"text"===n[0].type)return null;const r=document.createDocumentFragment();for(let e=0;e<n.length;e++)if("text"===n[e].type)r.appendChild(document.createTextNode(n[e].data));else{const o=document.createElement("span");let i=n[e].data;t.displayMode=n[e].display;try{t.preProcess&&(i=t.preProcess(i)),a().render(i,o,t)}catch(o){if(!(o instanceof a().ParseError))throw o;t.errorCallback("KaTeX auto-render: Failed to parse `"+n[e].data+"` with ",o),r.appendChild(document.createTextNode(n[e].rawData));continue}r.appendChild(o)}return r},f=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const l=c(o,t);if(l){for(let e=0;e<a;e++)r.nextSibling.remove();n+=l.childNodes.length-1,e.replaceChild(l,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&f(r,t)}}};var p=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},f(e,n)};return o=o.default}()}));

1244
Perlite/perlite/.js/highlight.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2
Perlite/perlite/.js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
Perlite/perlite/.js/katex.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

27
Perlite/perlite/.js/vis-network.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,73 @@
#!/bin/bash
# update JS dependencies
# force update on asset-packagist
curl https://asset-packagist.org/package/npm-asset/katex -D - >/dev/null
curl https://asset-packagist.org/package/npm-asset/vis-network -D - >/dev/null
curl https://asset-packagist.org/package/npm-asset/jquery -D - >/dev/null
curl https://asset-packagist.org/package/npm-asset/highlightjs--cdn-assets -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/mermaid -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/roughjs -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/stylis -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/mlly -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/tinyexec -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/package-manager-detector -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/iconify--utils -D - >/dev/null
# curl https://asset-packagist.org/package/npm-asset/antfu--install-pkg -D - >/dev/null
# composer clear-cache
# rm -rf vendor
composer update -v
# update highlight js
cp vendor/npm-asset/highlightjs--cdn-assets/highlight.min.js ../.js/
cp vendor/npm-asset/highlightjs--cdn-assets/styles/atom-one-dark.min.css ../.styles/
# update jquery
cp vendor/npm-asset/jquery/dist/jquery.min.js ../.js/
# update katex
cp vendor/npm-asset/katex/dist/katex.min.js ../.js/
cp vendor/npm-asset/katex/dist/contrib/auto-render.min.js ../.js/
cp vendor/npm-asset/katex/dist/katex.min.css ../.styles/
cp -r vendor/npm-asset/katex/dist/fonts ../.styles/
# update mermaid
# cp vendor/npm-asset/mermaid/dist/mermaid.min.js ../.js/
# cp vendor/npm-asset/mermaid/dist/mermaid.min.js.map ../.js/
# update vis-network
cp vendor/npm-asset/vis-network/dist/vis-network.min.js ../.js/
cp vendor/npm-asset/vis-network/dist/vis-network.min.js.map ../.js/
cp vendor/npm-asset/vis-network/dist/dist/vis-network.min.css ../.styles/
# update Parsedown dependencie
cd ..
# composer clear-cache
# rm -rf vendor
composer update -v
#cp perlite/vendor/erusev/parsedown/Parsedown.php perlite/
# remove old container and images
# docker container rm perlite;
# docker container rm perlite_web;
# docker container rm perlite_web_dev;
# docker image rm sec77/perlite_web:stable;
# docker image rm sec77/perlite;
# docker image rm php;
# # rebuild and start
# cd perlite
# docker build -t sec77/perlite:latest . --network host;
# cd ..;
# docker-compose --file docker-compose.yml up

View File

@ -0,0 +1,39 @@
{
"name": "secure-77/perlite",
"description": "A web based markdown viewer optimized for Obsidian Notes",
"version": "1.5.9",
"type": "project",
"keywords": ["markdown viewer","obsidian notes"],
"homepage": "https://github.com/secure-77/Perlite",
"license": "MIT",
"authors": [
{
"name": "secure-77",
"email": "sec77@secure77.de",
"homepage": "https://secure77.de"
}
],
"support": {
"issues": "https://github.com/secure-77/Perlite/issues",
"wiki": "https://github.com/secure-77/Perlite/wiki",
"chat": "https://discord.gg/pkJ347ssWT"
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"config": {
"preferred-install": "dist"
},
"require": {
"npm-asset/vis-network": "^9.1",
"npm-asset/katex": ">=0.16.8",
"npm-asset/jquery": "^3.7",
"npm-asset/highlightjs--cdn-assets": "^11.7"
}
}

82
Perlite/perlite/.scripts/composer.lock generated Normal file
View File

@ -0,0 +1,82 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "804283b252f55afc81b79735bfa0c2c1",
"packages": [
{
"name": "npm-asset/commander",
"version": "8.3.0",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz"
},
"type": "npm-asset",
"license": [
"MIT"
]
},
{
"name": "npm-asset/highlightjs--cdn-assets",
"version": "11.11.1",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/@highlightjs/cdn-assets/-/cdn-assets-11.11.1.tgz"
},
"type": "npm-asset",
"license": [
"BSD-3-Clause"
]
},
{
"name": "npm-asset/jquery",
"version": "3.7.1",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz"
},
"type": "npm-asset",
"license": [
"MIT"
]
},
{
"name": "npm-asset/katex",
"version": "0.16.22",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/katex/-/katex-0.16.22.tgz"
},
"require": {
"npm-asset/commander": ">=8.3.0,<9.0.0"
},
"type": "npm-asset",
"license": [
"MIT"
]
},
{
"name": "npm-asset/vis-network",
"version": "9.1.9",
"dist": {
"type": "tar",
"url": "https://registry.npmjs.org/vis-network/-/vis-network-9.1.9.tgz"
},
"type": "npm-asset",
"license": [
"(Apache-2.0 OR MIT)"
]
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@ -0,0 +1,93 @@
import json
import hashlib
def remove_extension(path):
return path[:-3]
def check_array(node_path):
return True
json_metadata_file = "../Demo/metadata.json"
metadata_temp_file = "/tmp/metadata.temp"
metadata_temp_file_sum = "/tmp/metadata.md5"
with open(json_metadata_file, "r") as file:
json_data = file.read()
if json_data is None:
exit()
json_obj = json.loads(json_data)
if not isinstance(json_obj, list):
exit()
graph_nodes = []
graph_edges = []
current_node = -1
node_id = 0
# create nodes
for node in json_obj:
node_path = remove_extension(node['relativePath'])
if check_array(node_path):
graph_nodes.append({'id': node_id, 'label': node['fileName'], 'title': node_path})
node_id += 1
target_id = -1
source_id = -1
for node in json_obj:
node_path = remove_extension(node['relativePath'])
if check_array(node_path):
if 'links' in node:
for link in node['links']:
source = ""
target = ""
if 'relativePath' in node:
temp_path = remove_extension(node['relativePath'])
if check_array(temp_path):
source = temp_path
if 'relativePath' in link:
temp_path = remove_extension(link['relativePath'])
if check_array(temp_path):
target = temp_path
if source and target:
for element in graph_nodes:
element_title = element['title']
if element_title == target:
target_id = element['id']
if element_title == source:
source_id = element['id']
edge_exists = any(
edge['from'] == source_id and edge['to'] == target_id or
edge['to'] == source_id and edge['from'] == target_id
for edge in graph_edges
)
if target_id != -1 and source_id != -1:
if not edge_exists:
graph_edges.append({'from': source_id, 'to': target_id})
target_id = -1
source_id = -1
my_graph_nodes = json.dumps(graph_nodes, separators=(',', ':'), ensure_ascii=False)
my_graph_edges = json.dumps(graph_edges, separators=(',', ':'), ensure_ascii=False)
graph_html = f'<div id="allGraphNodes" style="display: none">{my_graph_nodes}</div><div id="allGraphEdges" style="display: none">{my_graph_edges}</div>'
with open(metadata_temp_file, "w") as file:
file.write(graph_html)
with open(metadata_temp_file_sum, "w") as file_handler:
md5_filesum = hashlib.md5()
with open(json_metadata_file, "rb") as json_file:
while chunk := json_file.read(8192):
md5_filesum.update(chunk)
file_handler.write(md5_filesum.hexdigest())

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}

View File

@ -0,0 +1 @@
<svg fill="#ffffff" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Font Awesome</title><path d="M24 .857v18c-3.375 1.232-4.393 1.714-6.375 1.714-3.375 0-4.66-1.714-8.036-1.714-1.071 0-1.928.214-2.732.429v-3.429c.804-.214 1.661-.428 2.732-.428 3.375 0 4.661 1.714 8.036 1.714 1.071 0 1.875-.16 2.946-.482V5.518C19.5 5.839 18.696 6 17.625 6c-3.375 0-4.66-1.714-8.036-1.714-2.732 0-4.017 1.125-6.16 1.553v16.447A1.693 1.693 0 011.714 24 1.693 1.693 0 010 22.286V1.714A1.693 1.693 0 011.714 0 1.693 1.693 0 013.43 1.714v.697C5.572 1.982 6.857.857 9.589.857c3.375 0 4.661 1.715 8.036 1.715 1.982 0 3-.483 6.375-1.715Z"/></svg>

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
<svg fill="#ffffff" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>

After

Width:  |  Height:  |  Size: 837 B

1
Perlite/perlite/.styles/katex.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,183 @@
.logo {
position: fixed;
top: 8px;
left: 5px;
}
.custom-page {
text-align: center;
border-bottom: var(--divider-width) solid var(--divider-color);
}
.custom-page-logo {
border-radius: 50%;
width: 130px;
}
.social-logo {
width: 20px;
}
.social-media-list {
padding-left: 10px;
list-style-type: none;
}
.social-media-list li {
display: inline-block;
padding-right: 10px;
}
.sm-site-title {
padding-top: 0px;
padding-bottom: 10px;
}
.sm-site-desc {
padding-bottom: 10px;
max-width: 80%;
display: inline-block;
}
.sidebar-toggle-button.mod-left {
position: relative;
width: unset;
}
.collapse:not(.show) {
display: none;
}
.workspace-split.mod-vertical.mod-root {
min-width: 400px;
}
/* fix graph canvas height */
#localGraph {
border: calc(0.5px + var(--divider-width)) solid var(--divider-color);
height: 50%;
}
#mynetwork {
height: 100%;
}
#graph_all{
height: 100%;
}
.is-sidedock-collapse {
display: none;
width: 0%;
}
.nav-buttons-container {
justify-content: right !important;
}
img {
display: initial !important;
max-width: 100%;
}
.images.center {
display: block !important;
margin-left: auto;
margin-right: auto;
}
.images.right {
display: block !important;
margin-left: auto;
margin-right: 0;
}
.popup-icon {
padding-bottom: 1px;
top: -6px;
position: relative;
left: 3px;
}
#loading-text {
position: absolute;
top: 8px;
}
.inline-title {
padding-bottom: 30px;
}
#mdContent h1:nth-of-type(1) {
padding-top: 0px !important;
}
h1, h2, h3, h4 {
padding-top: 30px;
}
.sidebar-top h3{
padding-top: 0px !important;
margin-top: 0px !important;
}
.toc-item {
padding-left: 10px !important;
}
.metadata-text {
line-height: 1.9;
text-indent: 5px;
}
.is-collapsed-callout {
display: none;
}
.callout-title-inner * {
display: inline !important;
}
span.cm-highlight {
background-color: var(--text-highlight-bg);
color: var(--text-normal);
}
#tags_container {
margin-top: 30px;
}
/* --------------- */
/* Mobile / Responive Settings */
@media screen and (max-width: 990px) {
.workspace-split.mod-horizontal.mod-right-split {
display: none;
}
.workspace-split.mod-horizontal.mod-left-split {
width: 90vw !important;
max-width: 300px !important;
}
.markdown-preview-view {
padding: 10px !important;
}
.sidebar-toggle-button.mod-right {
display: none;
}
.workspace-split.mod-vertical.mod-root {
min-width: unset;
}
#mdContent {
padding-right: 30px;
}
}

Some files were not shown because too many files have changed in this diff Show More