mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
minor on default settings
This commit is contained in:
parent
15f4425c4b
commit
5495880c0b
1 changed files with 16 additions and 6 deletions
|
@ -1,19 +1,28 @@
|
||||||
const config = require('../../config')
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const URL = require('url')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const pkg = require('../../../package.json')
|
|
||||||
const crypto = require('crypto')
|
const crypto = require('crypto')
|
||||||
const util = require('util')
|
const { promisify } = require('util')
|
||||||
const generateKeyPair = util.promisify(crypto.generateKeyPair)
|
|
||||||
const sharp = require('sharp')
|
const sharp = require('sharp')
|
||||||
|
const config = require('../../config')
|
||||||
|
const pkg = require('../../../package.json')
|
||||||
|
const generateKeyPair = promisify(crypto.generateKeyPair)
|
||||||
const log = require('../../log')
|
const log = require('../../log')
|
||||||
|
|
||||||
|
|
||||||
|
let defaultHostname
|
||||||
|
try {
|
||||||
|
defaultHostname = new URL.URL(config.baseurl).hostname
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
const defaultSettings = {
|
const defaultSettings = {
|
||||||
title: 'Gancio',
|
title: 'Gancio',
|
||||||
description: 'A shared agenda for local communities',
|
description: 'A shared agenda for local communities',
|
||||||
|
baseurl: config.baseurl || '',
|
||||||
|
hostname: defaultHostname,
|
||||||
instance_timezone: 'Europe/Rome',
|
instance_timezone: 'Europe/Rome',
|
||||||
instance_locale: 'en',
|
instance_locale: 'en',
|
||||||
instance_name: 'gancio', // config.title.toLowerCase().replace(/ /g, ''),
|
instance_name: 'gancio',
|
||||||
instance_place: '',
|
instance_place: '',
|
||||||
allow_registration: true,
|
allow_registration: true,
|
||||||
allow_anon_event: true,
|
allow_anon_event: true,
|
||||||
|
@ -29,7 +38,8 @@ const defaultSettings = {
|
||||||
footerLinks: [
|
footerLinks: [
|
||||||
{ href: '/', label: 'home' },
|
{ href: '/', label: 'home' },
|
||||||
{ href: '/about', label: 'about' }
|
{ href: '/about', label: 'about' }
|
||||||
]
|
],
|
||||||
|
admin_email: config.admin_email || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue