I am trying to create a Gramex application. The intention is to:
- See the root folder
readme.mdpage when I accesslocalhost:9988(localgramexgeneric port) - See the
readme.mdinsubdir1when I accesslocalhost:9988/subdir1/ - See the
readme.mdinsubdir2when 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.