{% capture version %}/{{page.version}}/{% endcapture %} {% capture redirectto %}{{site.baseurl}}/{{ page.path | replace: "/latest/", version | replace: "index.md", "" }}{% endcapture %}