Closed tohagan closed 7 months ago
https://beta.frontmatter.codes/frontmatter.schema.json
, it fixes it.@tohagan can you verify if the latest beta fixed issue 2?
Still looking into 3.
I was able to reproduce it once. Changed the logic of the filter a bit, and should now be kept visible.
The Content types list is now showing a mixture of content type + language, whereas I think it should just be the content type (post/site) since the language should be selected by just the language filter. I will eventually have lots more languages and potentially more content types so this list would get out of hand if it had all combinations.
I'm also now not seeing English in the Languages list
Cool ... was just confirming that you'd not missed this schema change.
@tohagan I'll change the logic in the Type filter. There it doesn't make sense.
Btw, does the English label ever show up in the language dropdown?
Fixed the types filter, now it should only show you posts
and site
.
Any idea how I can reproduce the locale filter?
Can you do a screen recording of it?
@tohagan changed the locale retrieval logic a bit for the filter.
Yeah that's fixed the Locale list. Well done!
Filtering is now better as I can now filter by Language + Content type for 2 of my 3 languages. However, when I select English I'm seeing NO documents in the list. This happens whether or not a Content type is selected.
I've tested this with a couple of different configurations. For each configuration change, I used ... (a) the refresh button (b) Restarting VSCode
"frontMatter.content.i18n": [
{
"title": "English",
"locale": "en",
"path": "."
},
{
"title": "Hindi",
"locale": "hi",
"path": "../hi"
},
{
"title": "Bengali",
"locale": "bn",
"path": "../bn"
}
],
"frontMatter.content.pageFolders": [
{
"title": "posts",
"path": "[[workspace]]/src/content/posts/en",
"filePrefix": "",
"defaultLocale": "en",
"contentTypes": [
"post"
]
},
{
"title": "site",
"path": "[[workspace]]/src/content/site/en",
"filePrefix": "",
"defaultLocale": "en",
"contentTypes": [
"site"
]
}
],
And also this configuration that IMHO is the most logical to use. The other one will just confuse people.
"frontMatter.content.i18n": [
{
"title": "English",
"locale": "en",
"path": "en"
},
{
"title": "Hindi",
"locale": "hi",
"path": "hi"
},
{
"title": "Bengali",
"locale": "bn",
"path": "bn"
}
],
"frontMatter.content.pageFolders": [
{
"title": "posts",
"path": "[[workspace]]/src/content/posts",
"filePrefix": "",
"defaultLocale": "en",
"contentTypes": [
"post"
]
},
{
"title": "site",
"path": "[[workspace]]/src/content/site",
"filePrefix": "",
"defaultLocale": "en",
"contentTypes": [
"site"
]
}
],
In the LHS panel, the group headings should show Content Type + Locale but currently only show Content Type:
If you'd like to do a joint Zoom session to speed up your testing/fixing cycle. I'd be available today. Your time zone is 9 hours behind me. I have Zoom Pro if needed. Check my profile for email address.
Sent you an email so check Spam if you can't see it.
Thanks, @tohagan; I believe I had enough with the provided configuration. Found the issue on my Windows device, it was related to the file path matching.
Implemented a fix and tested it on my Windows device, now the multilingual content is shown correctly, filters are working and content creation as well.
I think all issues are now fixed. Thank you @estruyf . Greatly appreciated and I think this will be a valued addition for many users.
Thanks @tohagan for testing and also for becoming a sponsor 🙏
Describe the bug
I've had a chance to give the new beta version a workout and found a few issues that I've listed below as a group. You might prefer they be logged as separate issues.
Here's the relevant part of my
fontmatter.json
file:https://frontmatter.codes/frontmatter.schema.json
- Missing schema item for "defaultLocale"To Reproduce + Expected behavior
I haven't yet found a reproducible steps for this bug but I've seen it multiple times now. I suspect what's going is that the condition to display this filter option is in some way related to the list of documents found rather than the existence of the
"frontMatter.content.i18n"
setting.Desktop (please complete the following information):