From 38253c1174021bdda4e2c327a5e7d6539145313d Mon Sep 17 00:00:00 2001 From: mertbakir <2335694-mertbakir@users.noreply.gitlab.com> Date: Sat, 13 Feb 2021 14:10:13 +0300 Subject: Publications section added. --- README.md | 15 ++++------ exampleSite/config.toml | 5 ++-- exampleSite/data/publications.yaml | 12 ++++++++ layouts/home.html | 4 +-- layouts/partials/publications.html | 56 ++++++++++++++++++++++++++++++++++++++ layouts/partials/wip/papers.html | 0 6 files changed, 79 insertions(+), 13 deletions(-) create mode 100644 exampleSite/data/publications.yaml create mode 100644 layouts/partials/publications.html delete mode 100644 layouts/partials/wip/papers.html diff --git a/README.md b/README.md index 515c8b2..3796797 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,11 @@ -# To Do: - -1. Papers Section -2. Remove side grid from front config file. [?] > Add new scss and an if statement in head. Should be easy, but I'm not sure if ```/resources``` dependency of theme will be a problem. -3. [Here is the blog post](https://mertbakir.gitlab.io/projects/resume-a4/) - -> _I'm open to suggestions and contributions._ - # Features * Simple, easy to use, single page, A4-sized Resume generator. * Print friendly, just use your browser or save as PDF. * Write your resume in yaml. All content stored in data files. -* Configure sections from ```config.toml```. +* Enable/Disable sections from ```config.toml```. * Section names are configurable in ```config.toml```. So, you can write in any language you want. +* Change ```bib_style``` (APA, IEEE, else) for ```publications.yaml```. # How To Use @@ -38,11 +31,15 @@ $ git clone https://gitlab.com/mertbakir/resume-a4.git * Enable/Disable Sections in ```config.toml``` * Set avatar link in ```config.toml```, keep your image under ```static``` folder if you want. +* You can change bib_style in the config file. I've created options for APA and IEEE standards. You can configure ```publications.html``` file in the ```layouts\partials``` folder if you are looking for something else. +* [Here is the blog post](https://mertbakir.gitlab.io/projects/resume-a4/) about this project. # License This project is open-sourced and licensed under the terms of the MIT license. I would be happy though, if you give attribution. <3 +> _I'm open to suggestions and contributions._ + # My Work Flow 1. Make changes. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ca6f184..eba26f4 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,6 +7,7 @@ theme = "resume-A4" [params] useFontAwesome = true avatar = "avatar.jpg" +bib_style = "IEEE" # IEEE, APA, else [params.display] experience = true @@ -21,7 +22,7 @@ linkedin = false tagline = true aboutMe = false projects = false -papers = false +publications = false certificates = true avatar = true @@ -34,7 +35,7 @@ skills = "Skills" certificates = "Certifications" interests = "Interests" about_me = "About Me" -papers = "Academic" +publications = "Publications" projects = "Projects" [params.display.footer] diff --git a/exampleSite/data/publications.yaml b/exampleSite/data/publications.yaml new file mode 100644 index 0000000..bba012e --- /dev/null +++ b/exampleSite/data/publications.yaml @@ -0,0 +1,12 @@ +- authors: + - last_name: Dantzing + first_name: George + - last_name: Sunstrider + middle_name: "Felo'melorn" + first_name: Kael'thas + date: "2006" + title: "Additive Outlier Detection Via Extreme-Value Theory" + journal: Journal of Time Series Analysis + vol: 27 + issue: 5 + page: "29-34" \ No newline at end of file diff --git a/layouts/home.html b/layouts/home.html index 3132359..1e6973d 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -32,8 +32,8 @@ {{ partial "projects" . }} {{ end }} - {{ if .Site.Params.display.papers }} - {{ partial "papers" . }} + {{ if .Site.Params.display.publications }} + {{ partial "publications" . }} {{ end }} {{ if .Site.Params.display.certificates }} diff --git a/layouts/partials/publications.html b/layouts/partials/publications.html new file mode 100644 index 0000000..84e8bca --- /dev/null +++ b/layouts/partials/publications.html @@ -0,0 +1,56 @@ +
+

{{ .Site.Params.title_as.publications }}

+ {{ range .Site.Data.publications }} +
+ {{ if eq $.Site.Params.bib_style "IEEE" }} + + {{ range .authors }} + {{ substr .first_name 0 1 }}. + {{ with .middle_name}}{{ substr . 0 1 }}.{{end}} + {{ .last_name }}, + {{ end }} + "{{ .title }}", + {{ if .journal }} + {{ .journal }}, + {{ with .vol }} + vol. {{.}}, + {{ end }} + {{ with .page }} + pp. {{.}}, + {{ end }} + {{ end }} + {{ .date }}. + + {{ else if eq $.Site.Params.bib_style "APA" }} + + {{ $last_index := sub (.authors | len) 1 }} + {{ range $i, $e := .authors }} + {{ $e.last_name }}, + {{ substr $e.first_name 0 1 }}. + {{- with $e.middle_name -}}{{ substr . 0 1 }}.{{- end -}} + {{- if ne $i $last_index -}},{{- end -}} + {{ end }} + ({{ .date }}). + + {{ .title }}. + {{ if .journal }} + {{ .journal }} + {{- if .vol -}} + , {{.vol}}{{if .issue}}({{.issue}}){{end}}, + {{- end -}} + {{ with .page }} + {{.}} + {{ end }} + {{ end }}. + + {{ else }} + {{ range .authors }} + {{ .last_name }} {{ substr .first_name 0 1 }}. + {{ end }} + + {{ .title }} + {{ .date }}. + {{ end }} +
+ {{ end }} +
\ No newline at end of file diff --git a/layouts/partials/wip/papers.html b/layouts/partials/wip/papers.html deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3