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

Daily notes giving en error from Templater #3

Open
zhampu opened this issue Apr 13, 2024 · 3 comments
Open

Daily notes giving en error from Templater #3

zhampu opened this issue Apr 13, 2024 · 3 comments
Assignees

Comments

@zhampu
Copy link

zhampu commented Apr 13, 2024

AS said in the issue:

Im getting this message:

Templater Error: Invalid reference date format, try specifying one with the argument 'reference_format'

@CyanVoxel CyanVoxel self-assigned this Apr 13, 2024
@IngWonk
Copy link

IngWonk commented Apr 16, 2024

Edit (TEMPLATE) Daily file in 99 - Meta/00 - Templates:

---
date: <%tp.date.now("YYYY-MM-DD")%>T<%tp.date.now("HH:mm")%>
tags:
  - Daily
cssclasses:
  - daily
  <% "- " + tp.date.now("dddd").toLowerCase() %>
---
# DAILY NOTE
## <% tp.date.now("dddd, Do MMMM YYYY")%>
***
### Journal
#### TIME
Customize this template to your liking!
...
***
### Tasks
- [ ] Task 1
- [ ] Task 2
- [ ] Task 3

@CyanVoxel
Copy link
Owner

As stated on the main Daily Templates repo README (https://github.com/CyanVoxel/Obsidian-Daily-Themes): "The template references your note's filename for the date and expects a "YYYYMMDD" naming format."

If your filename doesn't match this format, then this is likely the issue you're running into. This was a change made in v1.0.2 CyanVoxel/Obsidian-Daily-Themes@51abd0d in order to allow for creating new notes for previous days with the correct date, instead of always using the current date.

If this is in fact the issue, you could either change your daily note naming format, change the template to match your format (Templater uses https://momentjs.com/ date formats), or you could grab the old template that uses the current date instead of extrapolating it from the filename: https://github.com/CyanVoxel/Obsidian-Daily-Themes/blob/bb1bc8866c18739c3b8a263986496c184a2666a5/(TEMPLATE)%20Daily.md?plain=1

Let me know if one or more of those options is sufficient!

@Rodhor
Copy link

Rodhor commented Apr 30, 2024

I adjusted the daily notes css file to add opacity. In my case it was because I'm using Anupucin theme with a backgrund picture and translucent windows

.daily {
--dark: var(--dark);
color: var(--highlight);
background-color: var(--dark);
--text-normal: var(--highlight);
--text-muted: var(--highlight);
--text-faint: var(--highlight);
--checklist-done-color: var(--highlight);
--metadata-label-text-color: var(--highlight);
--metadata-input-text-color: var(--highlight);
--tag-color: var(--dark);
--tag-background: var(--primary);
--hr-color: var(--primary);
--blockquote-border-color: var(--primary);
--interactive-accent: var(--primary);
--collapse-icon-color-collapsed: var(--primary);
--checkbox-color: var(--primary);
--checkbox-marker-color: var(--dark);
--checkbox-color-hover: var(--highlight);
--checkbox-border-color: var(--highlight);
--list-marker-color: var(--highlight);
--code-background: black;
--code-normal: var(--primary);

--background-modifier-border-focus: var(--primary);
--background-modifier-border: color-mix(in srgb, var(--highlight) 60%, transparent);
--background-modifier-hover: color-mix(in srgb, var(--highlight) 60%, transparent);
--pill-cover-hover: color-mix(in srgb, var(--highlight) 60%, transparent);

opacity: 0.6;
}

Works suprisingly nice with the daily theme

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

4 participants