Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CalMacCQ opened this issue Sep 26, 2023 · 1 comment
Open

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

CalMacCQ opened this issue Sep 26, 2023 · 1 comment

Comments

@CalMacCQ
Copy link

CalMacCQ commented Sep 26, 2023

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants