Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom template page is not showing on localhost #1027

Open
cginerorienteed opened this issue Nov 15, 2022 · 3 comments
Open

Custom template page is not showing on localhost #1027

cginerorienteed opened this issue Nov 15, 2022 · 3 comments

Comments

@cginerorienteed
Copy link

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

@codal-nilayp
Copy link

@cginerorienteed I hope you have created a custom directory inside the templates/pages directory. Inside it, you created the page directory, and then inside the page directory, you created the customPage.html file.
So it should be like templates/pages/custom/page/customPage.html.

image

@hunterashaw
Copy link

I was able to reproduce this error for a custom category page using @bigcommerce/stencil-cli@5.3.3

@rohan-cam
Copy link

I also had this problem using 5.3.3 and yes @codal-nilayp, I followed the directions as per the BC documentation

To actually move forward with the theme building I had to revert to using @bigcommerce/stencil-cli@5.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants