Skip to content

Redirect cv page to pdf #806

Closed Answered by sanjit-bhat
gautamigolani asked this question in Q&A
Discussion options

You must be logged in to vote

You could also modify _layouts/default.html to include the following:

  <!-- Head -->
  <head>
  {%- if page.redirect -%}
    <meta http-equiv="refresh" content="3; url={{ site.baseurl }}/" />
  {%- endif -%}
  {%- if page.redirect_to -%}
    <meta http-equiv="refresh" content="0; url={{ page.redirect_to }}/" />
  {%- endif -%}
  {% include head.html %}
  </head>

Then, your _pages/cv.md would look like:

---
layout: default
permalink: /cv/
title: cv
nav: true
nav_order: 4
redirect_to: /assets/pdf/your-cv.pdf
---

Since this solution re-uses the default.html page, it benefits from still including things like analytics scripts for the cv page.

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@posmikdc
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by george-gca
Comment options

You must be logged in to vote
4 replies
@wenxie18
Comment options

@marctang
Comment options

@wenxie18
Comment options

@mac230
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants