gettint org mode title and author thanks to wasamasa added by C-Keen on Wed Jan 11 09:03:29 2023

  (defun get-option (tag)
    (let ((old-pos (point)))
                    (goto-char 0)
                    (goto-char (search-forward tag))
                    (beginning-of-line)
                    (org-element-property :value (org-element-at-point))))

  (let ((title  (get-option "#+TITLE:"))
        (author (get-option "#+AUTHOR:")))
    (setq-local header-line-format
                (book-mode--header :prefix #'book-mode-element-frame-count-icon
                                   :left (propertize title 'face 'nano-strong)
                                   :right author
                                   :suffix #'book-mode-element-dedicated)))