From bf742823b0f5cfba13b7b3b043d112e1d14a7ae3 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Fri, 7 Nov 2025 16:35:47 +0100 Subject: [PATCH] Ditch the idea of defaulting to README.md --- libraries/Library/Std/Infrastructure/Github.md | 13 ------------- libraries/Repositories/Std.md | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/libraries/Library/Std/Infrastructure/Github.md b/libraries/Library/Std/Infrastructure/Github.md index ba69401e..730ee93c 100644 --- a/libraries/Library/Std/Infrastructure/Github.md +++ b/libraries/Library/Std/Infrastructure/Github.md @@ -10,7 +10,6 @@ Support for [SilverBullet Share](https://silverbullet.md/Share) for: As well as URI support (both read and write) for the following schemes: * `github:username/repo@branch/path` * `github:username/repo/path` (defaults to `main` branch) -* `github:username/repo` (defaults to `main` branch and `README.md` path) * `https://github.com/username/repo/blob/branch/path` * `https://gist.github.com/username/gist-id` @@ -188,10 +187,6 @@ service.define { if not branch then branch = "main" end - if not path then - -- default to README.md - path = "README.md" - end local fullUrl = "https://github.com/" .. owner .. "/" .. repo .. "/blob/" .. branch .. "/" .. path -- Redirect to full URI implementation net.writeURI(fullUrl, data.content) @@ -207,10 +202,6 @@ service.define { run = function(data) local uri = data.uri:sub(#"ghr:"+1) local owner, repo, path = table.unpack(uri:split("/")) - if not path then - -- default to README.md - path = "README.md" - end local repoClean, version = table.unpack(repo:split("@")) local url if not version or version == "latest" then @@ -250,10 +241,6 @@ service.define { if not branch then branch = "main" end - if not path then - -- default to README.md - path = "README.md" - end local url = "https://raw.githubusercontent.com/" .. owner .. "/" .. repo .. "/" .. branch .. "/" .. path local res = net.proxyFetch(url) if res.status != 200 then diff --git a/libraries/Repositories/Std.md b/libraries/Repositories/Std.md index 5b538532..23fdff49 100644 --- a/libraries/Repositories/Std.md +++ b/libraries/Repositories/Std.md @@ -4,8 +4,8 @@ Here are a few vetted libraries to get you started. ```#meta/library/remote name: Mermaid -uri: github:silverbulletmd/silverbullet-mermaid +uri: github:silverbulletmd/silverbullet-mermaid/README.md --- name: Silversearch -uri: ghr:zefhemel/silversearch@edge +uri: ghr:zefhemel/silversearch@edge/README.md ```