0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Changed tag for imported content to be internal (#15934)

refs: 8ed5f9784d

- When importing content from a JSON file in Settings > Labs, a public tag
like `Import 2022-12-03 19:57` gets added to each newly imported post.
- This tag should not be public. It definitely serves a useful
purpose but has no useful function for readers of the site and should
not be shown to readers.
This commit is contained in:
Paul Davis 2022-12-14 16:51:51 +00:00 committed by GitHub
parent 94e85dc09e
commit 0a40f1742d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ module.exports = {
permissions: true,
query(frame) {
const siteTimezone = settingsCache.get('timezone');
const importTag = `Import ${moment().tz(siteTimezone).format('YYYY-MM-DD HH:mm')}`;
const importTag = `#Import ${moment().tz(siteTimezone).format('YYYY-MM-DD HH:mm')}`;
return importer.importFromFile(frame.file, {
user: {
email: frame.user.get('email')

View file

@ -55,7 +55,7 @@ DataImporter = {
importData.data.tags.push({
id: tagId,
name: importOptions.importTag,
slug: slugify(importOptions.importTag)
slug: slugify(importOptions.importTag.replace(/^#/, 'hash-'))
});
if (!('posts_tags' in importData.data)) {
importData.data.posts_tags = [];