Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d2f3ff1
chore: add .worktrees/ to gitignore
ryanbas21 May 12, 2026
465c0fc
feat(docs-site): scaffold elm-pages v3 project
ryanbas21 May 12, 2026
e39bf34
feat(docs-site): add site layout with header, sidebar, and content area
ryanbas21 May 12, 2026
b1d003b
feat(docs-site): add landing page with package cards
ryanbas21 May 12, 2026
a202855
feat(docs-site): add Markdown renderer with callout support
ryanbas21 May 12, 2026
3abbc79
feat(docs-site): add docs route for Markdown guide pages
ryanbas21 May 12, 2026
df162b9
feat(docs-site): add packages route for package overview pages
ryanbas21 May 12, 2026
c99bd5c
feat(docs-site): add contributing route for contributor docs
ryanbas21 May 12, 2026
dd04320
feat(docs-site): add API reference route with treeshake-check docs
ryanbas21 May 12, 2026
3f5079c
feat(docs-site): add architecture page with SVG package diagram
ryanbas21 May 12, 2026
cd46c49
feat(docs-site): add client-side search over content index
ryanbas21 May 12, 2026
00e1794
feat(docs-site): add all content pages for guides, packages, and cont…
ryanbas21 May 12, 2026
6ccfcbc
feat(docs-site): add API reference docs for all published packages
ryanbas21 May 12, 2026
d3227c6
feat(docs-site): add dark/light mode toggle with system preference de…
ryanbas21 May 12, 2026
a81157b
feat(docs-site): add Prism.js syntax highlighting for code blocks
ryanbas21 May 12, 2026
2fd1041
ci: add GitHub Pages deployment workflow for docs site
ryanbas21 May 12, 2026
be778d4
fix(docs-site): rename ForgeRock to Ping Identity, add Journey and OI…
ryanbas21 May 12, 2026
bded136
fix(docs-site): fix dark mode covering full viewport, fix dead nav links
ryanbas21 May 12, 2026
f08e61d
fix(docs-site): remove fabricated API reference, fix all content to m…
ryanbas21 May 12, 2026
5ca2248
fix(docs-site): fix inaccuracies from content audit
ryanbas21 May 12, 2026
811d3bf
fix(docs-site): correct bridge description — not framework-agnostic
ryanbas21 May 12, 2026
a13070c
fix: exclude docs-site from ESLint to prevent CI hang
ryanbas21 May 12, 2026
1173aa2
refactor: move docs-site from packages/ to apps/docs/
ryanbas21 May 12, 2026
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
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Docs

on:
push:
branches: [main]
paths:
- 'apps/docs/**'

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- name: Build docs site
run: pnpm --filter docs-site build

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

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ packged/
out-tsc/
.direnv/
.corepack/
.worktrees/
5 changes: 5 additions & 0 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
elm-stuff/
dist/
.elm-pages/
functions/
1 change: 1 addition & 0 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# README
26 changes: 26 additions & 0 deletions apps/docs/app/Api.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module Api exposing (routes)

import ApiRoute exposing (ApiRoute)
import BackendTask exposing (BackendTask)
import FatalError exposing (FatalError)
import Html exposing (Html)
import Pages.Manifest as Manifest
import Route exposing (Route)


routes :
BackendTask FatalError (List Route)
-> (Maybe { indent : Int, newLines : Bool } -> Html Never -> String)
-> List (ApiRoute ApiRoute.Response)
routes getStaticRoutes htmlToString =
[]


manifest : Manifest.Config
manifest =
Manifest.init
{ name = "Site Name"
, description = "Description"
, startUrl = Route.Index |> Route.toPath
, icons = []
}
190 changes: 190 additions & 0 deletions apps/docs/app/Effect.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
module Effect exposing (Effect(..), batch, fromCmd, map, none, perform, testPerform)

{-|

@docs Effect, batch, fromCmd, map, none, perform, testPerform

-}

import Browser.Navigation
import Form
import Http
import Json.Decode as Decode
import Pages.Fetcher
import Test.PagesProgram.SimulatedEffect as SimulatedEffect exposing (SimulatedEffect)
import Url exposing (Url)


{-| -}
type Effect msg
= None
| Cmd (Cmd msg)
| Batch (List (Effect msg))
| GetStargazers (Result Http.Error Int -> msg)
| SetField { formId : String, name : String, value : String }
| FetchRouteData
{ data : Maybe FormData
, toMsg : Result Http.Error Url -> msg
}
| Submit
{ values : FormData
, toMsg : Result Http.Error Url -> msg
}
| SubmitFetcher (Pages.Fetcher.Fetcher msg)


{-| -}
type alias RequestInfo =
{ contentType : String
, body : String
}


{-| -}
none : Effect msg
none =
None


{-| -}
batch : List (Effect msg) -> Effect msg
batch =
Batch


{-| -}
fromCmd : Cmd msg -> Effect msg
fromCmd =
Cmd


{-| -}
map : (a -> b) -> Effect a -> Effect b
map fn effect =
case effect of
None ->
None

Cmd cmd ->
Cmd (Cmd.map fn cmd)

Batch list ->
Batch (List.map (map fn) list)

GetStargazers toMsg ->
GetStargazers (toMsg >> fn)

FetchRouteData fetchInfo ->
FetchRouteData
{ data = fetchInfo.data
, toMsg = fetchInfo.toMsg >> fn
}

Submit fetchInfo ->
Submit
{ values = fetchInfo.values
, toMsg = fetchInfo.toMsg >> fn
}

SetField info ->
SetField info

SubmitFetcher fetcher ->
fetcher
|> Pages.Fetcher.map fn
|> SubmitFetcher


{-| -}
perform :
{ fetchRouteData :
{ data : Maybe FormData
, toMsg : Result Http.Error Url -> pageMsg
}
-> Cmd msg
, submit :
{ values : FormData
, toMsg : Result Http.Error Url -> pageMsg
}
-> Cmd msg
, runFetcher :
Pages.Fetcher.Fetcher pageMsg
-> Cmd msg
, fromPageMsg : pageMsg -> msg
, key : Browser.Navigation.Key
, setField : { formId : String, name : String, value : String } -> Cmd msg
}
-> Effect pageMsg
-> Cmd msg
perform ({ fromPageMsg, key } as helpers) effect =
case effect of
None ->
Cmd.none

Cmd cmd ->
Cmd.map fromPageMsg cmd

SetField info ->
helpers.setField info

Batch list ->
Cmd.batch (List.map (perform helpers) list)

GetStargazers toMsg ->
Http.get
{ url =
"https://api.github.com/repos/dillonkearns/elm-pages"
, expect = Http.expectJson (toMsg >> fromPageMsg) (Decode.field "stargazers_count" Decode.int)
}

FetchRouteData fetchInfo ->
helpers.fetchRouteData
fetchInfo

Submit record ->
helpers.submit record

SubmitFetcher record ->
helpers.runFetcher record


{-| Decompose an Effect into a SimulatedEffect for the test framework.
Maintain this function alongside `perform` when adding custom Effect variants.
-}
testPerform : Effect msg -> SimulatedEffect msg
testPerform effect =
case effect of
None ->
SimulatedEffect.none

Cmd _ ->
SimulatedEffect.none

Batch list ->
SimulatedEffect.batch (List.map testPerform list)

GetStargazers toMsg ->
-- In tests, provide a mock value for the stargazers count.
-- Alternatively, return SimulatedEffect.none and use
-- PagesProgram.simulateMsg to provide the result manually.
SimulatedEffect.dispatchMsg (toMsg (Ok 0))

SetField info ->
SimulatedEffect.setField info

FetchRouteData _ ->
SimulatedEffect.none

Submit _ ->
SimulatedEffect.none

SubmitFetcher fetcher ->
SimulatedEffect.submitFetcher fetcher


type alias FormData =
{ fields : List ( String, String )
, method : Form.Method
, action : String
, id : Maybe String
}
84 changes: 84 additions & 0 deletions apps/docs/app/ErrorPage.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
module ErrorPage exposing (ErrorPage(..), Model, Msg, head, init, internalError, notFound, statusCode, update, view)

import Effect exposing (Effect)
import Head
import Html exposing (Html)
import View exposing (View)


type Msg
= Increment


type alias Model =
{ count : Int
}


init : ErrorPage -> ( Model, Effect Msg )
init errorPage =
( { count = 0 }
, Effect.none
)


update : ErrorPage -> Msg -> Model -> ( Model, Effect Msg )
update errorPage msg model =
case msg of
Increment ->
( { model | count = model.count + 1 }, Effect.none )


head : ErrorPage -> List Head.Tag
head errorPage =
[]


type ErrorPage
= NotFound
| InternalError String


notFound : ErrorPage
notFound =
NotFound


internalError : String -> ErrorPage
internalError =
InternalError


view : ErrorPage -> Model -> View Msg
view error model =
{ body =
[ Html.div []
[ Html.p []
[ Html.text <|
case error of
NotFound ->
"Page not found. Maybe try another URL?"

InternalError string ->
"Something went wrong.\n" ++ string
]
]
]
, title =
case error of
NotFound ->
"Page Not Found"

InternalError string ->
"Unexpected Error"
}


statusCode : ErrorPage -> number
statusCode error =
case error of
NotFound ->
404

InternalError _ ->
500
Loading
Loading