Skip to content

新規ドラフト記事を投稿時、ディレクトリ構成によって記事の格納先が変わる #150

@Mahito

Description

@Mahito

blogsync pull で作成されるディレクトリ構成(entry/${year}/${month}/${day}/)とそうでない場合で記事の格納先が異なり、意図せず EditURL などが反映されないことがある。

  • entry/${year}/${month}/${day}/file の場合: entry/_draft/ に新規ファイルとして PreviewURL などを格納(push したファイルに追記なし)
% blogsync push entry/2023/11/17/test_entry.md
      POST ---> https://blog.hatena.ne.jp/mazinlabs/mahito.hatenablog.com/atom/entry
       201 <--- https://blog.hatena.ne.jp/mazinlabs/mahito.hatenablog.com/atom/entry
     store /Users/mahito/repos/github/mahito.hatenablog.com/entry/_draft/6801883189059489955.md
% blogsync fetch entry/2023/11/17/test_entry.md
     error failed to get blogID form EditURL:
  • 上記以外の場合: push したファイルに追記
% blogsync push entry/2023/11/test_entry.md
      POST ---> https://blog.hatena.ne.jp/mazinlabs/mahito.hatenablog.com/atom/entry
       201 <--- https://blog.hatena.ne.jp/mazinlabs/mahito.hatenablog.com/atom/entry
     store /Users/mahito/repos/github/mahito.hatenablog.com/entry/2023/11/test_entry.md
% blogsync fetch entry/2023/11/test_entry.md
       GET ---> https://blog.hatena.ne.jp/mazinlabs/mahito.hatenablog.com/atom/entry/6801883189059489023
       200 <--- https://blog.hatena.ne.jp/mazinlabs/mahito.hatenablog.com/atom/entry/6801883189059489023

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions