[24] 옵시디언 사이드바에 노트 배치 및 날짜 링크 자동 생성

페이지 정보

169 조회
4 댓글
2 추천

본문


![[2023-09-27 Wednesday]]%%embed%%

```dataviewjs
// The date format for your periodic/daily notes
const dateFormat = 'YYYY-MM-DD dddd'
// Get the current file
const file = app.vault.getAbstractFileByPath(dv.current().file.path)
// Get the text contents of the current file
let contents = await app.vault.read(file)
// Update any text on the line before %%embed%% to be an embedded link to today's note
contents = contents.replace(/^.*?%%embed%%$/m, '![[' + moment().format(dateFormat) + ']]%%embed%%')
// Save the new contents back to the current file
await app.vault.modify(file, contents)
```

    사변적 실재론(Speculative Realism), 객체지향 존재론 (Object-Oriented Ontology)에 관심이 많으며 연구하고 있습니다.

댓글 4

shunnna님의 댓글의 댓글

@Iam9root님에게 답글 네, Dataview 플러그인이 아무래도 핵심적으로 많이 사용되서 관련 자료들이 더 많아보입니다.ㅎ 생각지도 못한 방법으로 많이들 사용하더군요~
검색 48 / 1 페이지
전체 검색