pagedown resume with one-page aside (pagedown 0.14)

For the original topic/question, see this post. The idea is to create a pagedown resume that only has the aside on the first page.

The solution here had been working fine, but with the update to {pagedown} version 0.14, which uses paged.js version 0.1.43, this solution no longer works.

.pagedjs_page:not(:first-of-type) {
  --sidebar-width: 0rem;
  --sidebar-background-color: #ffffff;
  --main-width: calc(var(--content-width) - var(--sidebar-width));
  --decorator-horizontal-margin: 0.2in;
}

Does anyone know of an updated solution to get rid of the aside after the first page? A reprex is available in this repo: GitHub - wjakethompson/cv-test.

2 Likes

Hi @wjakethompson,

Thanks a lot for your question and the reprex. It helped me a lot. I've opened a pull request with the solution.

I'm so sorry that pagedown 0.14 broke your resume. This bug is related to rstudio/pagedown#211. This is a regression introduced in Paged.js. I hadn't had time to investigate its origin.

As a workaround, we can use a trick to bypass this bug: Paged.js only inspects the CSS style elements which are the head element. If we include a style element in the body , Paged.js ignores it. That's absolutely not satisfying but it works!

In order to include a style element in the body one has to use a CSS chunk like that:

---
title: "Lijia Yu's resume"
author: Lijia Yu
date: "`r Sys.Date()`"
output:
  pagedown::html_resume:
    # set it to true for a self-contained HTML page but it'll take longer to render
    self_contained: false
    css: ["custom-styles.css", "resume"]
---

```{css, echo=FALSE}
.pagedjs_page:not(:first-of-type) {
  --sidebar-width: 0rem;
  --sidebar-background-color: #ffffff;
  --main-width: calc(var(--content-width) - var(--sidebar-width));
  --decorator-horizontal-margin: 0.2in;
}
```

Aside
================================================================================
2 Likes

This is perfect! Thank you!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.