feat(admin): add sitemap option to general page

pull/5698/head
Nicolas Giard 3 years ago
parent d5fa587c98
commit 1eefdb06e6
No known key found for this signature in database
GPG Key ID: 85061B8F9D55B7C8

@ -41,7 +41,8 @@
"mrmlnc.vscode-duplicate", "mrmlnc.vscode-duplicate",
"mtxr.sqltools-driver-pg", "mtxr.sqltools-driver-pg",
"mutantdino.resourcemonitor", "mutantdino.resourcemonitor",
"wayou.vscode-todo-highlight" "wayou.vscode-todo-highlight",
"GraphQL.vscode-graphql"
], ],
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.

@ -13,5 +13,5 @@
"i18n-ally.localesPaths": [ "i18n-ally.localesPaths": [
"ux/src/i18n/locales" "ux/src/i18n/locales"
], ],
"i18n-ally.keystyle": "nested" "i18n-ally.keystyle": "flat"
} }

@ -465,6 +465,7 @@ exports.up = async knex => {
search: true search: true
}, },
logoText: true, logoText: true,
sitemap: true,
robots: { robots: {
index: true, index: true,
follow: true follow: true

@ -54,6 +54,7 @@ type Site {
company: String company: String
contentLicense: String contentLicense: String
logoText: Boolean logoText: Boolean
sitemap: Boolean
robots: SiteRobots robots: SiteRobots
features: SiteFeatures features: SiteFeatures
defaults: SiteDefaults defaults: SiteDefaults
@ -130,6 +131,7 @@ input SiteUpdateInput {
company: String company: String
contentLicense: String contentLicense: String
logoText: Boolean logoText: Boolean
sitemap: Boolean
robots: SiteRobotsInput robots: SiteRobotsInput
features: SiteFeaturesInput features: SiteFeaturesInput
defaults: SiteDefaultsInput defaults: SiteDefaultsInput

@ -52,6 +52,7 @@ module.exports = class Site extends Model {
}, },
logoUrl: '', logoUrl: '',
logoText: true, logoText: true,
sitemap: true,
robots: { robots: {
index: true, index: true,
follow: true follow: true

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="80px" height="80px"><path fill="#4788c7" d="M7 19H13V20H7z"/><path fill="#4788c7" d="M7 14H18V15H7z" transform="rotate(-90 12.5 14.5)"/><path fill="#4788c7" d="M7 25H18V26H7z" transform="rotate(-90 12.5 25.5)"/><path fill="#4788c7" d="M24 9H33V10H24z" transform="rotate(-90 28.5 9.5)"/><path fill="#4788c7" d="M12 9H28V10H12zM28 5H38V6H28zM28 13H38V14H28z"/><path fill="#4788c7" d="M24 30H33V31H24z" transform="rotate(-90 28.5 30.5)"/><path fill="#4788c7" d="M13 30H28V31H13zM28 26H38V27H28zM28 34H38V35H28z"/><path fill="#98ccfd" d="M16.5 5.5H24.5V13.5H16.5z"/><path fill="#4788c7" d="M24,6v7h-7V6H24 M25,5h-9v9h9V5L25,5z"/><path fill="#98ccfd" d="M32.5 2.5H38.5V8.5H32.5z"/><path fill="#4788c7" d="M38,3v5h-5V3H38 M39,2h-7v7h7V2L39,2z"/><path fill="#98ccfd" d="M32.5 10.5H38.5V16.5H32.5z"/><path fill="#4788c7" d="M38,11v5h-5v-5H38 M39,10h-7v7h7V10L39,10z"/><path fill="#98ccfd" d="M16.5 26.5H24.5V34.5H16.5z"/><path fill="#4788c7" d="M24,27v7h-7v-7H24 M25,26h-9v9h9V26L25,26z"/><g><path fill="#98ccfd" d="M32.5 23.5H38.5V29.5H32.5z"/><path fill="#4788c7" d="M38,24v5h-5v-5H38 M39,23h-7v7h7V23L39,23z"/></g><g><path fill="#98ccfd" d="M32.5 31.5H38.5V37.5H32.5z"/><path fill="#4788c7" d="M38,32v5h-5v-5H38 M39,31h-7v7h7V31L39,31z"/></g><g><path fill="#dff0fe" d="M1.5 15.5H9.5V23.5H1.5z"/><path fill="#4788c7" d="M9,16v7H2v-7H9 M10,15H1v9h9V15L10,15z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -199,6 +199,7 @@
"admin.general.siteHostnameHint": "Hostname this site should respond to. Set * for catch-all / fallback domain.", "admin.general.siteHostnameHint": "Hostname this site should respond to. Set * for catch-all / fallback domain.",
"admin.general.siteHostnameInvalid": "Invalid Hostname", "admin.general.siteHostnameInvalid": "Invalid Hostname",
"admin.general.siteInfo": "Site Info", "admin.general.siteInfo": "Site Info",
"admin.general.sitemap": "Allow Sitemap",
"admin.general.siteTitle": "Site Title", "admin.general.siteTitle": "Site Title",
"admin.general.siteTitleHint": "Displayed in the top bar and appended to all pages meta title.", "admin.general.siteTitleHint": "Displayed in the top bar and appended to all pages meta title.",
"admin.general.siteTitleInvalidChars": "Site Title contains invalid characters.", "admin.general.siteTitleInvalidChars": "Site Title contains invalid characters.",
@ -1419,5 +1420,6 @@
"tags.retrievingResultsLoading": "Retrieving page results...", "tags.retrievingResultsLoading": "Retrieving page results...",
"tags.searchWithinResultsPlaceholder": "Search within results...", "tags.searchWithinResultsPlaceholder": "Search within results...",
"tags.selectOneMoreTags": "Select one or more tags", "tags.selectOneMoreTags": "Select one or more tags",
"tags.selectOneMoreTagsHint": "Select one or more tags on the left." "tags.selectOneMoreTagsHint": "Select one or more tags on the left.",
"admin.general.sitemapHint": "Make a sitemap.xml available to search engines with all pages accessible to guests."
} }

@ -372,6 +372,20 @@ q-page.admin-general
unchecked-icon='las la-times' unchecked-icon='las la-times'
:aria-label='t(`admin.general.searchAllowFollow`)' :aria-label='t(`admin.general.searchAllowFollow`)'
) )
q-separator.q-my-sm(inset)
q-item(tag='label')
blueprint-icon(icon='genealogy')
q-item-section
q-item-label {{t(`admin.general.sitemap`)}}
q-item-label(caption) {{t(`admin.general.sitemapHint`)}}
q-item-section(avatar)
q-toggle(
v-model='state.config.sitemap'
color='primary'
checked-icon='las la-check'
unchecked-icon='las la-times'
:aria-label='t(`admin.general.sitemap`)'
)
</template> </template>
@ -432,7 +446,12 @@ const state = reactive({
timezone: '', timezone: '',
dateFormat: '', dateFormat: '',
timeFormat: '' timeFormat: ''
} },
robots: {
index: false,
follow: false
},
sitemap: false
} }
}) })
@ -499,6 +518,7 @@ async function load () {
company company
contentLicense contentLicense
logoText logoText
sitemap
robots { robots {
index index
follow follow
@ -559,6 +579,7 @@ async function save () {
company: state.config.company ?? '', company: state.config.company ?? '',
contentLicense: state.config.contentLicense ?? '', contentLicense: state.config.contentLicense ?? '',
logoText: state.config.logoText ?? false, logoText: state.config.logoText ?? false,
sitemap: state.config.sitemap ?? false,
robots: { robots: {
index: state.config.robots?.index ?? false, index: state.config.robots?.index ?? false,
follow: state.config.robots?.follow ?? false follow: state.config.robots?.follow ?? false

Loading…
Cancel
Save