emanote icon indicating copy to clipboard operation
emanote copied to clipboard

Add .emanoteignore

Open srid opened this issue 2 years ago • 8 comments

Like .gitignore but for ignoring files.

Effectively allows overriding the hardcoded paths here: https://github.com/srid/emanote/blob/b3ced121059bb7a688c890f3ee489a9713191132/src/Emanote/Source/Pattern.hs#L34-L40

srid avatar Jan 09 '22 01:01 srid

My main use for this would be to have Emanote ignore Obsidian template files. There are probably other uses, of course.

atomicbird avatar Jan 10 '22 23:01 atomicbird

This would help a lot in only publishing certain folders (i.e. I do not want my Daily Journals published)

JMLegere avatar Apr 26 '22 12:04 JMLegere

Note that when a file is ignored in .emanoteignore, it would be excluded in both static site generation and the live-server view. So, @JMLegere, if you ignore your daily journals in .emanoteignore, they shouldn't appear in the live-server either. This may not be what you intended.

srid avatar Apr 26 '22 14:04 srid

That is my intention. I work daily in my notes and link from my journals to my permanent notes, but want to only have my permanent notes visible in emanote.

Am I understanding this use case correctly?

JMLegere avatar Apr 27 '22 23:04 JMLegere

I work daily in my notes and link from my journals to my permanent notes, but want to only have my permanent notes visible in emanote.

You can achieve this differently.

$ ls 
./daily/2022-04-24.md
./permanent/foo.md
...

Basically, run emanote -L $(pwd)/permanent gen /tmp/output to generate static site for the permanent notes, but emanote -L ./. to start a live server that also includes your daily notes. I use this pattern on my private notebook, where srid.ca lives in a subdirectory (and published on its own, without including my private notes).

srid avatar Apr 27 '22 23:04 srid

I work daily in my notes and link from my journals to my permanent notes, but want to only have my permanent notes visible in emanote.

You can achieve this differently.

$ ls 
./daily/2022-04-24.md
./permanent/foo.md
...

Basically, run emanote -L $(pwd)/permanent gen /tmp/output to generate static site for the permanent notes, but emanote -L ./. to start a live server that also includes your daily notes. I use this pattern on my private notebook, where srid.ca lives in a subdirectory (and published on its own, without including my private notes).

This workaround is a possible solution for my use case, thank you!

JMLegere avatar Apr 28 '22 15:04 JMLegere

This would greatly improve my setup. I use the entire remark ecosystem thus I have a node_modules folder sitting in my root folder.

peri4n avatar Mar 26 '24 12:03 peri4n

This should probably be done in https://github.com/srid/unionmount - then Emanote can inherit it automatically.

srid avatar Mar 26 '24 12:03 srid