wrong url following the readme quickstart
asdf8601 opened this issue · 2 comments
asdf8601 commented
I've started using markata
and following the quick-start from the readme I've found an issue with index's urls.
MRE
mkdir pages
cd pages
echo '# My First Post' > first-post.md
echo '# Hello World' > hello-world.md
pipx run markata build
When I've opened the output markout/index.html
both links didn't work. Here's the html code:
<li class='post'>
<a href="/hello-world/">
Hello World
</a>
</li>
<li class='post'>
<a href="/first-post/">
First Post
</a>
I guess that maybe the relative path ( .
) is missed; what it works in my case:
<li class='post'>
- <a href="/hello-world/">
+ <a href="./hello-world/index.html">
Hello World
</a>
</li>
<li class='post'>
- <a href="/first-post/">
+ <a href="./first-post/index.html">
First Post
</a>
WaylonWalker commented
Are you running a webserver or, just opening the HTML directly? I just tried it on my machine and this works for me.
I did notice that you are running markata from the pages directory. I will probably change the quickstart to this so that you run from the root directory.
mkdir pages
echo '# My First Post' > pages/first-post.md
echo '# Hello World' > pages/hello-world.md
pipx run markata build
python -m http.server 8000 --directory markout
asdf8601 commented
Exactly, I've just opened the index.html file. Adding that line will help ;-)
Update:
A more accurate MRE would be:
mkdir pages
cd pages
echo '# My First Post' > first-post.md
echo '# Hello World' > hello-world.md
pipx run markata build
xdg-open markout/index.html