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

Frontmatter Plugin / Page Properties! #207

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ReessKennedy
Copy link

@ReessKennedy ReessKennedy commented Feb 20, 2025

Solution

Simple Frontmatter display that toggles & is hidden by default (See more ideas below the image)

Why

  • Frontmatter / page properties supported by most markdown editors in the world
  • We had a team repo we wanted to try collaborating on with the basic properties (seen in the below gif) but when we tried to sync it with Otter it wasn't parsed and created a real mess and this made me sad so wanted to fix because Otter is otherwise so great.

Otter FrontMatter

More ideas

  • Could add something to selectively remove completely from a page if something like properties: false is set at the page level AND could (probably should) made this a global setting inside editing settings like, "Hide/show page properties" ..... this would not impact people who don't even know what frontmatter is and wouldn't change appearance of anyone's existing site.
  • Inspirations on design here from the way Obsidian does it in a little toggle ... basically the most popular markdown tool in the world right now, I think, so they are probably make good design decisions
  • Piggybacked on existing toggle js used to hide/show content in another plugin and modified the css slightly
  • CSS was stuffed in custom but should, of course, be worked into core if someone agrees this should be a core feature

Larger Screenshot

But see the above gif for behavior on click ...

Otter Wiki Frontmatter

@redimp
Copy link
Owner

redimp commented Feb 24, 2025

Hey @ReessKennedy, I tried out your changes, but it looks like something is missing, I still see a line under the properities:

image

Or is my markdown wrong?

---
draft: false
date: 2025-02-24
---
# Frontmatter

Testing the frontmatter

Side note: Feel free to integrate the css code from the custom css in the otterwiki/static/css/otterwiki.css.

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