When I access a page in a module, how to redirect to another page?
I knew the start_page
option. I built a blog which was based on Antora.
When I access the default page, for example, index.html
, I want the default page redirect to the last article.
The link on the top menu goes to the blog default page index.html
, if I configure the start_page
option, I have to change the link on the top menu.
I find a tradeoff way: I write the following content to the index.adoc
, when I access the blog default page, it can redirect to another-page.html
.
++++
<script type="text/javascript">
window.location.replace(“./another-page.html");
</script>
++++