-
Notifications
You must be signed in to change notification settings - Fork 676
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
adding ability to add authors and titles #390
Conversation
@@ -85,6 +85,13 @@ | |||
url: /advanced/netlify | |||
not_numbered: true | |||
|
|||
- title: Beta Features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it a little confusing both to have this section and all of the above sections explicitly marked BETA
. Are you planning to consolidate these ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, these have been consolidated on Master and I'll rebase and fix this one on this PR
" (starting with `# `). If either of these are found, they will be used as the title.\n", | ||
" \n", | ||
"\n", | ||
"## Adding authorship to your book's pages\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be really valuable to have a page with a listed author, just to demo the feature ! Maybe this one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea!
The latest commit updates this a little bit - see the top comment for some extra explanation. It also rebases on master so the concerns about a confusing "beta" section shouldn't be there anymore @emdupre ! The number of files changed is much bigger now because we needed to make sure a title was contained in each content file. Now we no longer specify the title for any pages manually in the TOC, they're all inferred from the content folder |
Gonna merge this in and see how it looks in production. We can tweak titles / authors as needed, happy to discuss more |
Does this feature exist with the new backend? If no, is this planned at all? |
It’s not there now, I think it could be added back in but it will take a bit of thinking. Feel free to open an issue |
Ok, thanks! I just wanted to know whether it still exists, it's not superimportant to me. |
Likewise - I can always add page authors as text in a page but would be good to have this option. I'm assuming the 'new backend' is what is used in |
Yep - this isn't currently possible, but here is an issue to track adding an "author" to pages: #1098 |
This adds a "title" and "author" section to each page of the book (if configured to do so). It's all controlled by edits to
_config.yml
. Below is a section of the docs I added that explains the behavior.An example of how it looks: https://deploy-preview-390--jupyter-book.netlify.com/guide/04_publish.html
Updated explanation
This PR is a bit more complex now, as it re-works the way that titles are handled. This means that we now only require the
toc.yml
file to know the locations of pages, and store each page's title / author within the page metadata itself (rather than relying ontoc.yml
for this). This gives us a bit more flexibility in what metadata we store in each page, at the cost of some extra complexity because we need to manually look-up each page's metadata within the "build" collection in Jekyll.The new behavior will automatically infer all page titles from the page's content. If there is a value specified in
toc.yml
, then it will override whatever is specified in the content. This was the current behavior of JB will remain the same, but if people want to embed the page title with each notebook, they don't have to keep a separate record of the page title intoc.yml
.