Some of the problems I have encountered in using doks #401
-
1. index.main.js load exception2. Problems with displaying images in documentsThe page where this problem occurs is here 3. No syntax highlighting for code blocks in the documentI have declared the syntax in the code block, but it doesn't seem to work. And I found the warning log in the console. These issues do not affect the reading of the documentation at the moment, but I would be interested to know how to go about fixing it. Thanks! My documentation website is: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Sorry, I forgot to clarify a situation. I had merged some PRs initiated by dependabot and they were all upgrade dependencies. Is this the main cause of the problem? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello @KevinBlandy, Ad 1) Could not reproduce it with a local production build of KevinBlandy/springcloud.io. Try running the build again. Ad 2) You're missing the <img class="img-fluid" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /> Note, Doks also comes w/ image shortcodes Ad 3) You forgot to configure higlight.js. So, add e.g. java + xml: import java from 'highlight.js/lib/languages/java';
hljs.registerLanguage('java', java);
hljs.registerLanguage('xml', xml); Note, you'll also need to add text, log + properties (and remove languages you don't need /use). Note, you're also getting warnings on unescaped HTML in fenced code blocks. Solution: in |
Beta Was this translation helpful? Give feedback.
Hello @KevinBlandy,
Ad 1) Could not reproduce it with a local production build of KevinBlandy/springcloud.io. Try running the build again.
Ad 2) You're missing the
img-fluid
class on images — see also: Responsive images. Simplest way to add the class is to use the image markdown render hook. Add./layouts/default/markup/render-image.html
w/ something like:Note, Doks also comes w/ image shortcodes
Ad 3) You forgot to configure higlight.js. So, add e.g. java + xml: