Skip to content

Provide option to not modify original markdown when publishing images #28

@bryanbcook

Description

@bryanbcook

When publishing a post, the Publish-MarkdownDriveImages modifies the content to replace the local images with their Google Drive urls. When authoring blog posts in tools like Obsidian, you would have a local image before publishing. However, after publishing, the markdown would be modified to point to URLs in Google Drive. This limits your ability to modify the local image and overwrite the image with a newer version.

Presently, Add-GoogleDriveFile supports overwriting existing files with newer versions when the -Force parameter is specified.

To retain the local image when publishing:

  • Update-MarkdownImages already supports an -OutFile parameter that if supplied writes the changes to a different file.
  • Publish-MarkdownDriveImages should include an -OutFile parameter which is passed to Update-MarkdownImages
  • Publish-MarkdownBloggerPost should include a -PreserveOriginal switch parameter, when specified should specify an temporary file for Publish-MarkdownDriveImages and use this temporary file with ConvertTo-HtmlFromMarkdown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions