Fix links and settings for deploying to gh-pages

Rename root document file so it goes to index.html
This commit is contained in:
Zak Patterson 2019-02-01 15:25:58 -05:00
parent e4ac1ec505
commit 489bb26504
4 changed files with 43 additions and 12 deletions

View File

@ -14,12 +14,11 @@ jobs:
- stage: verify - stage: verify
script: script:
- sbt ++$TRAVIS_SCALA_VERSION todomvc/fullOptJS::webpack - sbt ++$TRAVIS_SCALA_VERSION router/fullOptJS::webpack
- sbt docs/mdoc - sbt docs/mdoc
- sbt docs/makeMicrosite - sbt docs/makeMicrosite
- mkdir -p router-docs/site/todomvc - mkdir -p router-docs/site
- cp -R router-docs/target/site/* ./router-docs/site/ - cp -R router-docs/target/site/* ./router-docs/site/
- cp ./router-docs/site/Readme.html ./router-docs/site/index.html
deploy: deploy:
provider: pages provider: pages
@ -29,5 +28,4 @@ deploy:
local-dir: router-docs/site local-dir: router-docs/site
target-branch: gh-pages target-branch: gh-pages
on: on:
branch: master branch: master

View File

@ -5,7 +5,13 @@ Easy routing for [outwatch](https://outwatch.github.io) on scala.js
Most of this code is adapted from [http4s](http4s.org)'s route parsing and path pattern matching. Most of this code is adapted from [http4s](http4s.org)'s route parsing and path pattern matching.
See [documentation](https://clovellytech.github.io/outwatch-router/index.html) See [documentation][doc-root]
Todo:
* Add history api
* Add state to update from `window.location`
[travis-img]:https://travis-ci.com/clovellytech/outwatch-router.svg?branch=master [travis-img]:https://travis-ci.com/clovellytech/outwatch-router.svg?branch=master
[travis-link]:https://travis-ci.com/clovellytech/outwatch-router [travis-link]:https://travis-ci.com/clovellytech/outwatch-router
[doc-root]:https://clovellytech.github.io/outwatch-router

View File

@ -15,15 +15,36 @@ val commonSettings = Seq(
val withTests : String = "compile->compile;test->test" val withTests : String = "compile->compile;test->test"
val testOnly : String = "test->test" val testOnly : String = "test->test"
lazy val docs = (project in file("./router-docs")) lazy val docs = project
.settings(name := "outwatch-router-docs") .in(file("./router-docs"))
.enablePlugins(MdocPlugin)
.settings(commonSettings) .settings(commonSettings)
.enablePlugins(MdocPlugin)
.enablePlugins(MicrositesPlugin)
.settings(
name := "outwatch-router-docs",
description := "A router for outwatch",
organizationName := "com.clovellytech",
organizationHomepage := Some(url("https://github.com/clovellytech")),
homepage := Some(url("https://clovellytech.github.io/outwatch-router")),
micrositeUrl := "https://clovellytech.github.io/outwatch-router",
micrositeBaseUrl := "/outwatch-router",
micrositeName := "Outwatch Router",
micrositeCompilingDocsTool := WithMdoc,
micrositeGithubOwner := "clovellytech",
micrositeGithubRepo := "outwatch-router",
scalacOptions := options.scalacConsole
)
.settings(
mdocVariables := Map(
"VERSION" -> version.value
)
)
.dependsOn(router) .dependsOn(router)
lazy val copyFastOptJS = TaskKey[Unit]("copyFastOptJS", "Copy javascript files to target directory") lazy val copyFastOptJS = TaskKey[Unit]("copyFastOptJS", "Copy javascript files to target directory")
lazy val router = (project in file("./outwatch-router")) lazy val router = project
.in(file("./outwatch-router"))
.settings(name := "outwatch-router") .settings(name := "outwatch-router")
.enablePlugins(ScalaJSPlugin) .enablePlugins(ScalaJSPlugin)
.enablePlugins(ScalaJSBundlerPlugin) .enablePlugins(ScalaJSBundlerPlugin)
@ -33,7 +54,6 @@ lazy val router = (project in file("./outwatch-router"))
scalacOptions += "-P:scalajs:sjsDefinedByDefault", scalacOptions += "-P:scalajs:sjsDefinedByDefault",
useYarn := true, // makes scalajs-bundler use yarn instead of npm useYarn := true, // makes scalajs-bundler use yarn instead of npm
jsEnv in Test := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv, jsEnv in Test := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv,
scalaJSUseMainModuleInitializer := true,
scalaJSModuleKind := ModuleKind.CommonJSModule, // configure Scala.js to emit a JavaScript module instead of a top-level script scalaJSModuleKind := ModuleKind.CommonJSModule, // configure Scala.js to emit a JavaScript module instead of a top-level script
version in webpack := "4.16.1", version in webpack := "4.16.1",
version in startWebpackDevServer := "3.1.4", version in startWebpackDevServer := "3.1.4",
@ -63,7 +83,8 @@ lazy val exampleApp = (project in file("router-example"))
.settings(commonSettings) .settings(commonSettings)
.dependsOn(router) .dependsOn(router)
lazy val root = (project in file(".")) lazy val root = project
.in(file("."))
.settings(name := "outwatch-router-root") .settings(name := "outwatch-router-root")
.settings(commonSettings) .settings(commonSettings)
.settings( .settings(

View File

@ -1,3 +1,9 @@
---
layout: home
title: "Outwatch Router"
section: "home"
---
Outwatch Router Outwatch Router
=== ===