Skip to content

Commit

Permalink
Try to generate pdf from roadmap
Browse files Browse the repository at this point in the history
  • Loading branch information
JStumpp committed Nov 30, 2020
1 parent 3c2a8e0 commit 84a97ca
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 59 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ jobs:
- run: npm install
- run: npm run build --if-present
env:
CI: true
CI: true
- run: npm run export
env:
EXPORT_PDF: true
CI: true
- name: Azure Login
uses: azure/login@v1
with:
Expand Down
15 changes: 10 additions & 5 deletions .vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ module.exports = {
{ text: 'AI Newsletter', link: 'https://i.am.ai/newsletter', target:'_self' },
]
},
patterns: process.env.EXPORT_PDF === 'True' ? ['readme.md'] : ['**/*.md', '**/*.vue'],
plugins: ['@snowdog/vuepress-plugin-pdf-export', {
puppeteerLaunchOptions: {
args: ['--no-sandbox', '--disable-setuid-sandbox']
}
}],
/* using this Google Analytics Plugin makes metomic's autoblock impossible
plugins: {
Expand All @@ -42,28 +48,27 @@ module.exports = {
},*/

head: [
['script', {
process.env.EXPORT_PDF === 'True' ? [] : ['script', {
src: 'https://config.metomic.io/config.js?id=prj:c5c07948-cf96-4555-99ec-3a9bf5ae16ce',
crossorigin: 'anonymous',
charset: 'utf-8'
}],
['script', {
process.env.EXPORT_PDF === 'True' ? [] :['script', {
src: 'https://consent-manager.metomic.io/embed.js',
crossorigin: 'anonymous',
charset: 'utf-8'
}],
['script', {
process.env.EXPORT_PDF === 'True' ? [] :['script', {
async: true,
src: 'https://www.googletagmanager.com/gtag/js?id=UA-131730139-2'
}],
['script', {}, `
process.env.EXPORT_PDF === 'True' ? [] :['script', {}, `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-131730139-2');
`],

['link', {
rel: 'icon',
href: `/logos/icon-512x512.png`
Expand Down
Loading

0 comments on commit 84a97ca

Please sign in to comment.