I am trying to create a Gramex
application. The intention is to:
- See the root folder
readme.md
page when I accesslocalhost:9988
(localgramex
generic port) - See the
readme.md
insubdir1
when I accesslocalhost:9988/subdir1/
- See the
readme.md
insubdir2
when I accesslocalhost:9988/subdir2/
For that I have a gramex.yaml
file, that reads
url:
app:
pattern: /$YAMLURL/
handler: FileHandler
kwargs:
index: false
path:
"": $YAMLPATH/{dir}/readme.md
transform:
"*.md":
encoding: utf-8
function: markdown.markdown(content)
headers:
Content-Type: text/html; charset=UTF-8
default:
dir: ""
file: readme
ext: md
Here localhost:9988
renders the root folder readme.md
.
However, browsing localhost:9988:subdir1
renders the directory index, implying that subdirs
are not working.
Wondering if this is possible or not.