How to get url? from template in koa2

my page uses the views/layouts/index.hbs template, in which there are three links corresponding to three pages. The question now is: how can I get the current path, because I want to set the active class name to the corresponding link according to the current path?

<div class="col-md-8 col-sm-4 col-4">
    <ul class="menu">
        <li class="active">
            <i class="fa fa-edit"></i>
            <a href="/"></a>
        </li>
        <li>
            <i class="fa fa-rss"></i>
            <a href="/subscribe"></a>
        </li>
        <li>
            <i class="fa fa-bitbucket"></i>
            <a href="/life"></a>
        </li>
    </ul>
    <a href="-sharp" class="nav-menu">
        <i class="fa fa-align-justify"></i>
    </a>
</div>
Feb.26,2021

you can put url in data when you render.
you can also use its helper. Here is demo
https://github.com/koajs/koa-.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bcb977-30a79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bcb977-30a79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?