Skip to content

Html Export Settings

Vladimir Schneider edited this page May 1, 2020 · 4 revisions

Automatic exporting of HTML is supported in the project Markdown configuration and in the scope based rendering configuration.

Screenshot Html Export

Options

Generated HTML will only be exported automatically for files whose rendering profile HTML export configuration has Export HTML on save selected and only when a file is saved. If you change the HTML export configuration the files are not automatically exported until they are modified and saved.

You can always invoke Export Markdown as HTML action on the Tools menu, which will export all automatically exportable markdown files in the project. Changing the plugin settings will re-export all files and remove any that were previously exported but are no longer exported. Subsequent modifications to markdown files will update the generated HTML when the files are saved.

Menu Screenshot Tools Menu

  • Parent Dir - contains the path prefix to be removed from the Markdown file. The remaining part of the path will be appended to the Target Dir text to result in the final exported HTML file path.

  • Target Dir - path where generated HTML will be exported.

    • Target path options dropdown:
      • Add path relative to parent The path structure after the Parent Dir will be preserved.
      • Add path relative to project The path structure after the project root directory will be preserved.
      • Add file name only No path will be preserved and only the file name will be used.
    • Target Ext - if selected then the extension for the exported file will be taken from the text box, otherwise .html will be used. If the provided text does not contain a . then the resulting file name will have the provided text as suffix and the file will have no extension.
  • Export HTML on save - if selected then the file's HTML will be exported every time the file is saved.

  • Plain HTML - use the HTML as generated for the unmodified HTML text view

  • Use Style Attribute - when enabled will apply stylesheet via style attribute of each element as done for Copy Markdown as HTML mime content.

    ⚠️ stylesheet is expected to be in the same format as COPY_HTML_MIME stylesheet. See Copy Markdown to HTML formatted Text Profile

    ℹ️ if No Stylesheets, No Scripts is selected then only styles explicitly defined by the profile will be used. If this option is not selected then COPY_HTML_MIME profile stylesheet will be used or if the COPY_HTML_MIME profile is not defined then the default stylesheet for COPY_HTML_MIME will be used.

  • No Stylesheets, No Scripts - use HTML as generated by the modified HTML text view but do not include and linked stylesheets or java script tags.

  • Link to exported HTML - for links to other exported markdown files, change link to relative addressing and target the exported HTML file

  • Default link format - specify link format when not using Link to exported HTML option

  • CSS Dir - If selected then the directory where linked style sheet files should be copied. Otherwise, same as Target Dir + /css.

  • Script Dir - If selected then the directory where linked script files should be copied. Otherwise, Target Dir + /js.

  • Copy linked image files - If selected then images linked to by the exported file will be copied to the Image Dir

  • Image Dir - If selected then the directory where linked image files should be copied. Otherwise, Target Dir + /img.

  • Image File path option:
    Screenshot Html Export Image Path Options

    • Add path relative to project - preserve the path of the image file under the project base path
    • Add file name only - do not preserve path structure under the project base directory and only use the image file name. ⚠️ duplicate file names are not checked and will result in the image file with the latest modification time to be copied.
  • Export Markdown to HTML on settings change - If selected then all Markdown files whose rendering profile has Export on save selected will be exported.

  • Export Markdown to HTML on project open - If selected then all Markdown files whose rendering profile has Export on save selected will be exported on project open. Otherwise, files will only be written out if the destination does not exist or is older than the source file, based on its modification time stamp.

⚠️ only files whose target directory is located under the project base directory will be exported. This is to prevent wild exports due to an erroneous configuration of export parameters.

⚠️ The linked files will only be copied if they do not exist. Making it safe to edit these files without fear that they will be overwritten. If you want them to be updated then just delete them and invoke Export Markdown as HTML action on the Tools menu, which will export all automatically exportable markdown files in the project.

⚠️ Image files are only copied if the target does not exist or is older than the source.

ℹ️ You can insert macros in place of hard-coded paths in all text fields expecting a path.