Using CLI with blog
I can't seem to get the CLI to play nice with collections/blogs. It posts as anonymous even when using the b argument.
$ writeas -b thomasjsn publish dev/uctrl-dev/content/about/index.md
https://write.as/g7x6govygs3zf00l
$ writeas -b thomasjsn post
test2
https://write.as/kfpxp2ic682y9m7f
Am I missing something?
Also — can I fetch a single or all posts from collections/blogs?
- https://developers.write.as/docs/api/#retrieve-a-collection-post
- https://developers.write.as/docs/api/#retrieve-collection-posts
I was hoping to use write.as with my workflow of using a local markdown editor and updating the blog using the CLI. Seems that might not be possible at this stage, without using the API directly of course.
Can you try supplying the -b flag after the command (publish / post)? I.e.
writeas publish -b thomasjsn dev/uctrl-dev/content/about/index.md
Unfortunately the argument parsing is a little picky -- something we should probably fix, either way.
Hi @thomasjsn, did changing the placement of the flag fix this issue for you? It's only a work around but just want to check if there is not some other issue.
Also re: fetching, this is something that is planned. You should be able to get and update a post already. But listing all remote posts is not yet implemented, per blog or otherwise.
Have you seen the plans for a file based local workflow? T584? It might be of interest to you.
Hey @robjloranger, I didn't do anymore testing unfortunately. As I did not end up using write.as as my platform.
Publishing with the -b flag after publish works. But there is no way of listing posts that belong to a post? I'd like to have a directory of markdown files mirroring all posts I have published on a write.as blog.
@bluebirch, that is correct. There is currently no way list published posts. Only drafts.
I think the file based workflow that was started would be of interest. https://phabricator.write.as/T584