Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add page option and hide nav bar when generating PDF #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

foreseaz
Copy link

Resolve #15 [feature] config for user to hide nav bar and change margin

@foreseaz
Copy link
Author

foreseaz commented Jan 30, 2020

Usage:

[
    "vuepress-plugin-export",
    {
        hideNav: true,
        page: {
            format: 'A4',
            printBackground: true,
            margin: {
                top: 60,
                left: 20,
                right: 20,
                bottom: 60
            }
        }
    }
]

@foreseaz
Copy link
Author

foreseaz commented Jan 30, 2020

  extendPageData($page) {
    if (opts.hideNav) {
      const {
        _context: { themeConfig }
      } = $page
      themeConfig.navbar = false
    }
  },

Directly change the _context may affect the building of original deployment. Need to find another workaroudn for hiding the navbar.

@ulivz
Copy link
Owner

ulivz commented Jul 17, 2021

Could u help resolve the conflict & update docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] config for user to hide nav bar and change margin
2 participants