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: add option to use slug as title of post #5470

Merged
merged 3 commits into from May 17, 2024
Merged

feat: add option to use slug as title of post #5470

merged 3 commits into from May 17, 2024

Conversation

uiolee
Copy link
Member

@uiolee uiolee commented Apr 18, 2024

What does it do?

use slug as title of post when title is not specified.

closed #5372

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.
  • add to configuration

use `slug` as `title` of post when `title` is not specified.
@coveralls
Copy link

coveralls commented Apr 18, 2024

Pull Request Test Coverage Report for Build 8773964452

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 99.03%

Totals Coverage Status
Change from base Build 8720332933: 0.001%
Covered Lines: 9293
Relevant Lines: 9384

💛 - Coveralls

@stevenjoezhang
Copy link
Member

See also #4344
Adding a new option is a good solution, especially if the theme does not support empty titles

Co-authored-by: Sukka <isukkaw@gmail.com>
Signed-off-by: Uiolee <22849383+uiolee@users.noreply.github.com>
Copy link

How to test

git clone -b filename https://github.com/hexojs/hexo.git
cd hexo
npm install
npm test

@uiolee uiolee merged commit 069ac38 into master May 17, 2024
24 checks passed
@uiolee uiolee deleted the filename branch May 17, 2024 09:07
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.

option to use filenames as the title for a post.
4 participants