Skip to content

Custom template page is not showing on localhost #1027

@cginerorienteed

Description

@cginerorienteed

Expected behavior

When a custom page is created, you can test it locally, with the corresponding url

Actual behavior

After a custom page is created, the corresponding url keeps showing the default "template layout file" on localhost.

Steps to reproduce behavior

  1. Create a custom directory and a new html file, following the docs guidelines. pages>custom>page>customPage.html . Leave this file empty for demonstration purposes.

  2. Add new keys to the config.sencil.json :

{
  "customLayouts": {
    "brand": {},
    "category": {},
    "page": {
      "customPage.html": "/customPage/"
    },
    "product": {}
  },
  "normalStoreUrl": "https://xxx.mybigcommerce.com",
  "port": "3000"
}
  1. Make sure you have created a new page with the matching url on the admin panel.
    OrienteedStore BigCommerce Control Panel

  2. Restart the server with -> stencil start.

  3. Go to https://localhost:3000/customPage/ to see if the changes are applied. You should see a blank page as there is nothing on the empty file.

Environment

Stencil-cli version stencil --version: 5.3.3

Node version node -v: 14.20.0

NPM version npm -v: 6.14.17

OS: windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions