mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2025-12-14 10:35:07 +00:00
Add onion location
This commit is contained in:
@@ -20,6 +20,9 @@ let constants = {
|
||||
port: 10407,
|
||||
// You MUST read /src/site/pug/privacy.pug.template before changing has_privacy_policy!
|
||||
has_privacy_policy: false,
|
||||
// If your instance is also available as an onion site, add the onion URL here.
|
||||
// It should look something like "http://3gldbgtv5e4god56.onion" (no trailing slash).
|
||||
onion_location: "http://3gldbgtv5e4god56.onion",
|
||||
|
||||
// Things that server owners _could_ change if they want to.
|
||||
tor: {
|
||||
|
||||
@@ -21,7 +21,8 @@ module.exports = [
|
||||
rssEnabled: constants.feeds.enabled,
|
||||
allUnblocked: history.testNoneBlocked() || assistantSwitcher.displaySomeUnblocked(),
|
||||
torAvailable: switcher.canUseTor(),
|
||||
hasPrivacyPolicy: constants.has_privacy_policy
|
||||
hasPrivacyPolicy: constants.has_privacy_policy,
|
||||
onionLocation: constants.onion_location
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ let commit = ""
|
||||
|
||||
// Set up inner versioning
|
||||
|
||||
const displayVersions = ["1.0", "1.1", "1.2", "1.3", "1.4"]
|
||||
const displayVersions = ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5"]
|
||||
const versions = new Map(displayVersions.map(v => [v, semver.coerce(v)]))
|
||||
const features = [
|
||||
"PAGE_PROFILE",
|
||||
@@ -78,6 +78,11 @@ const innerMap = new Map()
|
||||
canonicalOrigin: constants.website_origin
|
||||
}
|
||||
})
|
||||
addVersion("1.5", {
|
||||
settings: {
|
||||
onionLocation: constants.onion_location
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//- Needs rssEnabled, allUnblocked, torAvailable, hasPrivacyPolicy
|
||||
//- Needs rssEnabled, allUnblocked, torAvailable, hasPrivacyPolicy, onionLocation
|
||||
|
||||
doctype html
|
||||
html
|
||||
@@ -36,6 +36,8 @@ html
|
||||
|
||||
h2 About this instance
|
||||
ul
|
||||
if onionLocation
|
||||
li: a(href=onionLocation) Onion site available
|
||||
li: a(href=settingsReferrer) Settings
|
||||
if hasPrivacyPolicy
|
||||
li: a(href="/privacy") Privacy policy
|
||||
|
||||
@@ -22,7 +22,8 @@ const pinski = new Pinski({
|
||||
"Feature-Policy": deniedFeatures.map(feature => `${feature} 'none'`).join("; "),
|
||||
"Referrer-Policy": "strict-origin",
|
||||
"X-Content-Type-Options": "nosniff"
|
||||
}
|
||||
},
|
||||
onionLocation: constants.onion_location
|
||||
})
|
||||
|
||||
subdirs("pug", async (err, dirs) => {
|
||||
|
||||
Reference in New Issue
Block a user