File tree Expand file tree Collapse file tree 10 files changed +24
-14
lines changed
Expand file tree Collapse file tree 10 files changed +24
-14
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ dapibus. Massa sapien faucibus et molestie ac feugiat. Consectetur lorem donec
4444massa sapien faucibus et molestie. Amet tellus cras adipiscing enim eu turpis
4545egestas pretium aenean.
4646
47- ![ ] ( /images/sakura-trees.jpg )
47+ ![ ] ({{ /images/sakura-trees.jpg }} )
4848
4949Quis vel eros donec ac odio tempor orci dapibus. A cras semper auctor neque
5050vitae tempus quam pellentesque. Amet nulla facilisi morbi tempus. Mollis nunc
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ page.date = "2019-10-29T17:32:00+02:00"
44page.layout = "blogPost"
55}}
66
7- ![ ] ( /images/sakura-trees.jpg )
7+ ![ ] ({{ /images/sakura-trees.jpg }} )
88
99Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
1010incididunt ut labore et dolore magna aliqua. Faucibus ornare suspendisse sed
Original file line number Diff line number Diff line change 1010
1111 {{ if blogPost.showSummary }}
1212 < h2 >
13- < a href ="{{ blogPost.page.url }} "> {{ blogPost.page.title }}</ a >
13+ < a href ="{{ url( blogPost.page.url) }} "> {{ blogPost.page.title }}</ a >
1414 </ h2 >
1515 < div class ="body summary ">
1616 {{ summarize(blogPost.page.content, 300, true) }}
1717 </ div >
1818 < p >
19- < a href ="{{ blogPost.page.url }} "> Continue reading</ a >
19+ < a href ="{{ url( blogPost.page.url) }} "> Continue reading</ a >
2020 </ p >
2121
2222 {{ else }}
Original file line number Diff line number Diff line change 1111 </ title >
1212
1313 < link rel ="canonical " href ="{{ url(page.permalink) }} ">
14- < link rel ="stylesheet " href ="{{/style.css}} ">
14+ < link rel ="stylesheet " href ="{{ /style.css }} ">
1515 </ head >
1616
1717 < body >
1818 < header >
19- < a href ="/ "> {{ echo(site.title) }}</ a >
19+ < a href ="{{ / }} "> {{ echo(site.title) }}</ a >
2020 </ header >
2121
2222 < div class ="middleOuter "> < div class ="middleInner ">
@@ -27,7 +27,7 @@ <h3>Latest Posts</h3>
2727 {{ fori subpage in subpages("/posts/") }}
2828 {{ if not subpage.isIndex }}
2929 < li >
30- < a href ="{{ subpage.url }} ">
30+ < a href ="{{ url( subpage.url) }} ">
3131 {{ subpage.title }}< br >
3232 < span class ="date "> {{ os.date("%Y-%m-%d", toTime(subpage.publishDate)) }}</ span >
3333 </ a >
Original file line number Diff line number Diff line change 1515 {{ echo(site.title) }}
1616 </ title >
1717
18- < link rel ="canonical " href ="{{ page.permalink }} ">
19- < link rel ="stylesheet " href ="/style.css ">
18+ < link rel ="canonical " href ="{{ url( page.permalink) }} ">
19+ < link rel ="stylesheet " href ="{{ /style.css }} ">
2020 </ head >
2121
2222 < body >
@@ -40,7 +40,7 @@ <h1>My {{ #data.art.art }} Art Pieces</h1>
4040 {{
4141 local w, h = assert(getImageDimensions(piece.file))
4242 }}
43- < img src ="{{ piece.file }} " width ="{{w}} " height ="{{h}} ">
43+ < img src ="{{ url( piece.file) }} " width ="{{w}} " height ="{{h}} ">
4444 < div > {{ '"' .. piece.name .. '"' }}</ div >
4545 </ div >
4646 {{ end }}
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ do...end
8888## HTML
8989
9090<p style =" text-align : center ;" >
91- Centered text!
91+ Centered text in HTML. The following is not a list !
9292 - 1
9393 - 2
9494</p >
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ This is the blog index.
88## Posts
99
1010{{ fori page in subpages() }}
11- - [ {{ page.title }}] ({{ page.url }})
11+ - [ {{ page.title }}] ({{ url( page.url) }})
1212{{ end }}
1313
1414And, that's it!
Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ Text: {{ "foo <img>" }}
140140
141141Html: {{ "<img >" }}
142142
143- echo: {{ echo('<img src =" /images/head.png " >') }}
143+ echo: {{ echo('<img src="'..url" /images/head.png"..' ">') }}
144144
145- echoRaw: {{ echoRaw('<img src =" /images/head.png " >') }}
145+ echoRaw: {{ echoRaw('<img src="'..url" /images/head.png"..' ">') }}
146146
147147
148148
Original file line number Diff line number Diff line change @@ -321,6 +321,11 @@ local function setup()
321321 elseif arg == "--fullpaths" then -- @Doc?
322322 _G.useFullPaths = true
323323
324+ elseif arg == "--baseurloverride" then -- @Doc?
325+ i = i + 1
326+ _G.baseUrlOverride = programArguments[i] or errorNoPos("[Arguments] Missing URL after '%s'.", argRaw)
327+ arg = arg .. '"' .. baseUrlOverride .. '"'
328+
324329 elseif arg:find"^%-" then
325330 errorNoPos("[Arguments] Unknown option '%s'.", argRaw)
326331 else
@@ -1472,6 +1477,10 @@ local function buildWebsite()
14721477 end
14731478
14741479 -- Validate config.baseUrl
1480+ if baseUrlOverride ~= "" then
1481+ site.baseUrl.v = baseUrlOverride
1482+ end
1483+
14751484 local parsedUrl = require"url".parse(site.baseUrl.v)
14761485
14771486 if site.baseUrl.v == "" then
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ _G.logPath = ""
6161_G.toLog = {--[[ message1, ... ]]} -- Before the log file has opened.
6262
6363_G.autobuild = false
64+ _G.baseUrlOverride = ""
6465_G.enableGc = true
6566_G.ignoreModificationTimes = false
6667_G.includeDrafts = false
You can’t perform that action at this time.
0 commit comments