Code Monkey home page Code Monkey logo

osprey-delight's Introduction

Osprey Delight Logo Nelify Continous Deployment Status

GitHub Release Discussions Hugo Minimum Version Built with hugo-mods

Overview

Osprey Delight is the free-minded artist's choice for a clutter-free and blazingly fast single-page portfolio.

It's perfectly suited to show off your awesome work!

It tastes a bit different than the great Osprey theme and adds awesome modular functionality to your delight.

Showcase

Check out how Osprey Delight performs in the real-world:

  • Hugo Mods - This theme is built around the Hugo Mods presented on the site. This site also has the complete source code available.
  • Protonaut Music - Musician and top contributor whose highly recognizable site got kickstarted by the theme.
  • KDEVO - It wouldn't be me if I would not run this theme personally to ensure that everything runs smoothly.

Features

  • Modular and made out of extensible section building blocks:
    • About: Introduce yourself
    • Gallery: Show your work using a grid-based gallery with interactive modal boxes
    • Blog: Lightweight blog features
    • Contact: Contact form with Basin support and built-in spambot protection
  • Use your high-quality images assets:
    • Lazy image loading plus completely automatic resizing using lazyimg module
    • Blur-up technique using automatic low-quality image placeholders (LQIP)
    • Modern WebP support with fallback for older browsers
  • SEO:
  • Delightful UX:
    • Choose between different themes
    • Awesome social icons in footer via icons module
    • Smooth scrolling plus scroll-spy
    • Automatically fetches GitHub repo data
    • Sane fallbacks for No-Script/No-JS users
  • Heavily customizable - no need to maintain a fork!

In general, many open issues of the original theme have been resolved and code has been rewritten.

Contribute and show your support

There are multiple ways to show your support if you like this project:

Quickstart

Please make sure to have Hugo's extended version and Go installed. If you're new to Hugo, visit the docs for more info and general site setup.

Initialize your repo as a module (replace <username> and <projectname>):

hugo mod init github.com/<username>/<projectname>

Download the documented config file, e.g. via curl:

curl https://raw.githubusercontent.com/kdevo/osprey-delight/master/exampleSite/config.yaml -O

Continue reading for configuration options.

Upgrade

Receive the latest features of the theme:

hugo mod get -u

It is good practice to check the release notes before upgrading.

Configuration and Usage

It's best if you simply check out the fully commented config file. This theme follows a learning-by-doing approach.

Images

This theme is asset-driven! It "knows" how to handle your precious assets, and there usually is no need for manual resizing. For that to work, provide all of the following images in the assets directory (do not use the static directory).

The following table shows recommendations regarding the required assets:

Image Type Config Key Minimum Width Note
Logo logoBig (config.yaml) 200px Transparent, minimum margin top/bottom
Navbar-Logo logoSmall (config.yaml) 96px Transparent, small margin top/bottom, prefer square format
Gallery image (content/gallery/*) 400px Transparent, medium margin top/bottom/left/right, prefer square or landscape format
Background background (config.yaml) 1920px Optional, use a high-quality JPG

Content files

About section

To create an about section that renders on the home page, run:

hugo new about.md

Gallery item

To create a new gallery item, run:

hugo new gallery/my-item.md

You will get a fully documented file, which describes each config option separately.

Contact form

Basin is a free AJAX contact form service that is used by this theme.

To set it up:

  1. Sign up for a free account and create a form.
  2. Copy and paste your form's URL endpoint to the ajaxBasin config.yaml parameter.
  3. Select the Submit this form via AJAX option on your Basin dashboard.

Basin AJAX setup

Enable spambot protection

Under "Setup" → "Set a Custom Honeypot Field", input _anti_spam_honeypot. Basin will ignore all messages that contain this specific field. This should work since there is a hidden field that users normally do not use, but spambots will blindly input their data.

Basin Anti Spambot

Please do not make a tick in the "reCAPTCHA" checkbox, this service is not supported and also typically not necessary.

Learn more

Customize it

Want to have full control over appearance? Check out how to customize the theme more granularly.

Need help?

This theme has a GitHub-powered community forum! Feel free to ask questions in the Q&A (please make sure to completely read the docs and existing discussions/questions).

Help wanted

This README probably needs some documentation improvements for the latest features. Any PR regarding this is welcome. Please also check out how to contribute!

osprey-delight's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

osprey-delight's Issues

Formspree remaining

I might be wrong, but from history.md I saw that this theme didn't have formspree:

- [Formspree](https://formspree.io) AJAX contact form (with Formspree Gold)

Though formspree is still the action of the contact form:

<form id="form-contact" action="https://formspree.io" method="POST">

Is this an oversight ? I understand that it's not going to change anything given the form sends contents with Ajax and not with POST, but still :)

exampleSite is broken

Due to not resolving the stackoverflow icon, the exampleSite (and therewith also the theme listing on Hugo) is broken.

Fix by:

  • Set stackoverflow to the correct icon in icons.yml
  • Do some maintenance updates for the hugo-mods

Syntax error in termynal.js

Hi kdevo,

Thanks for the great theme.

I found a problem when trying it out with broken layout which I tracked it down to the following construct in termynal.js.

this.startDelay = options.startdelay || {{ .Site.Data.terminal.startDelay }};

The templates aren't properly escaped if there is no termynal json configuration present, so the generated bundle includes lines like the following:

this.startDelay = options.startdelay || <no value>;

This isn't valid JS so all the JS powered features (including the nice sticky header, which was the first thing I noticed) break.

As the options seem to be passed through the constructor anyway if the JSON config is available, possibly it would make sense to fall back on static values in this case (i.e. this.startDelay = options.startdelay || 1000;)? Otherwise, might be worth adding documentation to clarify that useTermynal cannot be set true without a valid json config file.

I haven't provided a complete pull request as I'm not sure how/if you want to handle this?
My 'fix' was just to disable useTermynal.

Social links in config.yaml return error upon trying to find icons

Hi, I set up osprey-delight on my end as a mod and tried running the website using hugo server. I got back a big error which seemed to lead back to the social media links in config.yaml not being able to find the icons in ./assets/%!s(<nil>) which in turn does not seem to exist either. Here is the full error message:

WARN  image path './assets/%!s(<nil>)' does not exist. please check the 'assets' directory.

Built in 88 ms

Error: error building site: render: failed to render pages: render of "home" failed: "C:\Users\jocel\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\index.html:26:7": execute of template failed: template: index.html:26:7: executing "index.html" at <partial "footer.html" .>: error calling partial: "C:\Users\jocel\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\partials\footer.html:6:11": execute of template failed: template: partials/footer.html:6:11: executing "partials/footer.html" at <partial "icon" .type>: error calling partial: "C:\Users\jocel\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hugo-mods\[email protected]\layouts\partials\icon.html:53:19": execute of template failed: template: partials/icon.html:53:19: executing "partials/icon.html" at <partial "icon-resolve" (dict "icon" $icon)>: error calling partial: "C:\Users\jocel\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\hugo-mods\[email protected]\layouts\partials\icon-resolve.html:15:21": execute of template failed: template: partials/icon-resolve.html:15:21: executing "partials/icon-resolve.html" at <resources.Get>: error calling Get: CreateFile C:\Users\jocel\Documents\hugo-portfolio\assets\%!s(<nil>)\linkedin.svg: The filename, directory name, or volume label syntax is incorrect.

I tried to resolve this by removing the links under Social: in config.yaml which seemed to resolve the errors and I was able to build my site and run it on localhost. Which leads me to believe there's something wrong or missing with the way the social media icons are being retrieved. Is there any current workaround this?

Insert script into head.html

Could there be a function that will insert a script into the html head? Similar to googleAnalytics from config.html, another function such as headInserts would allow a user to embed custom functions without making direct changes to head.html.

Survey: Features/Roadmap for v4

Today, Version 3.0.0 of the theme has been released as a beta version.

Your vote is needed

Planning with actual users is important!
Therefore, you can now vote by picking an emoji reaction for the following 5 potential features of Osprey Delight's next evolution ( v4).

Vote for a maximum of 2 features, using the emoji responses below! For instance, I voted for "Lazysizes Blur Up" with a 🎉 emoji.

(1) Lazysizes Blur Up

Vote with 🎉

Provide Blur Up from Lazysizes for an awesome animation when loading HQ images (or the big logo at the top of the page) as an optional feature.

(2) Preview Images

Vote with 👀

Use Hugo's image processing to render special low quality preview images that are shown before lazysizes is used. Could be combined with feature (1).

(3) Gallery Item Types

Vote with 🚀

For instance, a "direct link" gallery item type can be implemented as suggested in issue #71 of the original Osprey theme.

(4) Add more icons

Vote with ❤️

Check out #2 for voting on specific icons.

(5) Improve CSS

Vote with 👍

CSS/UI and more can be taken to the next level if you choose this option.

Planning v6: Your vote and suggestions

Your vote is wanted

You can now vote by picking an emoji reaction for the following 4 potential features of Osprey Delight's next evolution (v6). A maximum of two votes is allowed per individual. Pick an emoji reaction!

Image Gallery

Vote with 👀

  • Small footprint and optional
  • Responsive, fast and with touch support
  • Maybe lightbox-like

See e.g. #11 for a possible motivation behind this.

Remove old Flexbox Grid

Vote with 😄

Use a home-grown version for better performance and control.

Add round quick action buttons to gallery modal

Vote with 👍

For instance for sharing, "one-click" actions such as download etc.
Could replace buttons at the bottom of modal.

Use high quality SVG icons (already implemented)

Vote with 🚀

Add new themes (already implemented)

Vote with ❤️

Improve background image (already implemented)

Vote with 🎉

Add page below the gallery

Hello,
another section similar to the About is possible, under the gallery. I would like to directly add a page.md with other indications and use the shortcode to read a pdf.

Breaking change: author field

Hi all!

I am getting this error:

`hugo server
Watching for changes in /home/stefan/bla/{archetypes,assets,content,data,layouts,static}
Watching for config changes in /home/stefan/bla/config.yaml, /home/stefan/bla/go.mod
Start building sites …
hugo v0.120.1+extended linux/amd64 BuildDate=unknown

ERROR render of "page" failed: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/_default/single.html:6:5": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/partials/head.html:29:36": execute of template failed: template: partials/head.html:29:36: executing "partials/head.html" at : can't evaluate field name in type string
ERROR render of "home" failed: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/index.html:3:5": execute of template failed: template: index.html:3:5: executing "index.html" at <partial "head.html" .>: error calling partial: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/partials/head.html:29:36": execute of template failed: template: partials/head.html:29:36: executing "partials/head.html" at : can't evaluate field name in type string
Built in 126 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/_default/single.html:6:5": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/partials/head.html:29:36": execute of template failed: template: partials/head.html:29:36: executing "partials/head.html" at : can't evaluate field name in type string
`

Any ideas what I am doing wrong?
Thanks!

Survey: New icons for footer!

Icons which I think can be useful for the footer:

  1. Medium = 👀
  2. GitLab = 🚀
  3. Xing = 🎉

Vote for icons using the emoji recations below or respond with your own suggestion! For instance, I voted for "Medium" with a 👀 emoji.

I want to keep the icon font minimal so I think this is the best way to only add icons which are actually relevant to the theme's users.

image path ./assets/%!s(<nil>) does not exist

Hi There,
I'm new to hugo and hugo mod and especially to this awesome theme! :)

Sorry if this issue does not meet the correct guideline... but I like to ask you kindly if anyone encountered the same problem and probably found a solution for it.

After a fresh install of hugo and osprey-delight I see the following error after typing "hugo server":
error image path ./assets/%!s(<nil>) does not exist

Thanks in advance for any help

londi

EDIT:
I have noticed that there could be a problem on the file "themes/osprey-delight/layouts/partials/sections/gallery/img.html". The previous version of this file (before commit: kdevo 31.10.21) is working.

Improve documentation

Documentation tasks in README.md:

Documentation in CUSTOMIZING.md:

  • Describe how to make custom sections
  • Describe how to setup new icons

Documentation in source code:

  • How the honeypot works

... more to follow

Basin contact requires Params.Contact.select

Sorry for yet another one.

The exampleSite config.yaml says the following:

## Configure contact form:
[Params.Contact]
  # [str[]] i18n keys used to display in an additional select box.
  #   Comment out if you want to disable it.
  select = ["generic", "coop", "business", "project"]

However, if you comment it out comments won't work because the template correctly doesn't render the dropdown but the javascript assumes $('select[name=matter]') always exists on line 21.

I've "fixed it" on my site with the following change to check if there's a matter selection and if not, fall back to an empty string:

matter = $('select[name=matter]') ? $('select[name=matter]').value : "",

Image gallery

I use Osprey Delight on my commercial website. There are some features i needed to add/modify, so I did that. One of the features I modified was gallery. My version is just picture gallery it works like that:

  1. Gallery contains miniatures of images
  2. Nothing happens on-hover
  3. On-click event displays popup with nothing, but larges size of this image and (X) in corner

I think it would be really beneficial to add this feature to theme, since it probably is popular use case. In best-case scenario theme would auto-detect if content/gallery/*.md files have actual content. Other scenario would be just adding flag in config.yaml.
I won't open pull request with what I currently have, because my version overrides default one, is based on v3 and doesn't work perfectly on all screen sizes.

google_analytics_async has been removed

The google_analytics_async.html template has been removed from hugo to match the updated google analytics version. changing the name of the file to google_analytics.html should fix it.

About page CSS differs from Osprey

Another small issue that might not be an issue.

While porting my site, I noticed that the "about" content was centered, whereas on my original site the content was left aligned.

The original Osprey uses the following layout for the about section:

  <section class="about" id="about">
    <div class="container middle-xs">
      <div class="row center-xs">
        -- title -- 
      </div>
      <div class="row">
        <div class="col-xs-12 middle-xs">
          -- content --
        </div>
      </div>
    </div>
  </section>

whereas delight uses the following:

  <section class="about" id="about">
    <div class="container middle-xs">
      <div class="row center-xs">
        -- title -- 
      </div>
      <div class="row center-xs"> <- note the center-xs element here, which forces text-align: center
        <div class="col-xs-12 middle-xs">
          -- content --
        </div>
      </div>
    </div>
  </section>

It's a small thing but very obvious if you're porting a site, especially one which uses an unordered list in the about section!

Up to you if you want to fix it as I'm not sure how worried about Osprey compatibility you are.

Width of text

Hi

Thanks for your Hugo theme!
Where can I change the width of the text of for example the about page?
Sorry, couldn't find it :/

Thanks!

no layoutfile

I have try all the solutions to solve the problem but not work, it can just find and layout file,how should i do ?

D:\zoeyPortfoilos\zoeysite.github.io\zoeysite>hugo serve
Watching for changes in D:\zoeyPortfoilos\zoeysite.github.io\zoeysite{archetypes,assets,content,data,i18n,layouts,static}
Watching for config changes in D:\zoeyPortfoilos\zoeysite.github.io\zoeysite\hugo.yaml, D:\zoeyPortfoilos\zoeysite.github.io\zoeysite\go.mod
Start building sites …
hugo v0.121.1-00b46fed8e47f7bb0a85d7cfc2d9f1356379b740+extended windows/amd64 BuildDate=2023-12-08T08:47:45Z VendorInfo=gohugoio

WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN found no layout file for "html" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

               | EN

-------------------+-----
Pages | 3
Paginator pages | 0
Non-page files | 0
Static files | 0
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0

Built in 5 ms
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender

Gallery items are ordered by oldest first

When adding items to the gallery, I'm seeing that the oldest items (from the date field in markdown file) are listed first when viewing the website. According to gallery.md, the latest item should be displayed first:

# [date] Specify project publication date - changes order; the latest item will be displayed first.
date: "{{ .Date }}"

site rendering on deploy

hi there,
i'm running into some trouble with the rendering of a site built with your theme. locally, everything runs smoothly, upon upload to the web server, however, the site does seem to miss images, links and css rendering. i've cross-checked with some other hugo-based sites in the same public directory, all of which work nicely. so it must be something in (what i've done with) the theme.

i've slightly adapted a couple of partials (after copying them to my working directory) and scss files (also copied to my hugo working directory), so the theme basis should be intact & the altered files in the parent folders should replace the theme originals. also the overall site structure structure is identical with the template provided. I have both the newest version of hugo and osprey-delight installed.

solved already: was an issue with the reverse proxy of the company server. sry. :)

Errors when running build.sh

I got the following errors when running ./build.sh:

cd exampleSite/
hugo --themesDir ../../
hugo: downloading modules …
hugo: collected modules in 4813 ms
Start building sites …
hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended windows/amd64 BuildDate=2024-01-26T15:54:24Z VendorInfo=gohugoio

ERROR render of "page" failed: "C:\Users\thdoan\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\_default\single.html:6:5": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "C:\Users\thdoan\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\partials\head.html:91:13": execute of template failed: template: partials/head.html:91:13: executing "partials/head.html" at <unmarshal $s>: error calling unmarshal: "_stream.json:1:1": unmarshal failed: invalid character '{' looking for beginning of object key string
ERROR render of "home" failed: "C:\Users\thdoan\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\index.html:3:5": execute of template failed: template: index.html:3:5: executing "index.html" at <partial "head.html" .>: error calling partial: "C:\Users\thdoan\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\partials\head.html:91:13": execute of template failed: template: partials/head.html:91:13: executing "partials/head.html" at <unmarshal $s>: error calling unmarshal: "_stream.json:1:1": unmarshal failed: invalid character '{' looking for beginning of object key string
ERROR EXECUTE-AS-TEMPLATE: failed to transform "person.json" (application/json): template: person.json:5:11: executing "person.json" at <default>: wrong number of args for default: want at least 1 got 0
Total in 5173 ms
Error: error building site: render: failed to render pages: render of "page" failed: "C:\Users\thdoan\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\_default\single.html:6:5": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "C:\Users\thdoan\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\github.com\kdevo\osprey-delight\[email protected]\layouts\partials\head.html:86:88": execute of template failed: template: partials/head.html:86:88: executing "partials/head.html" at <(resources.Get "person.json" | resources.ExecuteAsTemplate "person.json" .).Content>: error calling Content: EXECUTE-AS-TEMPLATE: failed to transform "person.json" (application/json): template: person.json:5:11: executing "person.json" at <default>: wrong number of args for default: want at least 1 got 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.