However, the FrontMatter editor fails to pick up those field value and sets a field "date" when I use the Dashboard to update
I am running on the Beta
Any tips appreciated
### Discussed in https://github.com/estruyf/vscode-front-matter/discussions/278
<div type='discussions-op-text'>
<sup>Originally posted by **jmatthewpryor** March 5, 2022</sup>
Hi
I've followed the documentation to try & get custom publish and last mod dates working - so far without success
My workspace editor settings appear correct

And I have edits frontmatter.json in my project also
```
"frontMatter.taxonomy.dateField": "publishedAt",
"frontMatter.taxonomy.modifiedField": "lastMod",
```
However, the FrontMatter editor fails to pick up those field value and sets a field "date" when I use the Dashboard to update
I am running on the Beta
Any tips appreciated</div>
<!-- github-sync-id:1161084870 -->
@jmatthewpryor you will now be able to test it out in the new beta version.
Information to migrate to these new settings can be found here: https://beta.frontmatter.codes/docs/troubleshooting#feature-migrations
<!-- github-comment-id:1060483064 -->
Despite that, when I open an MDX file via the FM dashboard, it auto adds the following to the frontmatter section
date: "{{now}}"
Not sure how to fix that from here
I spoke too soon @estruyf - I keep getting an entry added to my MDX file when I first open the FM edit panel
This is my content defs
```
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"previewPath": null,
"pageBundle": false,
"fields": [
{
"title": "Title",
"name": "title",
"type": "string"
},
{
"title": "Description",
"name": "description",
"type": "string"
},
{
"title": "Publishing date",
"name": "publishedAt",
"type": "datetime",
"default": "{{now}}",
"isPublishDate": true
},
{
"title": "Updated date",
"name": "lastMod",
"type": "datetime",
"default": "{{now}}",
"isModifiedDate": true
},
{
"title": "Article preview",
"name": "preview",
"type": "image"
},
{
"title": "Is in draft",
"name": "draft",
"type": "draft"
},
{
"title": "Tags",
"name": "tags",
"type": "tags"
},
{
"title": "Categories",
"name": "categories",
"type": "categories"
}
]
}
],
```
Despite that, when I open an MDX file via the FM dashboard, it auto adds the following to the frontmatter section
`date: "{{now}}"
`
Not sure how to fix that from here
<!-- github-comment-id:1061315325 -->
@jmatthewpryor if I understand it correctly, when you open an MDX file, without the lastMod or publishedAt date set in your front matter, it gets automatically added?
Ok, accidentally reproduced it, now I understand what is happening 🤓
~~@jmatthewpryor if I understand it correctly, when you open an MDX file, without the `lastMod` or `publishedAt` date set in your front matter, it gets automatically added?~~
Ok, accidentally reproduced it, now I understand what is happening 🤓
<!-- github-comment-id:1061466821 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Discussed in https://github.com/estruyf/vscode-front-matter/discussions/278
Originally posted by jmatthewpryor March 5, 2022
Hi
I've followed the documentation to try & get custom publish and last mod dates working - so far without success
My workspace editor settings appear correct
And I have edits frontmatter.json in my project also
However, the FrontMatter editor fails to pick up those field value and sets a field "date" when I use the Dashboard to update
I am running on the Beta
Any tips appreciated
@jmatthewpryor you will now be able to test it out in the new beta version.
Information to migrate to these new settings can be found here: https://beta.frontmatter.codes/docs/troubleshooting#feature-migrations
works fine for me following those instructions @estruyf
I spoke too soon @estruyf - I keep getting an entry added to my MDX file when I first open the FM edit panel
This is my content defs
Despite that, when I open an MDX file via the FM dashboard, it auto adds the following to the frontmatter section
date: "{{now}}"Not sure how to fix that from here
@jmatthewpryor if I understand it correctly, when you open an MDX file, without thelastModorpublishedAtdate set in your front matter, it gets automatically added?Ok, accidentally reproduced it, now I understand what is happening 🤓
This commit should fix the above issue.
that works for me now too - thanks