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

Hide list of authors on particular pages #1664

Open
santisoler opened this issue Nov 20, 2024 · 0 comments
Open

Hide list of authors on particular pages #1664

santisoler opened this issue Nov 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@santisoler
Copy link

Hi everyone! First of all, thanks for developing MyST and the whole environment for Jupyter Books, amazing work!

This is a question/feature proposal. I was wondering if there's a way to hide the list of authors from particular pages. My main use case for it is to have "index" pages that point to several different notebooks (see the following file tree as example). I would like to list all the authors in myst.yml, and list the authors of each notebook (.ipynb file), but avoid having the list of authors in the notebooks/index.md.

.
├── index.md
├── myst.yml
└── notebooks
    ├── content.ipynb
    └── index.md

I know I can override the authors list in the yml header of each notebook or Markdown file. This is useful when trying to specify which person contributed to each particular notebook. But I'm wondering if there's a way to actually hide it.

So long, I found a hacky way to do so by overriding the authors list in the header of the index.md file:

authors: {}

But, an emtpy <header> tag is still created in the HTML file:

<header class="mt-4 not-prose">
  <div>
    <span class="font-semibold text-sm inline-block"
      ><button
        class="focus:shadow-[0_0_0_2px] focus:shadow-black outline-none hover:underline"
        aria-label="Author Details"
        type="button"
        aria-haspopup="dialog"
        aria-expanded="false"
        aria-controls="radix-:R3kfop:"
        data-state="closed"
      ></button
    ></span>
  </div>
</header>

So: is there a way to actually hide the list of authors (without generating an empty header tag)?

Proposal

If currently there's no way to do, I would suggest adding a way of setting authors as an empty list, like:

authors: []

That would hide the list of authors.

@santisoler santisoler added the enhancement New feature or request label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant