File tree 6 files changed +57
-1
lines changed
6 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width,initial-scale=1 " />
6
+ < meta name ="theme-color " content ="#fff " />
7
+ < %- include('src/templates/meta', meta) %>
8
+
5
9
< title > < %= fn.getCVTitle(cv) %> </ title >
6
10
< style >
7
11
/* Note: if you add additional styles to this class, you should remove them in `@media print` to ensure .cv-container remains styleless when printing */
Original file line number Diff line number Diff line change 4
4
< meta charset ="UTF-8 ">
5
5
< meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
+ < %- include('src/templates/meta', editorMeta) %>
8
+
7
9
< title > JSONCV Editor</ title >
8
10
< link rel ="shortcut icon " href ="../favicon.png " type ="image/png ">
9
11
< link rel ="stylesheet " href ="../scss/editor/index.scss " />
Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="UTF-8 ">
5
- < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < meta name ="theme-color " content ="#fff " />
7
+ < %- include('src/templates/meta', meta) %>
8
+
7
9
< link rel ="shortcut icon " href ="favicon.png " type ="image/png ">
8
10
< title > JSONCV</ title >
9
11
< link rel ="stylesheet " href ="./scss/home.scss " />
Original file line number Diff line number Diff line change
1
+ <meta name =" description" content =" <%= description %>" >
2
+ <meta property =" og:title" content =" <%= title %>" >
3
+ <meta property =" og:description" content =" <%= description %>" >
4
+ <meta property =" og:type" content =" website" >
5
+ <% if (locals .url ) { % >
6
+ < meta property= " og:url" content= " <%= url %>" >
7
+ < link rel= " canonical" href= " <%= url %>" / >
8
+ < % } %>
9
+ <% if (locals .twitter ) { % >
10
+ < meta name= " twitter:card" property= " twitter:card" content= " <%= twitter.card %>" >
11
+ < meta name= " twitter:creator" property= " twitter:creator" content= " @<%= twitter.username %>" >
12
+ < meta name= " twitter:title" property= " twitter:title" content= " <%= title %>" >
13
+ < meta name= " twitter:description" property= " twitter:description" content= " <%= description %>" >
14
+ < % } %>
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ const data = require(dataFilename)
13
13
const renderData = getRenderData ( data )
14
14
renderData . theme = process . env . THEME || 'reorx'
15
15
renderData . isProduction = process . env . NODE_ENV === 'production'
16
+ renderData . meta = {
17
+ title : data . basics . name ,
18
+ description : data . basics . summary . replace ( '\n' , ' ' ) ,
19
+ }
16
20
17
21
18
22
export default defineConfig ( {
Original file line number Diff line number Diff line change 1
1
import { resolve } from 'path' ;
2
2
import { defineConfig } from 'vite' ;
3
+ import { ViteEjsPlugin } from 'vite-plugin-ejs' ;
3
4
4
5
import { TransformEjs } from './src/lib/vite-plugins' ;
5
6
6
7
const rootDir = resolve ( __dirname , 'src' )
8
+ const renderData = {
9
+ meta : {
10
+ title : "jsoncv" ,
11
+ description : "A toolkit for building your CV with JSON and creating stylish HTML/PDF files." ,
12
+ url : "https://jsoncv.reorx.com" ,
13
+ twitter : {
14
+ card : "summary" ,
15
+ username : "novoreorx" ,
16
+ }
17
+ } ,
18
+ editorMeta : {
19
+ title : "jsoncv Editor" ,
20
+ description : "The online editor of the jsoncv project." ,
21
+ url : "https://jsoncv.reorx.com/editor/" ,
22
+ twitter : {
23
+ card : "summary" ,
24
+ username : "novoreorx" ,
25
+ }
26
+ }
27
+ }
7
28
8
29
export default defineConfig ( {
9
30
root : 'src' ,
@@ -26,5 +47,14 @@ export default defineConfig({
26
47
} ,
27
48
plugins : [
28
49
TransformEjs ( ) ,
50
+ ViteEjsPlugin (
51
+ renderData ,
52
+ {
53
+ ejs : ( viteConfig ) => ( {
54
+ // ejs options goes here.
55
+ views : [ resolve ( __dirname ) ] ,
56
+ } )
57
+ }
58
+ ) ,
29
59
] ,
30
60
} )
You can’t perform that action at this time.
0 commit comments