Skip to content

Commit

Permalink
Merge pull request #37 from azachwill/devcommit40
Browse files Browse the repository at this point in the history
devcommit40
  • Loading branch information
awilliams1275 authored Aug 22, 2024
2 parents 889c208 + 55cc5b1 commit 5e0eddc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions _build/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ headers = []

[functions."*"]

[[edge_functions]]
function = "redirect_article"
path = "/r/*"

[[edge_functions]]
function = "redirect_index"
path = "/py/"
Expand Down
4 changes: 0 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ headers = []

[functions."*"]

[[edge_functions]]
function = "redirect_article"
path = "/r/*"

[[edge_functions]]
function = "redirect_index"
path = "/py/"
Expand Down
4 changes: 2 additions & 2 deletions netlify/edge-functions/redirect_article.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default async (request, context) => {
const url = new URL(request.url);
const pattern = /\/(core|express|testing|getstarted|articles|gallery|reference\/shiny)(\/?)$/;
const pattern = /\/(core|express|testing)(\/?)$/;
const result = pattern.test(url);

// Check if the URL path is one of the index.html pages
Expand All @@ -21,6 +21,6 @@ export default async (request, context) => {
return context.next();
};
export const config = {
path: ['/r/', '/py/docs/*', "/py/api/*"],
path: ['/py/docs/*', "/py/api/*"],
};

0 comments on commit 5e0eddc

Please sign in to comment.