├── .gitattributes
├── .husky
└── pre-commit
├── .prettierignore
├── go.mod
├── .editorconfig
├── layouts
├── shortcodes
│ └── json-resume.html
└── partials
│ ├── json-resume
│ ├── basics-image.html
│ ├── duration.html
│ ├── references.html
│ ├── languages.html
│ ├── interests.html
│ ├── skills.html
│ ├── awards.html
│ ├── certificates.html
│ ├── publications.html
│ ├── education.html
│ ├── volunteer.html
│ ├── projects.html
│ ├── work.html
│ └── basics.html
│ └── simple-icon.html
├── screenshots
└── example-resume-section-headers.png
├── .vscode
├── extensions.json
└── settings.json
├── .prettierrc.json
├── .github
├── renovate.json
└── workflows
│ └── update-hugo-dependencies.yml
├── package.hugo.json
├── LICENSE
├── assets
└── css
│ └── json-resume.css
├── package.json
├── .gitignore
├── README.md
└── data
└── json_resume
└── en.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
2 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | npx lint-staged
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | public
4 | resources
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/schnerring/hugo-mod-json-resume
2 |
3 | go 1.25.5
4 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_size = 2
7 | indent_style = space
--------------------------------------------------------------------------------
/layouts/shortcodes/json-resume.html:
--------------------------------------------------------------------------------
1 | {{ $jsonResumeSection := .Get 0 }}
2 | {{ partial (printf "json-resume/%s" $jsonResumeSection) . }}
3 |
--------------------------------------------------------------------------------
/screenshots/example-resume-section-headers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/schnerring/hugo-mod-json-resume/HEAD/screenshots/example-resume-section-headers.png
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "davidanson.vscode-markdownlint",
4 | "editorconfig.editorconfig",
5 | "esbenp.prettier-vscode",
6 | ]
7 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.defaultFormatter": "esbenp.prettier-vscode",
3 | "[html]": {
4 | "editor.defaultFormatter": "esbenp.prettier-vscode"
5 | },
6 | "editor.formatOnSave": true,
7 | }
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": ["prettier-plugin-go-template"],
3 | "overrides": [
4 | {
5 | "files": ["*.html"],
6 | "options": {
7 | "parser": "go-template"
8 | }
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/layouts/partials/json-resume/basics-image.html:
--------------------------------------------------------------------------------
1 | {{ if .image }}
2 |
4 | {{ partial "json-resume/basics-image.html" . }}
5 |
6 | {{ with .name }}
7 |
{{ . }}
8 | {{ end }}
9 |
10 | {{ with .label }}
11 |
{{ . }}
12 | {{ end }}
13 |
14 | {{ with .email }}
15 |
{{ . }}
16 | {{ end }}
17 |
18 | {{ with .phone }}
19 |
{{ . }}
20 | {{ end }}
21 |
22 | {{ with .url }}
23 |
26 | {{ end }}
27 |
28 | {{ with .summary }}
29 |
{{ . }}
30 | {{ end }}
31 |
32 | {{ with .location }}
33 | {{ with .address }}
34 |
{{ . }}
35 | {{ end }}
36 |
37 | {{ with .postalCode }}
38 |
{{ . }}
39 | {{ end }}
40 |
41 | {{ with .city }}
42 |
{{ . }}
43 | {{ end }}
44 |
45 | {{ with .countryCode }}
46 |
{{ . }}
47 | {{ end }}
48 |
49 | {{ with .region }}
50 |
{{ . }}
51 | {{ end }}
52 | {{ end }}
53 |
54 | {{ with where .profiles "username" "ne" nil }}
55 |
56 |
57 | {{ range . }}
58 | {{ partial "simple-icon.html" (dict "url" .url "network" .network "username" .username) }}
59 | {{ end }}
60 |
61 | {{ end }}
62 |
63 | {{ with where .profiles "username" "eq" nil }}
64 |
65 |
66 | {{ range . }}
67 | {{ partial "simple-icon.html" (dict "url" .url "network" .network "username" .username) }}
68 | {{ end }}
69 |
70 | {{ end }}
71 |
72 | {{ end }}
73 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.toptal.com/developers/gitignore/api/hugo,node
3 | # Edit at https://www.toptal.com/developers/gitignore?templates=hugo,node
4 |
5 | ### Hugo ###
6 | # Generated files by hugo
7 | /public/
8 | /resources/_gen/
9 |
10 | # Executable may be added to repository
11 | hugo.exe
12 | hugo.darwin
13 | hugo.linux
14 |
15 | ### Node ###
16 | # Logs
17 | logs
18 | *.log
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 | lerna-debug.log*
23 | .pnpm-debug.log*
24 |
25 | # Diagnostic reports (https://nodejs.org/api/report.html)
26 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
27 |
28 | # Runtime data
29 | pids
30 | *.pid
31 | *.seed
32 | *.pid.lock
33 |
34 | # Directory for instrumented libs generated by jscoverage/JSCover
35 | lib-cov
36 |
37 | # Coverage directory used by tools like istanbul
38 | coverage
39 | *.lcov
40 |
41 | # nyc test coverage
42 | .nyc_output
43 |
44 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
45 | .grunt
46 |
47 | # Bower dependency directory (https://bower.io/)
48 | bower_components
49 |
50 | # node-waf configuration
51 | .lock-wscript
52 |
53 | # Compiled binary addons (https://nodejs.org/api/addons.html)
54 | build/Release
55 |
56 | # Dependency directories
57 | node_modules/
58 | jspm_packages/
59 |
60 | # Snowpack dependency directory (https://snowpack.dev/)
61 | web_modules/
62 |
63 | # TypeScript cache
64 | *.tsbuildinfo
65 |
66 | # Optional npm cache directory
67 | .npm
68 |
69 | # Optional eslint cache
70 | .eslintcache
71 |
72 | # Microbundle cache
73 | .rpt2_cache/
74 | .rts2_cache_cjs/
75 | .rts2_cache_es/
76 | .rts2_cache_umd/
77 |
78 | # Optional REPL history
79 | .node_repl_history
80 |
81 | # Output of 'npm pack'
82 | *.tgz
83 |
84 | # Yarn Integrity file
85 | .yarn-integrity
86 |
87 | # dotenv environment variables file
88 | .env
89 | .env.test
90 | .env.production
91 |
92 | # parcel-bundler cache (https://parceljs.org/)
93 | .cache
94 | .parcel-cache
95 |
96 | # Next.js build output
97 | .next
98 | out
99 |
100 | # Nuxt.js build / generate output
101 | .nuxt
102 | dist
103 |
104 | # Gatsby files
105 | .cache/
106 | # Comment in the public line in if your project uses Gatsby and not Next.js
107 | # https://nextjs.org/blog/next-9-1#public-directory-support
108 | # public
109 |
110 | # vuepress build output
111 | .vuepress/dist
112 |
113 | # Serverless directories
114 | .serverless/
115 |
116 | # FuseBox cache
117 | .fusebox/
118 |
119 | # DynamoDB Local files
120 | .dynamodb/
121 |
122 | # TernJS port file
123 | .tern-port
124 |
125 | # Stores VSCode versions used for testing VSCode extensions
126 | .vscode-test
127 |
128 | # yarn v2
129 | .yarn/cache
130 | .yarn/unplugged
131 | .yarn/build-state.yml
132 | .yarn/install-state.gz
133 | .pnp.*
134 |
135 | ### Node Patch ###
136 | # Serverless Webpack directories
137 | .webpack/
138 |
139 | # End of https://www.toptal.com/developers/gitignore/api/hugo,node
140 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # hugo-mod-json-resume
2 |
3 | A [Hugo module](https://gohugo.io/hugo-modules/) containing templates to
4 | integrate multilingual [JSON Resume](https://jsonresume.org/) data into your
5 | Hugo website.
6 |
7 | ## Getting Started
8 |
9 | Initialize your Hugo site as a Hugo module:
10 |
11 | ```shell
12 | hugo mod init example.com
13 | ```
14 |
15 | Add the following to the `config.toml` file of your site to import the module:
16 |
17 | ```toml
18 | [module]
19 | [[module.imports]]
20 | path = "github.com/schnerring/hugo-mod-json-resume"
21 | [[module.mounts]]
22 | source = "node_modules/simple-icons/icons"
23 | target = "assets/simple-icons"
24 | ```
25 |
26 | Install the module:
27 |
28 | ```shell
29 | hugo mod get
30 | ```
31 |
32 | Initialize the NPM `package.json` and install the dependencies:
33 |
34 | ```shell
35 | hugo mod npm pack
36 | npm install
37 | ```
38 |
39 | The module offers a simple CSS stylesheet [assets/css/json-resume.css](./assets/css/json-resume.css)
40 | that you can use.
41 |
42 | Use the `json-resume` shortcode in markdown files:
43 |
44 | ```markdown
45 | ---
46 | title: "CV"
47 | draft: false
48 | ---
49 |
50 | ## Experience
51 |
52 | {{< json-resume "work" >}}
53 |
54 | ## Education
55 |
56 | {{< json-resume "education" >}}
57 | ```
58 |
59 | Or use the partials in your layout files:
60 |
61 | ```html
62 |
65 | ```
66 |
67 | ## Data Structure
68 |
69 | The module reads JSON Resume data from Hugo's `data/` directory:
70 |
71 | ```text
72 | data/
73 | ├─ json_resume/
74 | ├─ de.json
75 | ├─ en.json
76 | ```
77 |
78 | Each file must adhere to the [JSON Resume schema](https://github.com/jsonresume/resume-schema/blob/master/schema.json)
79 | specification. At least one file with the name `