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

Create directive for glossary/terminology overviews (A-Z) #730

Closed
garvinhicking opened this issue Sep 2, 2024 · 5 comments · Fixed by #823
Closed

Create directive for glossary/terminology overviews (A-Z) #730

garvinhicking opened this issue Sep 2, 2024 · 5 comments · Fixed by #823

Comments

@garvinhicking
Copy link
Contributor

In https://docs.typo3.org/m/typo3/writing-guide/main/en-us/writing-principles-and-guidelines/spelling-and-typo3-terminology.html we can see that display is not optimal for an alphabetical list.

We could use a directive that allows to dynamically format such A-Z jump lists, complete with head. Something like:

..  alphabetic-list::
    ..  alpbhapbetic-title: Something something

        lorem ipsum...
    ..  alpbhapbetic-title: Darkside

        lorem ipsum2 ...

that could produce HTML like:

<div class="jumplist" id="jumplist-index">
<a href="#jumplist-d">D</a>
<a href="#jumplist-s">S</a>
</div>
<div class="jumplist-body">
  <div id="jumplist-d">
    <h2>D</h2>
    <div class="body">
        <dl>
           <dt><strong>Darkside</strong> <a href="#jumplist">Back to TOC</a></dt>
          <dd>Lorem ipsum...</dd>
        </dl>
    </div>
  </div>

  <div id="jumplist-s">
    <h2>S</h2>
    <div class="body">
        <dl>
           <dt><strong>Somethingn Something</strong> <a href="#jumplist">Back to TOC</a></dt>
          <dd>Lorem ipsum...</dd>
        </dl>
    </div>
  </div>

</div>
@jaapio
Copy link
Contributor

jaapio commented Sep 4, 2024

This seems to be a list of definition lists to me. Which can be written like:

- A 
  
  Admin
    description
  Allow Fields
    description
- B
  
  Admin
    description
  Allow Fields
    description

Can you give that a try to see if it works for you?

@linawolf
Copy link
Member

Yes it can but it is not nice to have to do that manually, because if you want to change the layout you have to change the list

@linawolf
Copy link
Member

I wonder if we should enhance the glossary directive with some options:

https://sublime-and-sphinx-guide.readthedocs.io/en/latest/glossary.html

@jaapio
Copy link
Contributor

jaapio commented Sep 21, 2024

I agree that it is better to have something autogenerated. Like a registry? But how to select what should be added?

@linawolf
Copy link
Member

Just all definitions within the glossary directive

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

Successfully merging a pull request may close this issue.

3 participants