Skip to content

Gitbook Theme#332

Open
lacymorrow wants to merge 47 commits into
amiroff:masterfrom
AAM-Institute:gitbook
Open

Gitbook Theme#332
lacymorrow wants to merge 47 commits into
amiroff:masterfrom
AAM-Institute:gitbook

Conversation

@lacymorrow

Copy link
Copy Markdown

This may not be useful since there isn't a great way to define quick and dirty themes with tailwindcss.

I updated some code, fixed some bugs, and changed many styles to be closer to Gitbook.com, as I am replacing Gitbook with Nextbook. Feel free to use it or discard.

image

Thanks for this project.

@vercel

vercel Bot commented Nov 28, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-book ❌ Failed (Inspect) Aug 7, 2024 10:00pm
next-book-soik ❌ Failed (Inspect) Aug 7, 2024 10:00pm

@amiroff

amiroff commented Nov 30, 2022

Copy link
Copy Markdown
Owner

Great work! If you could just tweak contrast for left separator line in dark mode to be more subtle, I am all in for merging this.
image

@lacymorrow

Copy link
Copy Markdown
Author

Thanks for looking it over, the only issue I'm seeing is that code blocks will increase the width of the main content section on smaller resolutions. I added code to styles/app.css#56 that works around the issue but it could be better.

@lacymorrow

Copy link
Copy Markdown
Author

This also changes things like:

  • Adds ability for a chapter heading to have a path property to act as a link (dropdown caret will always act on the dropdown, however)
  • Only highlights a single page in navbar (previously would highlight any page that matched partial paths)
  • Adds a max-width to <pre> tags generated, this may affect the clipboard icon, not sure.

@amiroff

amiroff commented Jan 3, 2023

Copy link
Copy Markdown
Owner

@lacymorrow sorry, has been off the grid for a while.
Let's call this version 3.1. Could you please add some notes on what has been added since 3.0 to the readme file? Since we are going to squash and merge, tracking with commits would not be possible. 🙏🏻

@amiroff

amiroff commented Jan 3, 2023

Copy link
Copy Markdown
Owner

@amiroff fixed the hash in the "Copy Link" component and the code blocks width. Take a look when you can.

For me clicking it does not copy the link unfortunately.

@lacymorrow

Copy link
Copy Markdown
Author

10 months later, fixed the scrollspy and "Copy Link" action.

@amiroff

amiroff commented Sep 25, 2023

Copy link
Copy Markdown
Owner

Going to check ASAP. Thanks for not giving up.

@amiroff

amiroff commented Nov 17, 2023

Copy link
Copy Markdown
Owner

@lacymorrow hte build fails on Vercel, did not try locally though. What about you?

[01:58:47.254] Running build in Washington, D.C., USA (East) – iad1 (Hive)
[01:58:47.356] Cloning github.com/amiroff/NextBook (Branch: gitbook, Commit: 794d05e)
[01:58:47.362] Skipping build cache, deployment was triggered without cache.
[01:58:47.763] Cloning completed: 407.332ms
[01:58:48.005] Running "vercel build"
[01:58:48.493] Vercel CLI 32.5.5
[01:58:48.829] Installing dependencies...
[01:58:49.959] npm ERR! code ERESOLVE
[01:58:49.961] npm ERR! ERESOLVE unable to resolve dependency tree
[01:58:49.961] npm ERR! 
[01:58:49.962] npm ERR! While resolving: next-book@2.1.0
[01:58:49.962] npm ERR! Found: @mdx-js/mdx@2.3.0
[01:58:49.962] npm ERR! node_modules/@mdx-js/mdx
[01:58:49.962] npm ERR!   @mdx-js/mdx@"^2.1.5" from the root project
[01:58:49.962] npm ERR! 
[01:58:49.962] npm ERR! Could not resolve dependency:
[01:58:49.962] npm ERR! peer @mdx-js/mdx@"^1.6.16" from mdx-embed@1.1.2
[01:58:49.962] npm ERR! node_modules/mdx-embed
[01:58:49.962] npm ERR!   mdx-embed@"^1.1.2" from the root project
[01:58:49.962] npm ERR! 
[01:58:49.963] npm ERR! Fix the upstream dependency conflict, or retry
[01:58:49.963] npm ERR! this command with --force or --legacy-peer-deps
[01:58:49.963] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[01:58:49.964] npm ERR! 
[01:58:49.964] npm ERR! 
[01:58:49.964] npm ERR! For a full report see:
[01:58:49.964] npm ERR! /vercel/.npm/_logs/2023-11-17T22_58_49_145Z-eresolve-report.txt
[01:58:49.965] 
[01:58:49.965] npm ERR! A complete log of this run can be found in: /vercel/.npm/_logs/2023-11-17T22_58_49_145Z-debug-0.log
[01:58:49.977] Error: Command "npm install" exited with 1
[01:58:50.111] 

@lacymorrow

lacymorrow commented Nov 19, 2023

Copy link
Copy Markdown
Author

Ok it's an issue with the way the new version of NPM resolves legacy dependencies from NPM < 7+.

Three options:

  • Use yarn, the stable default yarn version doesn't have this issue.
  • Use npm i --force or npm i --legacy-peer-deps to resolve legacy deps
  • Use a forked version of mdx-embed.

I went ahead and forked the repo and updated the dependencies, and pulled them into this PR.
You should be able to run npm i as normal now.

Let me know if you'd like me to update this project's dependencies.

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.

2 participants