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

Note titles are defined twice #10

Open
jokroese opened this issue Jun 29, 2020 · 1 comment
Open

Note titles are defined twice #10

jokroese opened this issue Jun 29, 2020 · 1 comment

Comments

@jokroese
Copy link

Summary

Currently, note titles are defined both in the markdown YAML and in the markdown note title. In practice, these two title formats align apart from a change in formatting (e.g. markdown file 'example-page.md' with YAML title: Example Page). (Reference: https://github.com/aravindballa/notes.aravindballa.com).

The linking seems to be done through the example-page.md title whereas the title display is from the YAML. The fact these two formats are always aligned makes sense as it would feel strange to click on a link to [[Example Page about Trees]] and end up at Example Page about Plants.

Possible alternative approaches

My preference would be to define the markdown files as Example Page.md. I.e. the title of the markdown file is the title of the page. When generating the site, this title could then be automatically made lower case and hyphenated to give the url of each note (notes.com/example-page).

This would both improve usability and avoid issues around mismatched titles.

An added benefit of this approach would be that it would be in line with how Roam exports markdown as well as how Obsidian reads it. It would be great to have parity with those tools! Then we could just export Roam as markdown, drag into content and publish! It would also mean users of the theme could explore and create their notes locally with Obsidian whilst publishing publically with gatsby-theme-andy.

@aravindballa
Copy link
Owner

Creating the markdown files as Example Page.md is already supported. The missing thing is the taking that filename as the title of the page. I think we had some limitation in gatsby-theme-brain (the one which this theme depends on) to get note titles like this. I'll have a look again.

One good thing with having to define YAML is, we can add aliases to one file. For example Book and Books can be the same note.

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

No branches or pull requests

2 participants