The instructions provide clues, but don’t spell out, how to set up org2blog for multiple blogs. https://github.com/punchagan/org2blog

(setq org2blog/wp-blog-alist 
  '(("wordpress" :url "http://username.wordpress.com/xmlrpc.php"
     :username "username"
     :default-title "Hello World"
     :default-categories ("org2blog" "emacs")
     :tags-as-categories nil) 
    ("my-blog" :url "http://username.server.com/xmlrpc.php"
     :username "admin")))

But what if you don’t want to specify your username and password in this multi-site set-up?

The answer lies in expanding on the elisp provided.

(let 

 (creds-stevedowe creds-warpuni creds-status)
 (add-to-list 'auth-sources "~/.netrc") 
 
 (setq creds-stevedowe (auth-source-user-and-password "stevedowe.me")) 
 (setq creds-warpuni (auth-source-user-and-password "warpuni.com")) 
 (setq creds-status (auth-source-user-and-password "status.warphost.net"))

 (setq org2blog/wp-blog-alist 
  `( ("stevedowe.me"
      :url "https://dowe.uk/xmlrpc.php"
      :default-categories ("me" "process" "things" "world")
      :tags-as-categories nil
      :username ,(car creds-stevedowe)
      :password ,(cadr creds-stevedowe)) 

     ("warpuni.com"
      :url "https://warpuni.com/xmlrpc.php"
      :default-categories ("Analytics","BioData","FreeSoftware","Internet","Mobile","News","Productivity","Security","Social" "Support")
      :tags-as-categories nil
      :username ,(car creds-warpuni)
      :password ,(cadr creds-warpuni)) 

     ("status.warphost.net"
      :url "https://status.warphost.net/xmlrpc.php"
      :tags-as-categories nil
      :username ,(car creds-status)
      :password ,(cadr creds-status)))))

[ This is a legacy post. Some details may no longer be relevant to modern software implementations. ]

Have your say!

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)