@edx/gatsby-source-portal-designer
v2.1.1
Published
Gatsby plugin for using [portal-designer](https://github.com/edx/portal-designer) as a source.
Downloads
66
Keywords
Readme
gatsby-source-portal-designer
Gatsby plugin for using portal-designer as a source.
How to use
- Install
$ npm install --save-dev @edx/gatsby-source-portal-designer
- Add
@edx/gatsby-source-portal-designer
to the plugins array in yourgatsby-config.js
.
let pagesApiUrl;
if (process.env.UNBRANDED_LANDING_PAGE === 'True') {
pagesApiUrl = `${process.env.DESIGNER_BASE_URL}/api/v1/pages/?type=pages.IndexPage,pages.ProgramPage,pages.EnterprisePage`;
} else {
pagesApiUrl = `${process.env.DESIGNER_BASE_URL}/api/v1/pages/?hostname=${process.env.HOSTNAME}&type=pages.IndexPage,pages.ProgramPage,pages.EnterprisePage`;
}
module.exports = {
plugins: [
{
resolve: 'gatsby-source-portal-designer',
options: {
pagesApiUrl,
},
},
],
}