Skip to content
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

feat: stop rendering frontmatter #219

Closed
wants to merge 1 commit into from
Closed

Conversation

yan42685
Copy link

@yan42685 yan42685 commented May 23, 2023

The content of some notes may not be fully revealed in search results if they have numerous frontmatter fields. The contrast is depicted in the following pictures:
Before:
before22
After:
after22

Original note:
draft2

@yan42685 yan42685 changed the title Stop rendering frontmatter feat: Stop rendering frontmatter May 23, 2023
@yan42685 yan42685 changed the title feat: Stop rendering frontmatter feat: stop rendering frontmatter May 23, 2023
@yan42685
Copy link
Author

yan42685 commented May 23, 2023

With the release of Obsidian v1.3.3, this PR requires a new commit.

Frontmatter will now still be recognized if there are spaces after the ending ---

@yan42685
Copy link
Author

yan42685 commented May 24, 2023

2023/5/28 Update: I have reset the last commit in this PR.

I have changed my mind and think the last commit is not necessary.

I'm not sure if the switch from === to .trim() === will slow down this plugin when the method file_retriever is called many times. Perhaps it would be better for users to avoid adding spaces after "---", or the frontmatter and dashes would be visible in their search results. Do you think so? @brianpetro

@brianpetro
Copy link
Owner

@yan42685 it's tough to say. The plugin is in need of a major refactor. So what might be problematic now may not be later, vice versa.

I've been developing a companion desktop app ("SC Pro") that fills a lot of gaps in the current plugin and provides some really cool additional features. But, I'm still working on figuring out what the scope will be and how that will affect this plugin.

Regardless, the future of this plugin is going to involve a major refactor and test cases so that contributions like yours can be included with ease.

Thanks for the contribution! This plugin has barely scratched the surface of the possibilities to improve our PKM workflows. And contributions like yours will be best way to realize those possibilities.

I hope to have more updates soon,
Brian 🌴

@yan42685
Copy link
Author

yan42685 commented May 25, 2023

I'm looking forward to your upcoming updates. This is undoubtedly an excellent plugin that makes a significant improvement in how we interact with our notes.

@brianpetro
Copy link
Owner

Frontmatter should now be excluded from Smart View search results since upgrading v2.0.

@yan42685, thanks for making this contribution! My goal with v2.0 is also to make Smart Connections much more amenable to contributions. I still have to put together proper docs on how to contribute, but the code base should already feel a lot cleaner 😊

🌴

@brianpetro brianpetro closed this Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants