summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/guides/providing-terms.md9
-rw-r--r--lib/config/environment.js3
-rw-r--r--lib/response.js1
-rw-r--r--lib/web/imageRouter/s3.js4
-rw-r--r--locales/de.json1
-rw-r--r--locales/en.json1
-rw-r--r--public/views/index/body.ejs2
7 files changed, 18 insertions, 3 deletions
diff --git a/docs/guides/providing-terms.md b/docs/guides/providing-terms.md
index 1e580df9..73de2b37 100644
--- a/docs/guides/providing-terms.md
+++ b/docs/guides/providing-terms.md
@@ -15,3 +15,12 @@ To add a privacy policy you can use the same technique as for the terms of use.
See our example file `./public/docs/privacy.md.example` container some useful hints for writing your own privacy policy.
As with the terms of use, a link to the privacy notices will show up in the area where the release notes are provided on the index page.
+
+Setup your imprint
+===
+
+To add an imprint you can use the same technique as for the terms of use. The main difference is that the document is called `imprint.md`.
+
+It has to be provided under `./public/docs/` and will be automatically turned into a CodiMD document. It will also automatically updated as soon as you change the document on disk.
+
+As with the terms of use, a link to the imprint will show up in the area where the release notes are provided on the index page.
diff --git a/lib/config/environment.js b/lib/config/environment.js
index d2350e72..716f8b75 100644
--- a/lib/config/environment.js
+++ b/lib/config/environment.js
@@ -41,7 +41,8 @@ module.exports = {
s3: {
accessKeyId: process.env.CMD_S3_ACCESS_KEY_ID,
secretAccessKey: process.env.CMD_S3_SECRET_ACCESS_KEY,
- region: process.env.CMD_S3_REGION
+ region: process.env.CMD_S3_REGION,
+ endpoint: process.env.CMD_S3_ENDPOINT
},
minio: {
accessKey: process.env.CMD_MINIO_ACCESS_KEY,
diff --git a/lib/response.js b/lib/response.js
index 1313f9f4..6450bdf5 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -70,6 +70,7 @@ function showIndex (req, res, next) {
signin: authStatus,
infoMessage: req.flash('info'),
errorMessage: req.flash('error'),
+ imprint: fs.existsSync(path.join(config.docsPath, 'imprint.md')),
privacyStatement: fs.existsSync(path.join(config.docsPath, 'privacy.md')),
termsOfUse: fs.existsSync(path.join(config.docsPath, 'terms-of-use.md')),
deleteToken: deleteToken
diff --git a/lib/web/imageRouter/s3.js b/lib/web/imageRouter/s3.js
index 4effea04..2bf08cc7 100644
--- a/lib/web/imageRouter/s3.js
+++ b/lib/web/imageRouter/s3.js
@@ -43,7 +43,9 @@ exports.uploadImage = function (imagePath, callback) {
}
let s3Endpoint = 's3.amazonaws.com'
- if (config.s3.region && config.s3.region !== 'us-east-1') {
+ if (config.s3.endpoint) {
+ s3Endpoint = config.s3.endpoint
+ } else if (config.s3.region && config.s3.region !== 'us-east-1') {
s3Endpoint = `s3-${config.s3.region}.amazonaws.com`
}
callback(null, `https://${s3Endpoint}/${config.s3bucket}/${params.Key}`)
diff --git a/locales/de.json b/locales/de.json
index f99d8c1f..3f91244a 100644
--- a/locales/de.json
+++ b/locales/de.json
@@ -106,6 +106,7 @@
"Select Visibility Level": "Sichtbarkeit bestimmen",
"Night Theme": "Nachtmodus",
"Follow us on %s and %s.": "Folge uns auf %s und %s.",
+ "Imprint": "Impressum",
"Privacy": "Datenschutz",
"Terms of Use": "Nutzungsbedingungen",
"Do you really want to delete your user account?": "Möchten Sie wirklich Ihr Nutzerkonto löschen?",
diff --git a/locales/en.json b/locales/en.json
index 9a601c04..4f661cf5 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -106,6 +106,7 @@
"Select Visibility Level": "Select Visibility Level",
"Night Theme": "Night Theme",
"Follow us on %s and %s.": "Follow us on %s, and %s.",
+ "Imprint": "Imprint",
"Privacy": "Privacy",
"Terms of Use": "Terms of Use",
"Do you really want to delete your user account?": "Do you really want to delete your user account?",
diff --git a/public/views/index/body.ejs b/public/views/index/body.ejs
index d588766f..9234da2f 100644
--- a/public/views/index/body.ejs
+++ b/public/views/index/body.ejs
@@ -153,7 +153,7 @@
<option value="ar">العربية</option>
</select>
<p>
- <%- __('Powered by %s', '<a href="https://codimd.org">CodiMD</a>') %> | <a href="<%- serverURL %>/s/release-notes" target="_blank" rel="noopener"><%= __('Releases') %></a> | <a href="<%- sourceURL %>" target="_blank" rel="noopener"><%= __('Source Code') %></a><% if(privacyStatement) { %> | <a href="<%- serverURL %>/s/privacy" target="_blank" rel="noopener"><%= __('Privacy') %></a><% } %><% if(termsOfUse) { %> | <a href="<%- serverURL %>/s/terms-of-use" target="_blank" rel="noopener"><%= __('Terms of Use') %></a><% } %>
+ <%- __('Powered by %s', '<a href="https://codimd.org">CodiMD</a>') %> | <a href="<%- serverURL %>/s/release-notes" target="_blank" rel="noopener"><%= __('Releases') %></a> | <a href="<%- sourceURL %>" target="_blank" rel="noopener"><%= __('Source Code') %></a><% if(imprint) { %> | <a href="<%- serverURL %>/s/imprint" target="_blank" rel="noopener"><%= __('Imprint') %></a><% } %><% if(privacyStatement) { %> | <a href="<%- serverURL %>/s/privacy" target="_blank" rel="noopener"><%= __('Privacy') %></a><% } %><% if(termsOfUse) { %> | <a href="<%- serverURL %>/s/terms-of-use" target="_blank" rel="noopener"><%= __('Terms of Use') %></a><% } %>
</p>
<h6 class="social-foot">
<%- __('Follow us on %s and %s.', '<a href="https://github.com/codimd/server" target="_blank" rel="noopener"><i class="fa fa-github"></i> GitHub</a>, <a href="https://community.codimd.org" target="_blank" rel="noopener"><i class="fa fa-users" aria-hidden="true"></i> Discourse</a>, <a href="https://riot.im/app/#/room/#codimd:matrix.org" target="_blank" rel="noopener"><i class="fa fa-comments"></i> Riot</a>, <a href="https://social.codimd.org/mastodon" target="_blank" rel="noopener"><i class="fa fa-mastodon"></i> Mastodon</a>', '<a href="https://translate.codimd.org" target="_blank" rel="noopener"><i class="fa fa-globe"></i> POEditor</a>') %>