summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/docs.yaml2
-rw-r--r--makefile44
-rw-r--r--src/lib/RenderHtml.hs4
3 files changed, 25 insertions, 25 deletions
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index b4265f54..1418d43d 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -45,6 +45,6 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
- folder: pages # The folder the action should deploy.
+ folder: pages/dex-lang # The folder the action should deploy.
clean: false # If true, automatically remove deleted files from the deploy branch.
commit-message: Updating gh-pages from ${{ github.sha }}
diff --git a/makefile b/makefile
index 1aa0f2af..f587e799 100644
--- a/makefile
+++ b/makefile
@@ -413,48 +413,48 @@ bench-summary:
# --- building docs ---
-slow-pages = pages/examples/mnist-nearest-neighbors.html
+slow-pages = pages/dex-lang/examples/mnist-nearest-neighbors.html
static-names = dynamic.html index.js style.css
doc-files = $(doc-names:%=doc/%.dx)
-pages-doc-files = $(doc-names:%=pages/%.html)
+pages-doc-files = $(doc-names:%=pages/dex-lang/%.html)
example-files = $(example-names:%=examples/%.dx)
-pages-example-files = $(example-names:%=pages/examples/%.html)
+pages-example-files = $(example-names:%=pages/dex-lang/examples/%.html)
lib-files = $(filter-out lib/prelude.dx,$(wildcard lib/*.dx))
-pages-lib-files = $(patsubst %.dx,pages/%.html,$(lib-files))
-static-files = $(static-names:%=pages/static/%)
+pages-lib-files = $(patsubst %.dx,pages/dex-lang/%.html,$(lib-files))
+static-files = $(static-names:%=pages/dex-lang/static/%)
serve-docs:
cd pages && python3 -m http.server
-docs: $(static-files) pages-prelude $(pages-doc-files) $(pages-example-files) $(pages-lib-files) $(slow-pages) pages/index.md
+docs: $(static-files) pages-prelude $(pages-doc-files) $(pages-example-files) $(pages-lib-files) $(slow-pages) pages/dex-lang/index.md
-pages/static/%: static/%
- mkdir -p pages/static
+pages/dex-lang/static/%: static/%
+ mkdir -p pages/dex-lang/static
cp $^ $@
pages-prelude: lib/prelude.dx
- mkdir -p pages/lib
- $(dex) --prelude /dev/null generate-html lib/prelude.dx lib/prelude
+ mkdir -p pages/dex-lang/lib
+ $(dex) --prelude /dev/null generate-html lib/prelude.dx dex-lang/lib/prelude
-pages/examples/tutorial.html: tutorial-data
-pages/examples/dither.html: dither-data
+pages/dex-lang/examples/tutorial.html: tutorial-data
+pages/dex-lang/examples/dither.html: dither-data
-pages/examples/%.html: examples/%.dx
- mkdir -p pages/examples
- $(dex) generate-html $< examples/$*
+pages/dex-lang/examples/%.html: examples/%.dx
+ mkdir -p pages/dex-lang/examples
+ $(dex) generate-html $< dex-lang/examples/$*
-pages/lib/%.html: lib/%.dx
- mkdir -p pages/lib
- $(dex) generate-html $^ lib/$*
+pages/dex-lang/lib/%.html: lib/%.dx
+ mkdir -p pages/dex-lang/lib
+ $(dex) generate-html $^ dex-lang/lib/$*
-pages/index.md: $(doc-files) $(example-files) $(lib-files)
+pages/dex-lang/index.md: $(doc-files) $(example-files) $(lib-files)
python3 misc/build-web-index "$(doc-files)" "$(example-files)" "$(lib-files)" > $@
-${pages-doc-files}:pages/%.html: doc/%.dx
- mkdir -p pages
- $(dex) generate-html $^ $*
+${pages-doc-files}:pages/dex-lang/%.html: doc/%.dx
+ mkdir -p pages/dex-lang
+ $(dex) generate-html $^ dex-lang/$*
clean:
$(STACK) clean
diff --git a/src/lib/RenderHtml.hs b/src/lib/RenderHtml.hs
index d1d884ea..82d7ef2b 100644
--- a/src/lib/RenderHtml.hs
+++ b/src/lib/RenderHtml.hs
@@ -276,12 +276,12 @@ buildMainHtml :: FilePath -> Html
buildMainHtml jsonPath = docTypeHtml $ do
H.head do
H.meta ! charset "UTF-8"
- H.link ! rel "stylesheet" ! type_ "text/css" ! href "/static/style.css"
+ H.link ! rel "stylesheet" ! type_ "text/css" ! href "/dex-lang/static/style.css"
H.body ! onload (textValue $ fromString jsSource) $ do
H.div mempty ! At.id "minimap"
H.div "(hover over code for more information)" ! At.id "hover-info"
H.div mempty ! At.id "main-output"
- H.script ! src "/static/index.js" $ mempty
+ H.script ! src "/dex-lang/static/index.js" $ mempty
where
jsSource :: String
jsSource = "render('Static', '/" ++ jsonPath ++ "');"