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

Section headers are not shown as actual headers in this theme. #1463

Closed
rashikiran opened this issue Aug 16, 2023 · 5 comments
Closed

Section headers are not shown as actual headers in this theme. #1463

rashikiran opened this issue Aug 16, 2023 · 5 comments

Comments

@rashikiran
Copy link

rashikiran commented Aug 16, 2023

Section headers are not shown as actual headers in this theme.

I am following version 5 by looking at https://sphinxawesome.xyz/

Example

Header1

Header 2

Both of the above cases are not interpreted with bigger fonts. Same works with html theme "sphinx_rtd_theme"

I had a look at how https://sphinxawesome.xyz/ is built and really liked it. And hence I am trying to build a similar one for programming concepts in C

Could you please help

Is there any configuration options I am missing in conf.py

Below are mine

import os
import sys

sys.path.insert(0, os.path.abspath("_themes"))

#html_theme = 'sphinx_rtd_theme'
#html_theme = 'alabaster'
#html_theme = 'sphinx_book_theme'
html_theme = 'sphinxawesome_theme'
extensions = ["sphinxawesome_theme"]
html_theme_path = ["_themes"]
exclude_patterns = ["_themes"]

extensions += [
"sphinxawesome_theme.highlighting",
"sphinxawesome_theme.docsearch",
"sphinx_favicon",
"ablog",
"sphinx_design",
]
html_show_sphinx = False
html_show_copyright = False
nitpicky = True
primary_domain = None
html_add_permalinks = False
html_permalinks_icon = '#'

@kai687
Copy link
Owner

kai687 commented Aug 16, 2023

Hi @rashikiran and thank you for your kind words. I'm glad you like it.

Could you explain a little more what you mean by Both of the above cases are not interpreted with bigger fonts?

What does your source look like, and what's the result you expected to happen?

@rashikiran
Copy link
Author

rashikiran commented Aug 16, 2023

Hi @kai687,

Thank you for your response. I have built a website "https://wifitutorialspoint.com/" using sphinx_rtd_theme.

I am planning to migrate this site to use "Awesome sphinx theme" and make the site more readable with better navigation.

In sphinx_rtd_theme


Header1
============

Header 2
---------------

is translated to

Header1

Header 2

I was thinking this would work in sphinxawsome_theme as well by looking at site https://sphinxawesome.xyz/

But unfortunately, they are interpreted as just

Header1

Header2

@kai687
Copy link
Owner

kai687 commented Aug 17, 2023

You're right! I reproduced this in a minimal scenario with your conf.py.

It works when you comment out the ablog in your list of extensions.
I don't know how the ablog extension works and what you can configure, but it seems like it's using a different layout compared to 'normal' docs without the ablog extension.

You can see that when you inspect the HTML of the built site.

With ablog, I get:

<main>
  <section id="header-1">
    <h1>

Without ablog, I get:

<main>
  <div>
    <div id="content" role="main">
      <section id="header-1">
        <h1>

Because the styles for the headings are defined as #content h1, you're not seeing the correct styles for h1 when you use the ablog extension.

At the moment, I don't know enough about the ablog extension to say, whether and when I can make the Awesome Theme work with the ablog extension.

@rashikiran
Copy link
Author

@kai687 ,

Thank you very much for kind response.

I have tried the suggestion and it worked. As of now I will continue development of site without ablog.

Thank you for your help. I will take care to review the conf.py settings in future.

@kai687
Copy link
Owner

kai687 commented May 31, 2024

Tested again with version 5.2.0 of this theme and headings seem to be rendered as headings correctly now. Please reopen this issue if this still causes problems.

@kai687 kai687 closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants