diff --git a/src/logarion_cli.ml b/src/logarion_cli.ml index 4632fe6..59a98a9 100644 --- a/src/logarion_cli.ml +++ b/src/logarion_cli.ml @@ -73,10 +73,17 @@ let create_term = Arg.(value & pos 0 string "" & info [] ~docv:"TITLE" ~doc:"Title for new article") in let f title = - let repo = (conf ()).C.repository in + let conf = conf () in let t = match title with "" -> "Draft" | _ -> title in - let note = Note.({ (blank ()) with meta = { (Meta.blank ()) with Meta.title = t }}) in - File.Lwt.with_note (File.store repo) note + let note = + let meta = + let open Meta in + let author = Author.({ name = conf.C.owner; email = Email.of_string conf.C.email }) in + { (blank ()) with title = t; author } + in + Note.({ (blank ()) with meta }) + in + File.Lwt.with_note (File.store conf.C.repository) note |> Lwt_main.run |> ignore in