ablog icon indicating copy to clipboard operation
ablog copied to clipboard

How to make author info and blog categories appear in built html?

Open CalMacCQ opened this issue 2 years ago • 1 comments

Hi

I have now deployed my blog here (still a WIP).

Ideally I would like the author info, date and topic categoies to appear under each post. See this example from pydata-sphinx-theme.

Screenshot 2023-09-26 at 12 08 11

I'm not sure what I've missed. The categorised files are in the built _website directory but the info does not display with the posts.

I have the following front matter in my markdown source files

---
blogpost: true
date: Sep 8, 2023
author: Callum Macpherson
category: Release
---

# September Release Notes (pytket)

I have the following ablog configuation settings

# ----- ablog config settings -----
ablog_website = "_website"

ablog_builder = "dirhtml"

blog_path = "blog"
blog_baseurl = "https://tket.quantinuum.com/tket-blog/"
blog_title = "TKET Developer Blog"

blog_authors = {
    "Callum Macpherson": ("Callum Macpherson", None),
}

blog_post_pattern = ["posts/*.rst", "posts/*.md"]

blog_feed_archives = True

blog_post_pattern = "blog/*/*"
blog_feed_fulltext = True

# List of Sphinx extensions used
extensions = ["ablog", "myst_parser", "sphinx_copybutton"]

# ----- MyST parser config -----

myst_enable_extensions = ["dollarmath", "html_image"]

myst_update_mathjax = False

Any help would be really appreaciated. Thanks in advance.

CalMacCQ avatar Sep 26 '23 11:09 CalMacCQ

Probably unrelated but I'm getting this BrokenPipeError when serving the html locally

Exception occurred during processing of request from ('127.0.0.1', 53412)
Traceback (most recent call last):
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/http/server.py", line 658, in __init__
    super().__init__(*args, **kwargs)
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/http/server.py", line 665, in do_GET
    self.copyfile(f, self.wfile)
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/http/server.py", line 865, in copyfile
    shutil.copyfileobj(source, outputfile)
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/shutil.py", line 198, in copyfileobj
    fdst_write(buf)
  File "/Users/callum/.pyenv/versions/3.10.6/lib/python3.10/socketserver.py", line 826, in write
    self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe

CalMacCQ avatar Sep 26 '23 12:09 CalMacCQ