Skip to content

Commit

Permalink
Make name of portfolio image configurable (#41) (#71)
Browse files Browse the repository at this point in the history
* Make name of portfolio image configurable (#41)

Co-authored-by: Samarjeet <[email protected]>
  • Loading branch information
AlexVerrico and samarsault authored Jul 17, 2020
1 parent 6f5cbdc commit 01dd39e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ plainwhite:

**Updating Placeholder Image**

The placeholder portfolio image can be replaced by the desired image by placing it as `assets/portfolio.png` in your jekyll website.
The placeholder portfolio image can be replaced by the desired image by placing it as `assets/portfolio.png` in your jekyll website, or by changing the following line in `_config.yaml`

```yaml
plainwhite:
portfolio_image: "assets/portfolio.png" # the path from the base directory of the site to the image to display (no / at the start)
```

**Comments (Disqus)**

Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ plainwhite:
sitemap: true # set to true to generate sitemap.xml content
search: true # set to true to enable searchbar
dark_mode: true # set to true to add dark mode toggle
portfolio_image: "assets/portfolio.png" # the path from the base directory of the site to the image to display (no / at the start)
html_lang: "en" # set the lang attribute of the <html> tag for the pages. See here for a list of codes: https://www.w3schools.com/tags/ref_country_codes.asp

# generate social links in footer
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<body>
<main class="container">
<section class="about">
<a href="{{ "/" | relative_url}}"><img src="{{ "/assets/portfolio.png" | relative_url }}" alt="{{ site.plainwhite.name }}"></a>
<a href="{{ "/" | relative_url}}"><img src="{{site.baseurl }}/{{ site.plainwhite.portfolio_image }}" alt="{{ site.plainwhite.name }}"></a>
<h2 id="title">
<a href="{{ "/" | relative_url }}">{{ site.plainwhite.name }}</a>
</h2>
Expand Down

0 comments on commit 01dd39e

Please sign in to comment.