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:
parent
94e85dc09e
commit
0a40f1742d
2 changed files with 2 additions and 2 deletions
|
@ -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')
|
||||
|
|
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue