Allow local structure for posts
I published a couple of old posts to Dev.to and the process was very smooth. I have markdown file structure with year to allow some structure within the posts lists locally.
posts/
2015/*.md
2017/*.md
However when I pull the posts back from dev.to
dev i -p -s --verbose
the tool does not find the old posts in the subfolders but copies them directly under posts/
Am I missing some configuration option, some flag maybe?
To me this looks like the filename is converted from the front matter title on pull. While it works just fine when publishing pulling does not consider all local files (my existing post files in subfolders) while pushing out works.
Concrete example:
- write post to file
posts/2022/example.mdwithtitle: Example, commit to git - publish it with
dev p posts/2022/example.md - pull all posts with
dev i -p -s - the newly created post (and all other posts) appears now also in the file
posts/example.md
The dev init --pull option was only meant to facilitate the initial import when you're trying to setup you repo, it should not be used for sync'ing back changes coming from the website. There's currently no way to know what was the original folder structure anyways.
That being said, it's on my plans to add a specific command to pull back changes from existing articles from devto, if made changes on the website and want to import them back in your repo. It's a bit tricky as you need to reprocess URLs and reconcile with local changes (if any), so it might take some time.