fix(meta): only add description if summary exists

Closes #10
This commit is contained in:
Rafael Bardini 2021-03-09 12:40:08 +01:00
parent b5baa3f208
commit 2edf556a7e
3 changed files with 7 additions and 4 deletions

2
partials/meta.hbs Normal file
View File

@ -0,0 +1,2 @@
{{#name}}<title>{{.}}</title>{{/name}}
{{#summary}}<meta name="description" content="{{stripTags (markdown .)}}">{{/summary}}

View File

@ -2,8 +2,9 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{{resume.basics.name}}</title> {{#resume.basics}}
<meta name="description" content="{{stripTags (markdown resume.basics.summary)}}"> {{> meta}}
{{/resume.basics}}
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap">
<style>{{{css}}}</style> <style>{{{css}}}</style>