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

option to use filenames as the title for a post. #5372

Closed
2 tasks done
Ryder17z opened this issue Dec 2, 2023 · 2 comments · Fixed by #5470
Closed
2 tasks done

option to use filenames as the title for a post. #5372

Ryder17z opened this issue Dec 2, 2023 · 2 comments · Fixed by #5470

Comments

@Ryder17z
Copy link

Ryder17z commented Dec 2, 2023

Check List

  • I have already read Docs page.
  • I have already searched existing issues.

Feature Request

I'd like to be able to use the filename of a post as the title or use a tag inside the file to indicate the title it should have, instead of (no title)

To me this seems like a pretty basic feature, but I haven't been able to find anything like it.

Others

No. I do not want to always manage a hexo instance locally just to add new posts. I just want to push an md file and have the title be picked up automatically, like described above.

If a page title could be updated this way, that would be nice but I don't consider it a requirement.

@Ryder17z Ryder17z changed the title option to use filenames or a title tag in files as the title for a post. option to use filenames or a title tag in a post as the title for a post. Dec 2, 2023
@Ryder17z
Copy link
Author

Ryder17z commented Dec 3, 2023

Edit. I have stumbled over a working solution.

---
title: Hello World
date: 2013/7/13 20:46:25
sticky: 100
---

Having this at the top of the file seems to do the trick. But it wasn't easy to find.

@uiolee
Copy link
Member

uiolee commented Dec 21, 2023

I guess this is not a common practice. Also, some characters are not available for file names. But for the title, all characters are acceptable.

If you don't want to use hexo cli, just specify title in the front-matter of the post.


@uiolee uiolee changed the title option to use filenames or a title tag in a post as the title for a post. option to use filenames as the title for a post. Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants