KosmosisDire / obsidian-webpage-export

Export html from single files, canvas pages, or whole vaults. Direct access to the exported HTML files allows you to publish your digital garden anywhere. Focuses on flexibility, features, and style parity.
https://docs.obsidianweb.net/
MIT License
796 stars 68 forks source link

Add support for "Only Export Modified" (incremental export) in Html Documents export mode #476

Open joelscampos opened 1 month ago

joelscampos commented 1 month ago

What happened?

Reproduction

1) Create 2 notes 2) Set parameters:

The issue does not occur when "Export Mode" is "Online Web Server". For "HTML Documents" and "Raw HTML Documents", the issue occurs.

image

Last Working Version

No response

Version

1.8.01

Operating System

Windows 10 and 11

Obsidian Version

1.6.7

Which browsers can you reproduce this in?

No response

Relevant log output

Log:
[WARNING]   Creating an RSS feed requires a site url to be set in the export settings.
[WARNING]   No existing search index found. All files will be exported.
[INFO]  Closing render window
[WARNING]   Creating an RSS feed requires a site url to be set in the export settings.
[WARNING]   No existing search index found. All files will be exported.
[INFO]  Closing render window

Settings:
    settingsVersion --------- 1.8.01
    makeOfflineCompatible     false
    inlineAssets ------------ true
    includePluginCSS          1 plugins included
    includeSvelteCSS -------- true
    titleProperty             title
    customHeadContentPath ---
    faviconPath              
    documentWidth ----------- 40em
    sidebarWidth              20em
    minOutlineCollapse ------ 2
    startOutlineCollapsed     false
    allowFoldingHeadings ---- true
    allowFoldingLists         true
    allowResizingSidebars --- true
    logLevel                  all
    minifyHTML -------------- true
    makeNamesWebStyle         false
    onlyExportModified ------ true
    deleteOldFiles            false
    addThemeToggle ---------- true
    addOutline                true
    addFileNav -------------- true
    addSearchBar              false
    addGraphView ------------ false
    addTitle                  true
    addRSSFeed -------------- true
    siteURL                  
    authorName --------------
    vaultTitle                Test
    exportPreset ------------ documents
    openAfterExport           false
    graphAttractionForce ---- 1
    graphLinkLength           10
    graphRepulsionForce ----- 150
    graphCentralForce         3
    graphEdgePruning -------- 100
    graphMinNodeSize          3
    graphMaxNodeSize -------- 7
    showDefaultTreeIcons      false
    emojiStyle -------------- Native
    defaultFileIcon           lucide//file
    defaultFolderIcon ------- lucide//folder
    defaultMediaIcon          lucide//file-image
    exportPath -------------- C:\\\\Temp
    filesToExport             0

Enabled Plugins:
    Webpage HTML Export

Additional Info

I think that fixing this issue would minimize the issue of "Out of memory while export".

See:

KosmosisDire commented 1 month ago

Hi thanks, unfortunately an incremental export (only exporting changed files) can only be done in online website export mode. This is something I want to improve clarity on in the next update. But the reason this does not work is because things like the sidebar and various settings modifications require every file to be regenerated. Although it is theoretically possible, when all the data is duplicated across multiple files (one per note) it makes it very very difficult to track changes and apply them to the export.

However, with the online website the export can be fragmented into modular pieces of data and then I only have to update that data when it changes (which is much faster).

I am working towards the possibility to support incremental export for other export modes, but at the moment it is not available.

This actually would not help the out of memory error because (as stated in other issues about this problem) the plugin does not save any files to disk until every file is generated. This means that if it crashes halfway through it must start over on the next export.

I will mark this as a feature request, allthough I do think it should be clearer that this feature is only available for Online Website exports.

Thank you for the feedback and report!