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

Avoid PDF-specific single-page formatting for GitHub Pages builds #76

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

d33bs
Copy link
Member

@d33bs d33bs commented Jul 25, 2024

Description

The PDF build of the book content depends on the HTML build. When creating the PDF, the HTML build is modified to entail a "single-page" build which modifies the way navigation works and adds all book content to a single HTML webpage. I noticed this was happening with GitHub Pages builds of the book's content (it's manually fixed in the latest version on gh-pages). This PR keeps these build procedures distinct by creating a copy of the HTML build before building the PDF (which is done separately to avoid the single page changes mentioned).

Thanks for any thoughts or feedback you may have!

Closes #74

What is the nature of your change?

  • Content additions or updates (adds or updates content)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read the CONTRIBUTING.md guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own contributions.
  • I have commented my content, particularly in hard-to-understand areas.
  • I have made corresponding changes to related documentation (outside of book content).
  • My changes generate no new warnings.
  • New and existing tests pass locally with my changes.
  • I have added tests that prove my additions are effective or that my feature works.
  • I have deleted all non-relevant text in this pull request template.

Copy link
Contributor

@falquaddoomi falquaddoomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too bad that jupyter-book makes unexpected changes when building for one format that affect other formats. Anyway, this seems like a reasonable and straightforward workaround.

@d33bs
Copy link
Member Author

d33bs commented Jul 26, 2024

Thanks @falquaddoomi ! Merging this in. Also created jupyter-book/jupyter-book#2180 to help address this for others or in future changes here.

@d33bs d33bs merged commit 5592c02 into software-gardening:main Jul 26, 2024
10 checks passed
@d33bs d33bs deleted the fix-book-build-after-pdf branch July 26, 2024 21:08
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 this pull request may close these issues.

Address singlehtml vs html display of GitHub pages publishing
2 participants