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-.

.
Menu