cowboysmall-tools / hugo-devresume-theme

A free resume/CV template made for software developers.
MIT License
260 stars 128 forks source link

Update projects.html to allow for urls #6

Closed djpeach closed 4 years ago

djpeach commented 4 years ago

Thought this might be a nice feature for others. Allows you to link to your projects, as well as give them a title.

cowboysmall commented 4 years ago

Actually I originally had something similar to your pull request, but I removed it to be more consistent with the original template it was based on.

What I did with my own site - http://cv.cowboysmall.com/ - was provide an override for projects.html that looked like this:

    <section class="project-section py-3">

        <h3 class="text-uppercase resume-section-heading mb-4">{{ i18n "projects" }}</h3>

        {{ range .Site.Params.projects.list }}
        <div class="item mb-3">
            <div class="item-heading row align-items-center mb-2">
                <h4 class="item-title col-12 col-md-6 col-lg-8 mb-2 mb-md-0">
                    <a class="resume-link" href="{{ .url }}" target="_blank">{{ .title }}</a>
                </h4>
                <div class="item-meta col-12 col-md-6 col-lg-4 text-muted text-left text-md-right">{{ .meta }}</div>
            </div>
            <div class="item-content">
                <p>{{ .tagline }}</p>
            </div>
        </div><!--//item-->
        {{ end }}

    </section><!--//project-section-->

I think I prefer this approach (overriding the projects.html in the project that uses the theme) as it leaves the original theme intact and consistent with the original.

Having said that, I'll review your changes and think about it. I think though that I am leaning in the direction of letting users override themes themselves.

J.K.