-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: frontmatter repeat #302
Comments
I'm really sorry. It was fine after I restarted obsidian |
Please continue the discussion here @tobiasvl |
@Lisandra-dev Yes, I reproduced it just with this minimal file: ---
title: Foo
published: false
synced: true
jekyll_tags:
- foo
---
Foo It's obviously the rewriting of "jekyll_tags" to "tags" that is causing it, as it didn't happen before I added it, but then it happened when I did - and in one front matter it says "jekyll_tags", while the other says "tags" (which is what I want). I've tried with and without regex (it doesn't need regex, but I tested it all the same). My settings: {
"github": {
"branch": "main",
"automaticallyMergePR": true,
"dryRun": {
"enable": false,
"folderName": "github-publisher"
},
"tokenPath": "%configDir%/plugins/%pluginID%/env",
"api": {
"tiersForApi": "Github Free/Pro/Team (default)",
"hostname": ""
},
"workflow": {
"commitMessage": "[PUBLISHER] Merge",
"name": ""
},
"verifiedRepo": true
},
"upload": {
"behavior": "obsidian",
"defaultName": "",
"rootFolder": "",
"yamlFolderKey": "",
"frontmatterTitle": {
"enable": false,
"key": "title"
},
"replaceTitle": [
{
"regex": "",
"replacement": "",
"type": "title"
}
],
"replacePath": [
{
"regex": "/blog",
"replacement": "",
"type": "path"
}
],
"autoclean": {
"enable": false,
"excluded": []
},
"folderNote": {
"enable": false,
"rename": "index.md",
"addTitle": {
"enable": false,
"key": "title"
}
},
"metadataExtractorPath": ""
},
"conversion": {
"hardbreak": false,
"dataview": true,
"censorText": [
{
"entry": "jekyll_title:",
"replace": "title:",
"after": false
}
],
"tags": {
"inline": false,
"exclude": [],
"fields": [
"jekyll_tags"
]
},
"links": {
"internal": true,
"unshared": false,
"wiki": true,
"slugify": "disable"
}
},
"embed": {
"attachments": true,
"overrideAttachments": [],
"keySendFile": [],
"notes": false,
"folder": "../assets/images",
"convertEmbedToLinks": "keep",
"charConvert": "->"
}
} |
I don't know TS, but the problem might be that |
processYaml is used if you use some settings to edit the frontmatter, like the auto adding title and tags. But maybe it create some conflict when you edit it. The only advice I can send you is to uninstall Obsidian Publisher and reinstall it. |
Ah. Yes, that put me on the right track (the processYaml, not the reinstallation). If you keep this issue open a while longer I'll see if I can fix it. |
Yeah, no problem^^ |
see #302 Issue caused by censoring: by not founding the original frontmatter, because it use the frontmatter from cache and not the version censored It stick the two frontmatter together, because it doesn't found the original. Fixed by using the parsing YAML before the censoring
Could you please try the 6.14.2 ? |
@Lisandra-dev Yep, that seems to work! Along the lines of what I thought the issue was. Thank you! |
Issue validation
Command used
Upload single current active note
Plugin version
6.14.1
Describe the bug
When replacing Properties with regular expressions, the frontmatter content will be repeated.
Replacement options:
Run replacement before the other plugin
How to reproduce ?
my own example:
regular expressions:
Replacement options:
Run replacement before the other plugin
Result:
Minimal Reproducible Example
-
Configuration
Relevant log output
No response
OS
Windows
Anything else?
No response
Obsidian information
The text was updated successfully, but these errors were encountered: