Giter VIP home page Giter VIP logo

documentationascode's People

Contributors

amra avatar

Watchers

 avatar  avatar

documentationascode's Issues

Table Of Content contains wrong links

Pandoc runs with --table-of-contents. It add TOC correctly, but it contains wrong links. An exampe is file:///foo/#text, but it should be just #text.

Header is not included

Header is included the same way as footer. Footer is inserted and header is not.

---
title: A demo document
author: Santa Claus
lang: en
header-html: wkhtmltopdf-header.html
footer-html: wkhtmltopdf-footer.html
---

Puppeteer: Failed to launch chrome

Command

docker run -w /foo -v pwd:/foo amra/documentation-as-code:mermaid pandoc -F mermaid-filter -o mermaid-test.html mermaid-test

Log

(node:17) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
[0524/195314.254721:FATAL:zygote_host_impl_linux.cc(126)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
#0 0x55773524f82c base::debug::StackTrace::StackTrace()
#1 0x5577351d6290 logging::LogMessage::~LogMessage()
#2 0x5577341cc5d1 content::ZygoteHostImpl::Init()
#3 0x557734f05d91 content::ContentMainRunnerImpl::Initialize()
#4 0x557734f0fc12 service_manager::Main()
#5 0x557734f04184 content::ContentMain()
#6 0x5577390dca39 headless::(anonymous namespace)::RunContentMain()
#7 0x5577390dcac2 headless::HeadlessBrowserMain()
#8 0x557734f0cf8f headless::HeadlessShellMain()
#9 0x5577334851ac ChromeMain
#10 0x7fa3629f2b45 __libc_start_main
#11 0x55773348502a _start

Received signal 6
#0 0x55773524f82c base::debug::StackTrace::StackTrace()
#1 0x55773524f391 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7fa36886d890 <unknown>
#3 0x7fa362a06067 gsignal
#4 0x7fa362a07448 abort
#5 0x55773524e1e5 base::debug::BreakDebugger()
#6 0x5577351d66da logging::LogMessage::~LogMessage()
#7 0x5577341cc5d1 content::ZygoteHostImpl::Init()
#8 0x557734f05d91 content::ContentMainRunnerImpl::Initialize()
#9 0x557734f0fc12 service_manager::Main()
#10 0x557734f04184 content::ContentMain()
#11 0x5577390dca39 headless::(anonymous namespace)::RunContentMain()
#12 0x5577390dcac2 headless::HeadlessBrowserMain()
#13 0x557734f0cf8f headless::HeadlessShellMain()
#14 0x5577334851ac ChromeMain
#15 0x7fa3629f2b45 __libc_start_main
#16 0x55773348502a _start
  r8: 00007fa368c6f9c0  r9: 0000046575a73800 r10: 0000000000000008 r11: 0000000000000206
 r12: 00007ffe40385ab8 r13: 0000000000000161 r14: 00007ffe40385ac0 r15: 00007ffe40385659
  di: 000000000000001b  si: 000000000000001b  bp: 00007ffe40385600  bx: 00007ffe40385670
  dx: 0000000000000006  ax: 0000000000000000  cx: 00007fa362a06067  sp: 00007ffe403854c8
  ip: 00007fa362a06067 efl: 0000000000000206 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.


TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/usr/local/lib/node_modules/mermaid-filter/node_modules/puppeteer/lib/Launcher.js:255:14)
    at Interface.helper.addEventListener (/usr/local/lib/node_modules/mermaid-filter/node_modules/puppeteer/lib/Launcher.js:244:50)
    at emitNone (events.js:111:20)
    at Interface.emit (events.js:208:7)
    at Interface.close (readline.js:368:8)
    at Socket.onend (readline.js:147:10)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/tmp/tmp-10xRu7uNFc6wns.tmp.png'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at mermaid (/usr/local/lib/node_modules/mermaid-filter/index.js:68:27)
    at /usr/local/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:52:19
    at Array.forEach (<anonymous>)
    at walk (/usr/local/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:50:7)
    at /usr/local/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:74:16
    at Array.forEach (<anonymous>)
    at walk (/usr/local/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:73:20)
    at filter (/usr/local/lib/node_modules/mermaid-filter/node_modules/pandoc-filter/index.js:36:10)
Error running filter mermaid-filter:
Filter returned error status 1

wkhtmltopdf throws "QSslSocket: cannot resolve CRYPTO_num_locks" when using a template

Command

docker run -w /foo -v pwd/test:/foo amra/documentation-as-code pandoc --self-contained --standalone --number-sections --table-of-contents --pdf-engine=wkhtmltopdf wkhtmltopdf.md -o wkhtmltopdf.pdf --template standalone.html

Output

QSslSocket: cannot resolve CRYPTO_num_locks                  ] 10%
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
QSslSocket: cannot call unresolved function SSLv23_client_method2%
QSslSocket: cannot call unresolved function SSL_library_init
Warning: Failed to load https://raw.githubusercontent.com/diversen/pandoc-bootstrap-adaptive-template/master/template.css (ignore)
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Warning: Failed to load https://vjs.zencdn.net/5.4.4/video-js.css (ignore)
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Warning: Failed to load https://vjs.zencdn.net/5.4.4/video.js (ignore)
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Warning: Failed to load https://github.com/diversen/pandoc-bootstrap-adaptive-template/raw/master/menu/css/skins/blue.css (ignore)
Warning: Failed to load https://github.com/diversen/pandoc-bootstrap-adaptive-template/raw/master/menu/menu/css/skins/graphite.css (ignore)
Warning: Failed to load https://github.com/diversen/pandoc-bootstrap-adaptive-template/raw/master/menu/menu/css/skins/grey.css (ignore)
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Warning: Failed to load https://github.com/diversen/pandoc-bootstrap-adaptive-template/raw/master/script.js (ignore)
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method00%
QSslSocket: cannot call unresolved function SSL_library_init
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)                                               
Done                                                                      
Exit with code 1 due to network error: UnknownNetworkError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
Error producing PDF.

Insert page number to footer if wkhtmltopdf is used

wkhtmltopdf is not creating header or footer by default.

pandoc passes parameters footer-html and header-html to wkhtmltopdf but this inserts just text and not fields like page number.

Investigate how to insert page number.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.