Osprey comes with several configuration options to aid in site customization. This is an example config.toml file:
title = "Osprey Example Site"
baseURL = "https://tomanistor.com"
tags = ["portfolio", "web design", "blog"]
languageCode = "en-US"
config = "config.toml"
theme = "osprey"
canonifyURLS = true
googleAnalytics = ""
disqusShortname = "tomanistor"
disableKinds = ["taxonomy", "taxonomyTerm"] # This theme does not currently use "tag" and "category" taxonomies
tagline = "Osprey Example Site"
author = "Toma Nistor"
description = "Full-stack web developer and UI/UX enthusiast based in San Diego, CA."
logoBig = "/images/osprey-logo.png"
logoSmall = "/images/osprey-logo.png"
favicon = "favicon.ico"
opengraphImage = "/images/osprey.png"
email = ""
googleTagManager = ""
customCSS = false
# Social media links in footer
twitter = "TomaNistor"
linkedin = "tomanistor"
github = "tomanistor"
facebook = ""
# Copyright and theme author credit in footer
copyright = false
credit = false
# Cache busting of static resources (additional set up required)
cacheBustCSS = true
cacheBustJS = true
# Code highlighting with highlight.js
highlightJS = true
highlightJSStyle = "" # For custom highlight.js styles, add your /path/to/styles/default.css
highlightJSScript = "" # For custom highlight.js languages config, add your /path/to/highlight.pack.js
# Choose either Formspree contact form or Basin contact form
ajaxFormspree = false
ajaxFormspreeGold = false
ajaxBasin = "https://usebasin.com/f/0eae7044d4c2"
name = "About"
url = "/#about"
weight = 1
name = "Work"
url = "/#work"
weight = 2
name = "Blog"
url = "/#blog"
weight = 3
name = "Contact"
url = "/#contact"
weight = 4
The two main content types are blog posts and gallery images.
To create an about section that renders on the home page, run:
$ hugo new about.md
To create a new blog post, run:
$ hugo new blog/post-title.md
To add a new image to your portfolio, run:
$ hugo new gallery/image-title.md
The gallery archetype comes with its own configuration. Here is an example:
date = "2017-05-10T21:35:17-07:00"
title = "Image Title"
image = "image-file.png"
alt = "This is a description of the image"
color = "#7ac143"
link1 = "https://tomanistor.com"
link2 = "https://github.com/tomanistor"
Two contact forms services are offered as options: Formspree and Basin.
The email address specified in the config.toml file will be the one receiving messages sent through the contact form. The contact form is operated by Formspree and requires that the form must be submitted once initially to confirm the email address being used. See instruction here.
Basin is an alternative, free AJAX contact form service. To use Basin, sign up for a free account and create a form. Copy and paste your form’s URL endpoint to the ajaxBasin config.toml parameter. Select the Submit this form via AJAX option on your Basin dashboard.
To implement custom CSS sitewide, change the config.toml parameter customCSS from false to true and then create a css.html file in your layouts/partials/ folder like the example below:
<!-- This will remove the shadow on the navbar -->
This will render inline CSS in the head of your site and without adding an extra HTTP request.
To implement cache busting of CSS and JS static assets with something like Gulp.js and gulp-hash, change the config.toml parameters cacheBustCSS and cacheBustJS from false to true and follow this setup guide.
If you’d like to help with the development of this theme, I encourage you to submit a pull request or create an issue if you find a bug. All help is appreciated.
This theme is released under the Apache 2.0 license. For more information read the license.