Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding first template view #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 11 additions & 1 deletion pages2docs/Actions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,15 @@ open Suave.Web // for config
open Suave.Filters
open Suave.Writers
open Suave.Operators
open Suave.DotLiquid
open DotLiquid

setTemplatesDir "./templates"

type Model =
{ title : string }

let helloWorld : WebPart =
let o = { title = "Hello" }
page "hello.liquid" o

let helloWorld = OK "<html><body><h1>Welcome to Pages2Docs!</h1></body></html>\n"
11 changes: 11 additions & 0 deletions pages2docs/pages2docs.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@
<HintPath>..\packages\Suave\lib\net40\Suave.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DotLiquid">
<HintPath>..\packages\DotLiquid\lib\net45\DotLiquid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Suave.DotLiquid">
<HintPath>..\packages\Suave.DotLiquid\lib\net40\Suave.DotLiquid.dll</HintPath>
<Private>True</Private>
</Reference>
<None Include="templates\hello.liquid">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Compile Include="Types.fs" />
Expand Down
1 change: 1 addition & 0 deletions pages2docs/templates/hello.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<html><body><h1>Welcome to - Pages2Docs!</h1></body></html>
2 changes: 2 additions & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
source https://www.nuget.org/api/v2
nuget DotLiquid
nuget FAKE
nuget Suave 1.0.0
nuget FSharp.Data 2.2.5
nuget SQLProvider 1.0.0
nuget Npgsql 3.0.7
nuget Dapper 1.42.0
nuget Suave.DotLiquid
nuget xunit 2.1.0
nuget xunit.runner.console 2.0.0
6 changes: 5 additions & 1 deletion paket.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NUGET
remote: https://www.nuget.org/api/v2
specs:
Dapper (1.42)
DotLiquid (2.0.26)
FAKE (4.26)
FSharp.Core (4.0.0.1)
FSharp.Data (2.2.5)
Expand All @@ -10,6 +10,10 @@ NUGET
SQLProvider (1.0)
Suave (1.0)
FSharp.Core (>= 3.1.2.5)
Suave.DotLiquid (1.0)
DotLiquid (>= 1.8)
FSharp.Core (>= 3.1.2.5)
Suave (>= 1.0)
System.Collections (4.0.10) - framework: dnxcore50
System.Diagnostics.Debug (>= 4.0) - framework: dnxcore50
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
Expand Down
3 changes: 2 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ then
docker run -t -p 5000:5000 --env-file ./.env pages2docs
else
source .env
mono ./build/pages2docs.exe
cd ./build/
mono pages2docs.exe
fi