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

Cannot make use of the gitbook.js file #1

Open
Lumerica opened this issue Oct 8, 2024 · 8 comments
Open

Cannot make use of the gitbook.js file #1

Lumerica opened this issue Oct 8, 2024 · 8 comments

Comments

@Lumerica
Copy link

Lumerica commented Oct 8, 2024

Hello,
I tried to use the your instruction as I am trying to save a gitbook link. but I get the following error.

image

@AhmadManzoor
Copy link

update chapterLinksElmSelector: 'body > div > div > aside > div > ul a', in gitbook.js

@henryruhs
Copy link

henryruhs commented Oct 10, 2024

I tried that, but ending up in a loop for https://docs.facefusion.io.

@AhmadManzoor
Copy link

can you try this
https://github.com/AhmadManzoor/gitbook-exporter

@henryruhs
Copy link

@AhmadManzoor works but the output looks not that good - basic typo like headlines are missing

@AhmadManzoor
Copy link

i believe it is generating headlines. YOu can tweak the code according to your needs

@lufengd3
Copy link
Owner

@Lumerica @henryruhs docs.facefusion.io html structure is different from legacy gitbook, we have to modify the selectors, try this https://github.com/lufengd3/htmlbook2pdf/blob/main/gitbook.js#L24

const SITE_CONFIG = {
  chapterLinksElmSelector: 'body > div > div > aside > div > ul a',
  bookContentSelector: 'main',
  headerSelector: 'header',
}

@henryruhs
Copy link

Does not work, again infinity loops.

@lufengd3
Copy link
Owner

Does not work, again infinity loops.

works for me
1
59efec85-a13d-485a-a457-96b8f6fd425f.pdf

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

No branches or pull requests

4 participants