Skip to content

Commit

Permalink
Calendar tag should contain only up to month
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Mar 2, 2025
1 parent b69bf3b commit 7e567e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/guide/daily-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Emanote has special support for [Obsidian style daily notes](https://help.obsidi
If you create notes named `YYYY-MM-DD.md`, Emanote will treat them as daily notes. This has a couple of effects:

1. The backlinks panel will render daily notes separate from regular notes. The daily notes will be rendered as a "timeline" in reverse chronological order.
2. Each daily note automatically gets a hierarchical tag (eg: `#calendar/2025/03/02`) allowing you to browse them by calendar navigation in the tag index.
2. Each daily note automatically gets a hierarchical tag (eg: `#calendar/2025/03`) allowing you to browse them by calendar navigation in the tag index.
2 changes: 1 addition & 1 deletion emanote/emanote.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: emanote
version: 1.3.27.0
version: 1.3.27.1
license: AGPL-3.0-only
copyright: 2022 Sridhar Ratnakumar
maintainer: [email protected]
Expand Down
4 changes: 2 additions & 2 deletions emanote/src/Emanote/Model/Note.hs
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ applyNoteMetaFilters doc r =
tagsFromBody = HT.inlineTagsInPandoc doc
tagsForDailyNote = maybe mempty dayTags $ Calendar.parseRouteDay r
dayTags day =
let (y, m, d) = toGregorian day
let (y, m, _d) = toGregorian day
pad2 = toText @String . printf "%02d"
in [HT.Tag $ "calendar/" <> show y <> "/" <> pad2 m <> "/" <> pad2 d]
in [HT.Tag $ "calendar/" <> show y <> "/" <> pad2 m]
addDescriptionFromBody =
overrideAesonText ("page" :| ["description"]) $ \case
B.Para is -> [WL.plainify is]
Expand Down

0 comments on commit 7e567e0

Please sign in to comment.