Giter Club home page Giter Club logo

Comments (5)

sethyuan avatar sethyuan commented on June 2, 2024

Plugins don't have that much permissions.

If what you want is to share the exported page, I'd recommend you to use Google Chrome to open the exported HTML and print it into a PDF file, for sharing. Just remember to check Background graphics. In this way, you'll practically have 100% accurate PDF conversion.

image

from logseq-plugin-doc.

lion-no-back avatar lion-no-back commented on June 2, 2024

Well, thank you for your suggestion. Sometimes the article is a bit long and the title is more, so I want to generate a directory, export it as an html file, and then I can do it offline, so that the gif image can be saved well, but the pdf does not have this. Thank you for your suggestion

from logseq-plugin-doc.

sethyuan avatar sethyuan commented on June 2, 2024

Understood. It is certainly better to have a copy of all used resources when exporting. I'll keep this issue open and will make more researches on this topic.

from logseq-plugin-doc.

acsr avatar acsr commented on June 2, 2024

Today I did some export with the new [[Logseq]] v0.8.7 und [[logseq-plugin-doc]] v1.11.1

Images are linked as absolute path to the PKM dir

I found out that after including Images AND moving the export around, the Images are linked statically to the Logseq PKM directory like [absolutepath]/assets/file.png
(this is the main gotcha of this ticket).

I never recognized this due to the fact that I always converted the export to PDF in place of the original save location at once.

But now I needed to share the full export as working HTML with others.

What I did:

  • In Chrome save the page as Website Full
  • This created a folder with all the images and the style.css, tabler-icons.min.css and photoswipe.js files

Icons missing

When you open the new HTML everything looks fine except:

Tabler Icons are gone, because Web Fonts are linked via relative link from CSS expected to be in the Logseq Plugin Directory relative to the original CSS.

Solution: Copy over the font files from ~/logseq/Export Hugo Docs/static/css/fonts/tabler-icons.* (on Mac!)

In Chrome Collected saves, TOC Links are absolute and refuse to work after moving the export.

Sideeffect of the Chrome Step: Links of a TOC from https://github.com/sethyuan/logseq-plugin-tocgen to the anchors are now absolute corresponding to the location during export from Chrome. I missed to check that before. The actual export is relative!

Solution: Search and Replace TOC Links to Anchors in the Chrome export html and remove the path before the character# starting the anchor link part.

New Image UI features in Logseq

There is a new challenge with Logseq 0.8.7 and the enhanced icon overlays over images.

The full (original) path and Delete and Copy Links are displayed together with the Show Full Size icons and their tooltips but without useful action.

You can now try to port back the HTML functionality to the export or try to hide the items in CSS. Both is useless for PDF as final target format.

Depending on the usecase the original path and exporting from there is useful or showing just the filename and offering a copy from the export.

The show fullsize icon functionality ist always important if you use images that are scaled down in the doc view but need to be explored in fullsize. This is still possible by opening with rightclick into a new tab, but cumbersome and not acceptable for others.

Conclusion

Except the manual postproduction work, I am now quite happy with the look and TOC functionality of the HTML. The actual export code is very clumsy and contains a lot of boilerplate, but this is not the fault of the plugin.

from logseq-plugin-doc.

acsr avatar acsr commented on June 2, 2024

One more thought: Is it possible to include all resources as Base64 encoded data urls in a single big HTML file from Logseq?
Sometimes a big monolith and not suitable, but also simple solution to avoid a directory if possible and acceptable.

from logseq-plugin-doc.

Related Issues (20)

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.