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

Restrict re-naming of bundled resources to be a relative path #13113

Closed
bep opened this issue Dec 5, 2024 · 1 comment
Closed

Restrict re-naming of bundled resources to be a relative path #13113

bep opened this issue Dec 5, 2024 · 1 comment
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Dec 5, 2024

For some work I'm doing now, I notice that we don't put any restriction on the renaming of bundled resource in front matter.

A bundle resource in a sub folder is being set as subfolder/myresource.txt; so forward slashes and no leading slash (this is a relative path).

But you're then allowed to add leading slash to it with this if you want:

---
title: "My Bundle"
resources:
- name: /foo/bars.txt
  src: foo/txt1.txt
- name: foo/bars2.txt
  src: foo/txt2.txt

Note that I don't think the above is very common, but it will make my situation easier if we can:

  • Remove any leading slashes from the new name.
  • Also convert any Windows slashes to Unix style.

https://gohugo.io/content-management/page-resources/

@bep bep added the Enhancement label Dec 5, 2024
@bep bep added this to the v0.140.0 milestone Dec 5, 2024
@bep bep self-assigned this Dec 5, 2024
bep added a commit to bep/hugo that referenced this issue Dec 7, 2024
bep added a commit to bep/hugo that referenced this issue Dec 9, 2024
bep added a commit to bep/hugo that referenced this issue Dec 10, 2024
bep added a commit to bep/hugo that referenced this issue Dec 10, 2024
bep added a commit to bep/hugo that referenced this issue Dec 10, 2024
bep added a commit to bep/hugo that referenced this issue Dec 10, 2024
bep added a commit to bep/hugo that referenced this issue Dec 11, 2024
bep added a commit to bep/hugo that referenced this issue Dec 11, 2024
@bep bep modified the milestones: v0.140.0, Unscheduled Dec 11, 2024
bep added a commit to bep/hugo that referenced this issue Dec 11, 2024
bep added a commit to bep/hugo that referenced this issue Dec 11, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
bep added a commit to bep/hugo that referenced this issue Dec 12, 2024
@bep bep closed this as completed in e293e7c Dec 12, 2024
Copy link

github-actions bot commented Jan 3, 2025

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant