memo icon indicating copy to clipboard operation
memo copied to clipboard

Add config setting for memo filepath format

Open rafi opened this issue 8 years ago • 7 comments

Please allow to configure the memos filename format, and support creation of subdirectories.

For example, create directories for 'year-month/' and filename with 'day-slug.md':

filefmt = "%Y-%m/%d-${SLUG}.md"

💬 Notice the / in format.

Example of current default:

filefmt = "%Y-%m-%d-${SLUG}.md"

I keep my memos in this fashion:

├── 2016-10
│   └── 22-ipsum.md
├── 2016-12
│   ├── 11-foo-bar.md
│   ├── 13-bar-baz.md
│   └── 19-lorem.md
├── 2017-01
│   └── 05-foo.md
└── index.md

rafi avatar Feb 09 '17 08:02 rafi

Thanks. memo is designed for serving files on http server. And the _posts directory can be used to jekyll. If you put _config.yml on the base directory of _posts, it should work blog entries. So if this directory structure works on jekyll, I will do the improvement.

mattn avatar Feb 09 '17 10:02 mattn

Hi! I do not use Jekyll. But I keep several notebooks in Markdown format, and I find memo to be great to manage and write easily. In my honest opinion, your tool memo should not be tightly-coupled to Jekyll, as it can serve other use-cases as-well. Thank you for building this!

The default file-format can be what Jekyll expects, but user can customize it using config, that can be nice.

rafi avatar Feb 09 '17 13:02 rafi

How about using Hugo? So that the app is end to end in Go? @mattn

thewhitetulip avatar Feb 10 '17 11:02 thewhitetulip

I don't like Hugo because templates are not user friendly. I can use but I can't say that all of users like it. One of the choice will be jedie. https://github.com/mattn/jedie if I decide to use server in memo. But currently I won't.

mattn avatar Feb 10 '17 15:02 mattn

I do not know the internal issues with Hugo but I feel that it is faster than Node or Ruby based Static site generators, at least I have found it faster than Hexo. We don't really need to use a server in memo, but maybe a config item for hugo?

thewhitetulip avatar Feb 10 '17 16:02 thewhitetulip

It's not real point of this issue. And I'm not talking about which generator is faster.

mattn avatar Feb 10 '17 16:02 mattn

I know that it isn't about the speed of the underlying static site generator, but like @rafi I don't use jekyll! So as long as we are adding a config item, having one for an Hugo would be great! :-)

thewhitetulip avatar Feb 10 '17 17:02 thewhitetulip