Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@ jobs:
- name: Build docs site
run: pnpm --filter docs-site build

- name: Prepare deploy directory
- name: Fix elm.js script path
run: |
cd apps/docs/dist
cp -r assets devtools/assets
cp elm.*.js devtools/
cp style.css devtools/ 2>/dev/null || true
cp favicon.ico devtools/ 2>/dev/null || true
cp content.dat devtools/ 2>/dev/null || true
find devtools -name '*.html' -exec sed -i 's|src="/elm\.|src="/devtools/elm.|g' {} +
find . -name '*.html' -exec sed -i 's|src="/elm\.|src="/devtools/elm.|g' {} +

- uses: actions/upload-pages-artifact@v3
with:
path: apps/docs/dist/devtools
path: apps/docs/dist

deploy:
environment:
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"onlyBuiltDependencies": [
"esbuild",
"lamdera"
]
],
"patchedDependencies": {
"elm-pages@3.5.1": "patches/elm-pages@3.5.1.patch"
}
}
}
25 changes: 25 additions & 0 deletions patches/elm-pages@3.5.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/codegen/elm-pages-codegen.cjs b/codegen/elm-pages-codegen.cjs
index 23614931f4601b018de0551b2991afdbdf64ddf9..9b9d540dde9a20ffba31cb82dfe8fb6dfd0e44f9 100644
--- a/codegen/elm-pages-codegen.cjs
+++ b/codegen/elm-pages-codegen.cjs
@@ -23712,11 +23712,18 @@ var $author$project$Generate$file$ = function (templates, basePath) {
_Utils_Tuple2('path', $mdgriffith$elm_codegen$Elm$Annotation$string)
]))),
function (url) {
+ var urlPath = $mdgriffith$elm_codegen$Elm$get$('path', url);
+ var strippedPath = $mdgriffith$elm_codegen$Elm$ifThen$(
+ A2($author$project$Gen$String$call_.startsWith, $mdgriffith$elm_codegen$Elm$string(basePath), urlPath),
+ A2(
+ $author$project$Gen$String$call_.dropLeft,
+ $author$project$Gen$String$call_.length($mdgriffith$elm_codegen$Elm$string(basePath)),
+ urlPath),
+ urlPath);
return $mdgriffith$elm_codegen$Elm$withType$(
$mdgriffith$elm_codegen$Elm$Annotation$maybe(routeType.annotation),
segmentsToRouteFn.call(
- $author$project$Generate$splitPath.call(
- $mdgriffith$elm_codegen$Elm$get$('path', url))));
+ $author$project$Generate$splitPath.call(strippedPath)));
}));
var routeToPathFn = $author$project$Generate$routeToPath$(routeType, routes);
var baseUrl = $mdgriffith$elm_codegen$Elm$Declare$value$(
9 changes: 7 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading