You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在BC Stencil主题(Cornerstone Light)添加CSS/JS文件及解决文件夹缺失问题

Hey there! Let’s tackle your two BigCommerce theme questions one by one:

1. Adding Custom CSS/JS Files to Your BC Stencil Theme

Here’s a straightforward, reliable way to add your own styles and scripts:

  • First, access your Stencil theme files (either locally via the Stencil CLI or remotely via SFTP). Locate the assets/css and assets/js directories. Drop your custom CSS file (e.g., custom-styles.css) into the css folder, and your custom JS file (e.g., custom-scripts.js) into the js folder.
  • Next, open the templates/layout/base.html file—this is the core layout template that loads across your entire store.
    • For CSS: Find the <head> section where other theme styles are linked. Add a new line using Stencil’s built-in asset helper to reference your file:
      <link rel="stylesheet" href="{{ asset_url('css/custom-styles.css') }}">
      
    • For JS: Scroll to just before the closing </body> tag (where most scripts are loaded for better performance) and add your script:
      <script src="{{ asset_url('js/custom-scripts.js') }}"></script>
      
  • If working locally, run stencil start to preview changes, then stencil push to deploy them to your live store. If using SFTP, upload the modified base.html and your new asset files to the server.
2. Fixing Missing Cornerstone Light Theme Folder in Cyberduck

Let’s troubleshoot this step by step:

  • Double-check your SFTP credentials: Make sure you’re using the correct host, username, and password from your BigCommerce store’s Settings > Advanced > SFTP Access. Even a tiny typo can block access to the full directory structure.
  • Navigate to the correct path: BigCommerce themes are stored in the /content/themes/ directory. After connecting via SFTP, drill down into this folder—your cornerstone-light directory should be listed here alongside other installed themes.
  • Refresh or reconnect: Cyberduck sometimes caches folder views. Press Cmd+R (Mac) or Ctrl+R (Windows) to refresh the current directory, or disconnect and reconnect your SFTP session to load the latest structure.
  • Verify theme deployment status: In your BigCommerce admin, go to Storefront > My Themes. Ensure the Cornerstone Light theme is either active or has been fully uploaded (draft themes might not appear in SFTP until they’re deployed to the server).
  • Check user permissions: If you still can’t find the folder, your SFTP user might lack access to the theme directories. Reach out to BigCommerce support to confirm your account has full permissions for the /content/themes/ path.

内容的提问来源于stack exchange,提问作者Hitesh Sharma

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:21:51