Skip to content

Base Path Configuration with root Option Does Not Work #267

Description

@maifeeulasad

Hi there, 👋

I’m using bisheng to build a site, and I encountered an issue when trying to deploy it under a subdirectory (e.g., /subdir/). According to the documentation, the root option in bisheng.config.js should handle this, but it doesn’t seem to work as expected.

Here’s what I tried:

Configuration:

const commonConfig = require('./bisheng.common.config');

module.exports = { source: {},
  output: './_site/',
  root: '/ocr-landing/',
  entryName: 'templates',
  theme: './site/templates',
  htmlTemplate: './site/templates/static/index.html',
  port: 7113,
  themeConfig: {
  },
  ...commonConfig };

Expected Behavior:

  • The site should load at https://neurobangla.github.io/ocr-landing/.

Actual Behavior:

  • The site only loads correctly at /. Only on local host
  • Navigating to any other page results in a NotFound error.

Steps to Reproduce:

  • git clone https://github.com/NeuroBangla/ocr-landing.git
  • git checkout 0e9f06a8248178b9fb774864cf076b5a78cc1ec7
  • yarn
  • yarn start

Questions:

  • Is there additional configuration needed to make the root option work?
  • Are there specific versions of bisheng or dependencies required for this functionality?

If this is a bug, I’d appreciate any guidance or workarounds while it’s being addressed. Thank you for your time and for maintaining this great project! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions