@hatchly/nuxt-files-module
Official nuxt integration for the Hatchly/Files module
Last updated 5 months ago by samturrell .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @hatchly/nuxt-files-module 
SYNC missed versions from official npm registry.

Nuxt Hatchly Files Module

Module to integrate the Hatchly File module into a Nuxt app.

Currently the only feature of this module is to redirect files to the api when linked to via WYSIWYG attributes in the Pages module.

Installation

yarn add @hatchly/nuxt-files-module

Register the module in your nuxt applications config file:

module.exports = {
    // Nuxt config
    modules: {
        // Other Modules
        ['@hatchly/nuxt-files-module', {
            // Options
        }],
    },

    hatchly: {
        files: {
            // Options can also be defined here
        },
    },
};

Add the API url to your .env:

API_BASE=http://my-application.localhost

Options

The options object can contain the following values:

{
    apiBase: '',
    pathPrefix: '',
},

Each option is described below.

apiBase

The url of your Hatchly site. This is should be updated in your .env rather than hardcoding a value here.

  • Default: process.env.API_BASE
  • Type: string

pathPrefix

The path to where the file module links to images.

  • Default: '/files'
  • Type: string

Current Tags

  • 1.0.0                                ...           latest (5 months ago)

1 Versions

  • 1.0.0                                ...           5 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |