Skip to content

Commit 0ee7d4a

Browse files
authored
Merge pull request #24 from hexagonkt/develop
Schema changes
2 parents 9cb7f22 + b0c8b2c commit 0ee7d4a

16 files changed

Lines changed: 213 additions & 113 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ val os = getProperty("os.name").lowercase()
1111

1212
val hexagonVersion = "2.8.6"
1313
val hexagonExtraVersion = "2.8.4"
14-
val vertxVersion = "4.4.3"
14+
val vertxVersion = "4.4.4"
1515

1616
val gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/$hexagonVersion/gradle"
1717

@@ -70,7 +70,6 @@ tasks.named<CreateStartScripts>("startScripts") {
7070

7171
tasks.create<Copy>("addResources") {
7272
from(projectDir)
73-
include("templates/cv.html")
7473
include("examples/**")
7574
include("cv.schema.json")
7675
into(buildDir.resolve("resources/main"))

cv.schema.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@
162162
"title" : "Short name you commonly use or nickname",
163163
"$ref" : "#/$defs/NullableString"
164164
},
165-
"Website" : {
166-
"title" : "Personal website",
167-
"$ref" : "#/$defs/NullableUri"
168-
},
169165
"Photo" : {
170166
"title" : "Photo address",
171167
"$ref" : "#/$defs/NullableUri"
@@ -846,6 +842,7 @@
846842
"Contact" : {
847843
"title" : "Contact data of the referrer person",
848844
"type" : "array",
845+
"uniqueItems" : true,
849846
"items" : {
850847
"$ref" : "#/$defs/Link"
851848
}
@@ -894,7 +891,7 @@
894891
"additionalProperties" : false,
895892
"properties" : {
896893
"$schema" : {
897-
"title" : "Schema used for the CV",
894+
"title" : "Schema used for the document",
898895
"description" : "Used to deal with different versions. It also eases the use on some editors",
899896
"type" : "string",
900897
"format" : "URI"
@@ -954,6 +951,7 @@
954951
"Contact" : {
955952
"title" : "Contact data",
956953
"type" : "array",
954+
"uniqueItems" : true,
957955
"items" : {
958956
"$ref" : "#/$defs/Link"
959957
}
@@ -999,17 +997,18 @@
999997
"type" : "string"
1000998
}
1001999
},
1002-
"Social Profiles" : {
1003-
"title" : "Set of URLs pointing to social profiles",
1000+
"Links" : {
1001+
"title" : "List of links pointing to another resources (like social networks profiles)",
10041002
"type" : "array",
10051003
"uniqueItems" : true,
10061004
"items" : {
1007-
"$ref" : "#/$defs/Uri"
1005+
"$ref" : "#/$defs/Link"
10081006
}
10091007
},
10101008
"Languages" : {
10111009
"title" : "List of languages aside of the birth language",
10121010
"type" : "array",
1011+
"uniqueItems" : true,
10131012
"items" : {
10141013
"$ref" : "#/$defs/LanguageSkill"
10151014
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,23 +190,23 @@ <h2>Personal Information</h2>
190190

191191
<div class="row">
192192
<ul>
193-
{% for socialProfile in cv.socialProfiles %}
193+
{% for link in cv.links %}
194194
<li>
195-
{% if socialProfile contains "twitter" %}
195+
{% if link.address contains "twitter" %}
196196
{% set socialNetworkTitle = "Twitter" %}
197-
{% elseif socialProfile contains "github" %}
197+
{% elseif link.address contains "github" %}
198198
{% set socialNetworkTitle = "GitHub" %}
199-
{% elseif socialProfile contains "linkedin" %}
199+
{% elseif link.address contains "linkedin" %}
200200
{% set socialNetworkTitle = "LinkedIn" %}
201-
{% elseif socialProfile contains "stackoverflow" %}
201+
{% elseif link.address contains "stackoverflow" %}
202202
{% set socialNetworkTitle = "Stack Overflow" %}
203-
{% elseif socialProfile contains "dev" %}
203+
{% elseif link.address contains "dev" %}
204204
{% set socialNetworkTitle = "Dev" %}
205205
{% else %}
206206
{% set socialNetworkTitle = "Not Found" %}
207207
{% endif %}
208208
{% set socialNetworkIcon = socialNetworkTitle | lower | replace({' ': '-'}) %}
209-
<a href="{{ socialProfile }}" title="{{ socialNetworkTitle }}">
209+
<a href="{{ link.address }}" title="{{ socialNetworkTitle }}">
210210
<i class="fab fa-{{ socialNetworkIcon }}"></i>
211211
</a>
212212
</li>

examples/full.cv.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"Locale" : "en_US",
77
"Last Update" : "2022-12-27",
8-
"Templates" : [ "file:templates/cv.html" ],
8+
"Templates" : [ "file:cv.html" ],
99
"Variables" : {
1010
"gaFont" : "family=Roboto+Slab:wght@400;500;700",
1111
"colorPrimary" : "#087cfa",
@@ -24,7 +24,6 @@
2424
"Birth" : "1988-08-16",
2525
"Birth Country" : "US",
2626
"Alias" : "Bitchard",
27-
"Website" : "https://example.net",
2827
"Photo" : "https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg",
2928
"Avatar" : "https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg",
3029
"Nationalities" : [ "US" ],
@@ -104,10 +103,10 @@
104103
"Low level Programming"
105104
],
106105

107-
"Social Profiles" : [
108-
"https://github.com/hexagonkt/hexagon",
109-
"https://twitter.com/hexagon_kt",
110-
"https://dev.to/hexagonkt"
106+
"Links" : [
107+
{ "Address" : "https://github.com/hexagonkt/hexagon" },
108+
{ "Address" : "https://twitter.com/hexagon_kt" },
109+
{ "Address" : "https://dev.to/hexagonkt" }
111110
],
112111

113112
"Languages" : [

examples/full.cv.toml

100755100644
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Last Update" = 2022-12-27
77

88
Locale = "en_US"
9-
Templates = [ "file:templates/cv.html" ]
9+
Templates = [ "file:cv.html" ]
1010

1111
Bio = """\
1212
Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. \
@@ -38,6 +38,12 @@ Goals = [
3838
"Wildlife, specially ferrets and unicorns"
3939
]
4040

41+
Links = [
42+
{ Address = "https://github.com/hexagonkt/hexagon" },
43+
{ Address = "https://twitter.com/hexagon_kt" },
44+
{ Address = "https://dev.to/hexagonkt" },
45+
]
46+
4147
[Variables]
4248
gaFont = "family=Roboto+Slab:wght@400;500;700"
4349
colorPrimary = "#087cfa"
@@ -55,7 +61,6 @@ Pronoun = "masculine"
5561
Gender = "man"
5662
Birth = "1988-08-16"
5763
Alias = "Bitchard"
58-
Website = "https://example.net"
5964
Photo = "https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg"
6065
Avatar = "https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg"
6166
Nationalities = [ "US" ]

examples/full.cv.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Job Status: not moving
77

88
Locale: en_US
99
Last Update: 2022-12-27
10-
Templates: [ file:templates/cv.html ]
10+
Templates: [ file:cv.html ]
1111
Variables:
1212
gaFont: family=Roboto+Slab:wght@400;500;700
1313
colorPrimary: '#087cfa'
@@ -25,7 +25,6 @@ Personal:
2525
Birth: 1988-08-16
2626
Birth Country: US
2727
Alias: Bitchard
28-
Website: https://example.net
2928
Photo: https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg
3029
Avatar: https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg
3130
Nationalities: [ US ]
@@ -94,10 +93,10 @@ Top Skills:
9493
- Data structures and Algorithms
9594
- Low level Programming
9695

97-
Social Profiles:
98-
- https://github.com/hexagonkt/hexagon
99-
- https://twitter.com/hexagon_kt
100-
- https://dev.to/hexagonkt
96+
Links:
97+
- Address: https://github.com/hexagonkt/hexagon
98+
- Address: https://twitter.com/hexagon_kt
99+
- Address: https://dev.to/hexagonkt
101100

102101
Languages:
103102
- Language: fr

examples/modular/common.cv.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $schema: https://raw.githubusercontent.com/hexagonkt/codecv/master/cv.schema.jso
44

55
Job Status: not moving
66
Last Update: 2022-12-27
7-
Templates: [ file:templates/cv.html ]
7+
Templates: [ file:../cv.html ]
88

99
Personal:
1010
Given Name: Richard
@@ -15,7 +15,6 @@ Personal:
1515
Birth: 1988-08-16
1616
Birth Country: US
1717
Alias: Bitchard
18-
Website: https://example.net
1918
Photo: https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg
2019
Avatar: https://static.wikia.nocookie.net/silicon-valley/images/3/33/Richard_Hendricks.jpg
2120
Nationalities: [ US ]
@@ -85,10 +84,12 @@ Top Skills:
8584
- Data structures and Algorithms
8685
- Low level Programming
8786

88-
Social Profiles:
89-
- https://github.com/hexagonkt/hexagon
90-
- https://twitter.com/hexagon_kt
91-
- https://dev.to/hexagonkt
87+
Links:
88+
- Title: Website
89+
Address: https://example.net
90+
- Address: https://github.com/hexagonkt/hexagon
91+
- Address: https://twitter.com/hexagon_kt
92+
- Address: https://dev.to/hexagonkt
9293

9394
Languages:
9495
- Language: fr

examples/regular.cv.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema" : "https://raw.githubusercontent.com/hexagonkt/codecv/master/cv.schema.json",
33

44
"Locale" : "en_US",
5-
"Templates" : [ "file:templates/cv.html" ],
5+
"Templates" : [ "file:cv.html" ],
66
"Variables" : {
77
"gaFont" : "family=Roboto+Slab:wght@400;500;700",
88
"colorPrimary" : "#087cfa",
@@ -65,10 +65,10 @@
6565
"Low level Programming"
6666
],
6767

68-
"Social Profiles" : [
69-
"https://github.com/hexagonkt/hexagon",
70-
"https://twitter.com/hexagon_kt",
71-
"https://dev.to/hexagonkt"
68+
"Links" : [
69+
{ "Address" : "https://github.com/hexagonkt/hexagon" },
70+
{ "Address" : "https://twitter.com/hexagon_kt" },
71+
{ "Address" : "https://dev.to/hexagonkt" }
7272
],
7373

7474
"Languages" : [

examples/regular.cv.toml

100755100644
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"$schema" = "https://raw.githubusercontent.com/hexagonkt/codecv/master/cv.schema.json"
44

55
Locale = "en_US"
6-
Templates = [ "file:templates/cv.html" ]
6+
Templates = [ "file:cv.html" ]
77

88
Bio = """\
99
Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. \
@@ -30,6 +30,12 @@ Goals = [
3030
"https://dev.to/hexagonkt",
3131
]
3232

33+
Links = [
34+
{ Address = "https://github.com/hexagonkt/hexagon" },
35+
{ Address = "https://twitter.com/hexagon_kt" },
36+
{ Address = "https://dev.to/hexagonkt" },
37+
]
38+
3339
[Variables]
3440
gaFont = "family=Roboto+Slab:wght@400;500;700"
3541
colorPrimary = "#087cfa"

examples/regular.cv.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$schema: https://raw.githubusercontent.com/hexagonkt/codecv/master/cv.schema.json
55

66
Locale: en_US
7-
Templates: [ file:templates/cv.html ]
7+
Templates: [ file:cv.html ]
88
Variables:
99
gaFont: family=Roboto+Slab:wght@400;500;700
1010
colorPrimary: '#087cfa'
@@ -63,10 +63,10 @@ Top Skills:
6363
- Data structures and Algorithms
6464
- Low level Programming
6565

66-
Social Profiles:
67-
- https://github.com/hexagonkt/hexagon
68-
- https://twitter.com/hexagon_kt
69-
- https://dev.to/hexagonkt
66+
Links:
67+
- Address: https://github.com/hexagonkt/hexagon
68+
- Address: https://twitter.com/hexagon_kt
69+
- Address: https://dev.to/hexagonkt
7070

7171
Languages:
7272
- Language: fr

0 commit comments

Comments
 (0)