Open rpsu opened 2 years ago
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.
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.
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 underposts/
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:
posts/2022/example.md
withtitle: Example
, commit to gitdev p posts/2022/example.md
dev i -p -s
posts/example.md