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

5.x: content sources are incorrectly output to the build output path #1320

Open
cossssmin opened this issue Jul 31, 2024 · 0 comments · May be fixed by #1299
Open

5.x: content sources are incorrectly output to the build output path #1320

cossssmin opened this issue Jul 31, 2024 · 0 comments · May be fixed by #1299

Comments

@cossssmin
Copy link
Member

cossssmin commented Jul 31, 2024

  • Maizzle Version: 5.0.0-beta.18

There's currently a bug in the 5.x beta with the way we copy content sources to output paths, because we're trying to determine 'root' folders for each content source (which is a glob path) and it goes too high up, it's incorrect.

So if you have something like this:

export default {
  build: {
    content: [
      'src/templates/alerts/**/*.html',
      'src/templates/newsletter/**/*.html',
    ],
    output: {
      path: 'build_production',
    },
  }
}

You will get alerts templates in both build_production/alerts and at the root of build_production.

Since files are first copied over to the build.output.path, need to just copy over all files at the build.content paths correctly, preserving the structure.

Right now we're doing this relative to their 'root' directory so that we don't create build_production/src/templates/alerts/..., but this might need to change considering we now support content source glob paths.

@cossssmin cossssmin changed the title Content sources are incorrectly output to the build output path 5.x: content sources are incorrectly output to the build output path Jul 31, 2024
@cossssmin cossssmin linked a pull request Aug 19, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant