Skip to content
Merged

1.6.1 #178

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5938b8c
support zettelkasten filenames
smtucker Jun 3, 2025
a84f2e1
fix: replace deprecated utf8_decode() with mb_strlen() and null coale…
dewillepl Aug 30, 2025
93b8242
Merge pull request #164 from dewillepl:fix/php82-single-change
secure-77 Nov 5, 2025
0d4c2ff
added support to open the nav tree and mark the entry as active
secure-77 Nov 5, 2025
e7fac3a
Merge remote-tracking branch 'origin/dev' into pr/smtucker/159
secure-77 Nov 5, 2025
dcc0140
Merge pull request #159 from smtucker:main
secure-77 Nov 5, 2025
338a1b0
fixed issue Change theme.css over app.css priority
secure-77 Nov 5, 2025
61d3c17
added issue option to add more highlight.js languages
secure-77 Nov 5, 2025
b1bd874
sustainable mb_strlen / strlen / utf8_decode fix
secure-77 Nov 5, 2025
3e8490c
removed border from local graph
secure-77 Nov 12, 2025
e8a9d92
removed border from custom page section
secure-77 Nov 12, 2025
cb6162e
added headline copy Copy Link to Headline Reference Button
secure-77 Nov 12, 2025
990a35e
implemented perlite.js need to use the URI_PATH env
secure-77 Nov 12, 2025
8a376bb
Show random note button only when graph data is availible
secure-77 Nov 12, 2025
c1748f1
pop over fixes and implement option to use relative markdown links
secure-77 Nov 13, 2025
f0f8886
implemented Hidden text displayed
secure-77 Nov 13, 2025
ba94dd1
issue rendering bug in code blocks
secure-77 Dec 26, 2025
c7722e4
issue Wikilinks/image within tables formatting bug
secure-77 Dec 27, 2025
6d19bb0
implemented nice links and fixed Code blocks with new lines are broke…
secure-77 Dec 27, 2025
a66d9c0
fixed quotation mark missmatches
secure-77 Jan 16, 2026
97ee90c
dependency updates
secure-77 Jan 16, 2026
8b25a43
added calling note
secure-77 Jan 16, 2026
ad2e443
update to the latest app.css + style adjustments
secure-77 Jan 21, 2026
da95eff
fixed tags display issue
secure-77 Jan 21, 2026
a3e3b08
style and formatting changes
secure-77 Jan 21, 2026
3a763f6
fix inline title not set
secure-77 Jan 21, 2026
aa771ba
removed depedency for php yaml extension
secure-77 Jan 21, 2026
bdb4395
cleanup
secure-77 Jan 21, 2026
0414343
security.txt
secure-77 Jan 21, 2026
b0ef22b
cleanup variables
secure-77 Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@ 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
perlite/Demo/Demo Documents/test
perlite/Demo/Demo Documents/test/*
22 changes: 22 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## 1.6.1
- Support Zettelkasten Filenames, use with caution! - PR [#159](https://github.com/secure-77/Perlite/pull/159) thanks to @smtucker
- replaced deprecated utf8_decode() - PR [#164](https://github.com/secure-77/Perlite/pull/164) thanks to @dewillepl
- fixed theme issue [#167](https://github.com/secure-77/Perlite/issues/167)
- implemented issue (additional highlight.js support) [#173](https://github.com/secure-77/Perlite/issues/173)
- sustainable mb_strlen / strlen / utf8_decode fix
- added headline copy link button [#156](https://github.com/secure-77/Perlite/issues/156)
- show random button only when graph-data is availible [#168](https://github.com/secure-77/Perlite/issues/168)
- fixed some pop hover issues (use with 100%) and show content
- implemented hidden text feature [#160](https://github.com/secure-77/Perlite/issues/160)
- eleminated regex-based post-processing by implementing it into PerliteParsedown, this fixed issue [#177](https://github.com/secure-77/Perlite/issues/177)
- implemented support for internal Markdown Links [#170](https://github.com/secure-77/Perlite/issues/170)
- implemented support for parameter based obsidian image attribute syntax to fix issue [#142](https://github.com/secure-77/Perlite/issues/142)
- implemented support for "nice" internal links, this way always the filename only will be displayed without the path
- fixed issue [#172](https://github.com/secure-77/Perlite/issues/172)
- updated katex to 0.16.27
- updated vis-network to 9.1.13
- update mermaid to 11.12.2 and re-integrate the dependency directly
- update to the latest app.css + style adjustments, fixed tags display issue
- removed depedency for php yaml extension


## 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
Expand Down
3 changes: 3 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ services:
- LINE_BREAKS=true
- ABSOLUTE_PATHS=false
- ALLOWED_FILE_LINK_TYPES=pdf,mp4
- HIGHLIGHTJS_LANGS=powershell
- DISABLE_POP_HOVER=false
- NICE_LINKS=true
- SHOW_TOC=true
- SHOW_LOCAL_GRAPH=true
- HOME_FILE=README
- FONT_SIZE=15
- HTML_SAFE_MODE=true
- ZETTELKASTEN_FILENAMES_ENABLED=false
- TEMP_PATH=/tmp
- SITE_TITLE=Demo
- SITE_TYPE=article
Expand Down
9 changes: 6 additions & 3 deletions docker-compose-build.yml → docker-compose-test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
services:
perlite:
image: sec77/perlite:dev
container_name: perlite-build
image: sec77/perlite:test
container_name: perlite-test
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
- HIGHLIGHTJS_LANGS=powershell
- DISABLE_POP_HOVER=true
- NICE_LINKS=true
- SHOW_TOC=true
- SHOW_LOCAL_GRAPH=true
- HOME_FILE=README
- FONT_SIZE=15
- HTML_SAFE_MODE=true
- ZETTELKASTEN_FILENAMES_ENABLED=false
- TEMP_PATH=/tmp
- SITE_TITLE=Demo
- SITE_TYPE=article
Expand All @@ -32,7 +35,7 @@ services:

web:
image: nginx:stable
container_name: perlite_web-build
container_name: perlite_web-test
ports:
- 80:80
volumes:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ services:
- LINE_BREAKS=true
- ABSOLUTE_PATHS=false
- ALLOWED_FILE_LINK_TYPES=pdf,mp4
- HIGHLIGHTJS_LANGS=powershell
- DISABLE_POP_HOVER=false
- NICE_LINKS=true
- SHOW_TOC=true
- SHOW_LOCAL_GRAPH=true
- HOME_FILE=README
- FONT_SIZE=15
- HTML_SAFE_MODE=true
- ZETTELKASTEN_FILENAMES_ENABLED=false
- TEMP_PATH=/tmp
- SITE_TITLE=Demo
- SITE_TYPE=article
Expand Down
2 changes: 1 addition & 1 deletion perlite/.js/katex.min.js

Large diffs are not rendered by default.

2,811 changes: 2,811 additions & 0 deletions perlite/.js/mermaid.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions perlite/.js/mermaid.min.js.map

Large diffs are not rendered by default.

89 changes: 70 additions & 19 deletions perlite/.js/perlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@

//// load default settings

// define perlite location on webserver
//var uriPath = '/perlite/'
var uriPath = '/'


// define home file
var homeFile = "README";

if ($('#index').data('option')) {

homeFile = $('#index').data('option');
}

// define uri path
var uriPath = '/'

if ($('#uri_path').data('option')) {
uriPath = $('#uri_path').data('option');
}

// disable pophovers
if ($('#disablePopHovers').data('option') == true && localStorage.getItem("disablePopUp") === null) {

Expand Down Expand Up @@ -235,16 +237,16 @@ function getContent(str, home = false, popHover = false, anchor = "") {
}

// add Tag section
$('#tags').html("")
$('#mytags').html("")
$('.tag').each(function (index) {
const count = index + 1;
const originalHTML = $(this).prop('outerHTML');
const countTag = '<div class="tree-item-flair-outer"><span class="tree-item-flair" id="nodeCount">' + count + '</span></div>';
$('#tags').append(originalHTML);
$('#mytags').append(originalHTML);
});

// hide them when no tags are found
if ($('#tags').html() == "") {
if ($('#mytags').html() == "") {
$('#tags_container').css('display', 'none')
} else {
$('#tags_container').css('display', 'block')
Expand Down Expand Up @@ -375,7 +377,13 @@ function getContent(str, home = false, popHover = false, anchor = "") {
var target = urlParams.get('link');
target = encodeURIComponent(target);
} else {
target = unslugURL(window.location.pathname)
target = unslugURL(this.pathname)
target = encodeURIComponent(target);
}


if (this.href.split('#').length > 1) {
return;
}

// get content of link
Expand All @@ -394,15 +402,19 @@ function getContent(str, home = false, popHover = false, anchor = "") {
}
mdContent = $("#mdContent")[0]

// handle pop up and hover
// handle pop up and hover
} else {


if (result.trim() == "") {
return;
}
// set content
$("#mdHoverContent").html(result);
$("#popUpContent").html(result);

// set title
var title = $("div.mdTitleHide")[1].innerText;
var title = $("div.mdTitleHide").eq(1).text() || "";
title = title.substring(1)
titleElements = title.split('/')
title = titleElements.splice(-1)
Expand Down Expand Up @@ -448,6 +460,47 @@ function getContent(str, home = false, popHover = false, anchor = "") {
}


// Add copyable anchors to all headings (h1–h6)
document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((heading) => {

// Skip if heading already has a copy icon
if (heading.querySelector(".copy-icon")) return;

// Ensure each heading has an ID (generate one if missing)
if (!heading.id) {
heading.id = heading.textContent
.trim()
.toLowerCase()
.replace(/\s+/g, "-")
.replace(/[^\w-]/g, "");
}

// Create the copy icon
const copyLink = document.createElement("span");
copyLink.className = "copy-icon";
copyLink.textContent = "#";
copyLink.title = "Copy link to clipboard";

// Append the icon to the heading
heading.appendChild(copyLink);

// Add click event to copy link
copyLink.addEventListener("click", (event) => {
event.preventDefault();
const url = `${window.location.origin}${window.location.pathname}#${heading.id}`;
navigator.clipboard.writeText(url);

// Visual feedback
copyLink.classList.add("copied");
copyLink.textContent = "✅";
setTimeout(() => {
copyLink.textContent = "#";
copyLink.classList.remove("copied");
}, 1000);
});
});


// run mobile settings
isMobile();

Expand Down Expand Up @@ -526,6 +579,7 @@ function renderGraph(modal, path = "", filter_emptyNodes = false, show_tags = tr
// no graph found exit
if ($("#allGraphNodes").length == 0 || $("#allGraphNodes").text == '[]') {
console.log("Graph: no data found")
document.getElementById("random_note").style.display = "none";
return;
}

Expand Down Expand Up @@ -1052,10 +1106,11 @@ function openNavMenu(target, openAll = false) {

// open nav menu to target
var navId = decodeURIComponent(target);
linkname = navId.match(/([^\/]*)\/*$/)[1]


// search and open tree reverse
navId = navId.replace(/[^a-zA-Z0-9\-]/g, '_');

navId = 'fileid-' + navId;
var next = $('#' + navId).parent().closest('.collapse');

do {
Expand All @@ -1067,13 +1122,9 @@ function openNavMenu(target, openAll = false) {
}
while (next.length != 0);

// mark active
$('#' + navId).addClass('perlite-link-active is-active');

// set focus to link
var searchText = linkname;

$("div").filter(function () {
return $(this).text() === searchText;
}).parent().addClass('perlite-link-active is-active');

};

Expand Down
6 changes: 3 additions & 3 deletions perlite/.js/vis-network.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion perlite/.js/vis-network.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions perlite/.scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

# update JS dependencies
# call it from perlite/.scripts/ folder

# force update on asset-packagist
curl https://asset-packagist.org/package/npm-asset/katex -D - >/dev/null
Expand Down
2 changes: 1 addition & 1 deletion perlite/.scripts/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "secure-77/perlite",
"description": "A web based markdown viewer optimized for Obsidian Notes",
"version": "1.5.9",
"version": "1.6.1",
"type": "project",
"keywords": ["markdown viewer","obsidian notes"],
"homepage": "https://github.com/secure-77/Perlite",
Expand Down
8 changes: 4 additions & 4 deletions perlite/.scripts/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading