0.0.7 • Published 10 months ago

remark-public-images v0.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Public images

Upload every image present on the markdown article into a public GIT repository and update the src image attribute to reflect the new public URL.

Options

  • base_url ()\ Base public Git URL use to view raw data file.
  • location ()\ Convert the image path into a path inside the local repository.
  • repo_public ()\ Address of the remote repository, user must have read/write access.
  • reset (boolean, false)\ Reset the Git commit history if repository already exists
  • source ()\ Location of the original markdown document.
  • repo_local ()\ Address of the local Git directory.

Exemple

{
  
  "plugin": require('remark-public_images'),
  "settings": {
    "target": `${require('os').homedir()}/.medium_git`,
    "repository": 'https://github.com/adaltas/website_pub.git',
    "base_url": 'https://raw.githubusercontent.com/adaltas/website_pub/master/',
    "reset": true,
    "source": params.source,
    "location": ({options, node}) => {
      const dir = path.relative(
        "#{process.cwd()}/content", path.dirname(options.source))
      return path.join(dir, node.url)
    }
  }
}
0.0.7

10 months ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago