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

[cleanup] Move _redirects from public to static #51

Merged

Conversation

chalin
Copy link
Collaborator

@chalin chalin commented Jul 24, 2024

Redirect tests

@chalin chalin requested a review from lukpueh July 24, 2024 23:43
Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for in-toto ready!

Name Link
🔨 Latest commit 4a9ec24
🔍 Latest deploy log https://app.netlify.com/sites/in-toto/deploys/66a3b219a61b9e00084e7f8a
😎 Deploy Preview https://deploy-preview-51--in-toto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Patrice Chalin <[email protected]>
Signed-off-by: Patrice Chalin <[email protected]>
Signed-off-by: Patrice Chalin <[email protected]>
@chalin chalin force-pushed the chalin-im-move-redirects-to-static-2024-07-24 branch from 45d1e4a to 7d03de1 Compare July 24, 2024 23:44
Signed-off-by: Patrice Chalin <[email protected]>
@chalin
Copy link
Collaborator Author

chalin commented Jul 24, 2024

/cc @marcelamelara @steiza - FYI, so that you're aware that the canonical source of the _redirects file has changed.

@chalin chalin added CI/infra CI & infrastructure cleanup/refactoring labels Jul 24, 2024
@chalin
Copy link
Collaborator Author

chalin commented Jul 24, 2024

@DarikshaAnsari - we'll need to ensure that the _redirects file is also present in the Docsy-based version of the website.

Copy link
Member

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Moves _redirects from public to static
    👍
  • Adjusts layouts/partials/css.html so that it creates a production build only in production (when hugo.IsProduction is true)

TBH, I can't tell if this is correct. Should I see a difference in the preview build? It looks like it does use the production css link (w/ hash):

<link rel="stylesheet" href="/css/style.94f9acd6bd00126cfa5eeb849dbf3cc631715b317a956d7516a0d3e4e1c1cef7.css" integrity_no="sha256-lPms1r0AEmz6XuuEnb88xjFxWzF6lW11FqDT5OHBzvc=">
  • Adds NPM scripts to build and serve the website. Note that these scripts aren't used by the Netlify build commands yet.

Are these commands also for devs to build locally? If so, should we update our CONTRIBUTING.md? It does not have to be part of this pr.

💯 for providing links here.

@chalin
Copy link
Collaborator Author

chalin commented Jul 26, 2024

  • Adjusts layouts/partials/css.html so that it creates a production build only in production (when hugo.IsProduction is true)

TBH, I can't tell if this is correct. Should I see a difference in the preview build? It looks like it does use the production css link (w/ hash):

Right, I had not enabled the scripts for use by Netlify. I've added that change so that you can see the effect by viewing source of the preview. Let me know what you think.

  • Adds NPM scripts to build and serve the website. Note that these scripts aren't used by the Netlify build commands yet.

Are these commands also for devs to build locally? If so, should we update our CONTRIBUTING.md? It does not have to be part of this pr.

Both for use by Netlify and devs. I've updated CONTRIBUTING.md too.

💯 for providing links here.

👍🏻

Signed-off-by: Patrice Chalin <[email protected]>
package.json Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
@lukpueh
Copy link
Member

lukpueh commented Jul 29, 2024

TBH, I can't tell if this is correct. Should I see a difference in the preview build? It looks like it does use the production css link (w/ hash):

Right, I had not enabled the scripts for use by Netlify. I've added that change so that you can see the effect by viewing source of the preview. Let me know what you think.

Looks like expected now. Thanks!

Signed-off-by: Patrice Chalin <[email protected]>
@chalin chalin requested a review from lukpueh July 29, 2024 12:05
@lukpueh lukpueh merged commit a5f2b19 into in-toto:main Aug 2, 2024
1 check passed
@chalin chalin deleted the chalin-im-move-redirects-to-static-2024-07-24 branch August 5, 2024 12:22
@chalin chalin mentioned this pull request Aug 5, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[redirects] Don't version control files under the auto-generated public directory
2 participants