Skip to content

Commit

Permalink
fix excerpt extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Nov 16, 2022
1 parent a7685f5 commit 9942d7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).

## [0.3.1] - 2022-11-16
### Fixed
- Excerpt post extraction.

## [0.3.0] - 2022-11-11
### Added
- New `menu_links` option.
Expand All @@ -17,7 +21,7 @@ project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- Code and titles font styles.
- Excerpt post extraction
- Excerpt post extraction.

## [0.2.1] - 2022-10-10
### Removed
Expand Down Expand Up @@ -49,6 +53,7 @@ First version
[#1]: https://github.com/lumeland/theme-simple-blog/issues/1
[#5]: https://github.com/lumeland/theme-simple-blog/issues/5

[0.3.1]: https://github.com/lumeland/theme-simple-blog/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/lumeland/theme-simple-blog/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/lumeland/theme-simple-blog/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/lumeland/theme-simple-blog/compare/v0.1.1...v0.2.0
Expand Down
4 changes: 2 additions & 2 deletions plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export default function (options: Options = {}) {
.copy("fonts")
.copy("favicon.png")
.preprocess([".md"], (page: Page) => {
page.data.excerpt ??= (page.data.content as string).toLowerCase().split(
/<!--\s*more\s*-->/,
page.data.excerpt ??= (page.data.content as string).split(
/<!--\s*more\s*-->/i,
)[0];
});

Expand Down

0 comments on commit 9942d7c

Please sign in to comment.