Skip to content

Building locally #818

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

Open
nolash opened this issue Apr 18, 2025 · 1 comment
Open

Building locally #818

nolash opened this issue Apr 18, 2025 · 1 comment

Comments

@nolash
Copy link

nolash commented Apr 18, 2025

Is this gitbook? I tried build with gitbook and mdbook. Neither worked.

gitbook (3.3.6) gave me:

]$ npx gitbook build
info: 13 plugins are installed 
info: 6 explicitly listed 
info: loading plugin "highlight"... OK 
info: loading plugin "search"... OK 
info: loading plugin "lunr"... OK 
info: loading plugin "sharing"... OK 
info: loading plugin "fontsettings"... OK 
info: loading plugin "theme-default"... OK 
info: found 162 pages 
info: found 928 asset files 
error: error while generating page "README.md": Template render error: (/home/lash/src/build/docs.lightning.engineering/README.md) [Line 5, Column 4]
  unknown block tag: content
    at Object._prettifyError (/home/lash/src/build/docs.lightning.engineering/node_modules/nunjucks/src/lib.js:32:11)
    at Template.render (/home/lash/src/build/docs.lightning.engineering/node_modules/nunjucks/src/environment.js:442:21)
    at Environment.renderString (/home/lash/src/build/docs.lightning.engineering/node_modules/nunjucks/src/environment.js:313:17)
    at Promise.apply (/home/lash/src/build/docs.lightning.engineering/node_modules/q/q.js:1185:26)
    at Promise.promise.promiseDispatch (/home/lash/src/build/docs.lightning.engineering/node_modules/q/q.js:808:41)
    at /home/lash/src/build/docs.lightning.engineering/node_modules/q/q.js:1411:14
    at runSingle (/home/lash/src/build/docs.lightning.engineering/node_modules/q/q.js:137:13)
    at flush (/home/lash/src/build/docs.lightning.engineering/node_modules/q/q.js:125:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:85:11) 

Template render error: (/home/lash/src/build/docs.lightning.engineering/README.md) [Line 5, Column 4]
  unknown block tag: content

mdbook does not work if run in same directory:

$ mdbook build
2025-04-18 23:26:32 [ERROR] (mdbook::utils): Error: Couldn't open SUMMARY.md in "/home/lash/src/build/docs.lightning.engineering/src" directory
2025-04-18 23:26:32 [ERROR] (mdbook::utils):    Caused By: No such file or directory (os error 2)

If i clone the repo into src, then this problem (why on earth are there http:// references in the source):

$ mdbook build
2025-04-18 23:24:11 [ERROR] (mdbook::utils): Error: Unable to create missing chapters
2025-04-18 23:24:11 [ERROR] (mdbook::utils):    Caused By: Unable to create missing file: /dev/shm/lashtmp/jjj/src/https://lightning.engineering/api-docs/api/faraday/
2025-04-18 23:24:11 [ERROR] (mdbook::utils):    Caused By: Is a directory (os error 21)

@nolash
Copy link
Author

nolash commented Apr 18, 2025

Browsing locally with a md viewer doesn't work, because all the files are templates.

Not even the last resort wget --mirror... from your live works with this one. All the nodes are rudely served without redirect to file with .html extension, totally breaking the local copy and will make me have to shell-script renaming a bunch of files.

... not to mention that all links are absolute at root level, so browsing with file:/// is impossible.

I have built many an offline doc in my time, but this is the first time - after 2 wasted hours - I simply have to give up.

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

1 participant