npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

psk-hugo

v0.1.4

Published

PositionerStarterKit for Hugo

Downloads

9

Readme

PSK - Hugo

Positioner Starter Kit for Hugo websites.

This package includes a set of helpers to develop websites with Hugo

Partials

psk/FormBuilder

Given a formObject containing form/fields parameters it will output a complete and working form, see below a sample of a formObject with all parameters currently supported.

form:
  alias: contact-form
  title: Contact form
  subject: Contact form
  successPage: /en/thank-you/
  submitLabel: Submit
  requiredFieldsLabel: Required fields
  fields:
  - label: First name
    type: text
    alias: firstName
    required: true
  - label: E-Mail
    type: email
    alias: email
    required: true
  - label: Message
    type: textarea
    alias: message
    required: true
  - label: DatePicker
    type: datepicker
    alias: dp1
    required: true
  - label: DDL Field
    type: dropdownlist
    alias: ddlField
    required: true
    items:
      - text: please select
      - text: Item 1
        value: item-1
      - text: Item 2
        value: item-2
  - label: I consent the <a href="#some-url" target="_blank">Terms & Condiitons</a>
    type: checkbox
    alias: termsConditions
    required: true

psk/GetParamML

Usefull only for multilingual website, tries to retrieve a parameter from current language, if the parameter is not available will fallback to default language.

psk/MarkdownifyP

Renders a text that may have multiple lines, forcing to always be enclosed inside a [p] tag. Standard markdownify will add [p] tags only if the text has multiple paragraphs, and avoid adding the tag if there's only one paragraph. This partial will verify if there is only one paragraph and add the missing [p] tag

Contrusctor

{{ $paramVal := partial "psk/GetParamML" (dict "context" . "paramKey" "key")}}

psk/MetaTags

Handles title, description and open graph meta tags. the supported parameters are:

  • title: default title of the page
  • seoTitle: will overwrite the "title" param, is used for the [title] and [og:title] tag
  • seoDescription: used for meta tag [description] and [og:description]

Release notes

0.1.4 - 31.05.2023

  • MetaTags: Added support for canonical link, always pointing to himself
  • MetaTags: now title supports seoTitle parameter

0.1.3 - 01.07.2021

  • FormBuilder: added support for "form alias" that fills the form's name attribute

0.1.2 - 30.06.2021

  • FormBuilder: added support for "subject" and "successPage" parameters

0.1.1 - 18.05.2021

  • FormBuilder: bugfixing on previous release

0.1.0 - 18.05.2021

  • FormBuilder: Added field types DDL and DatePicker
  • FormBuilder constructor has changed! When updating you must update the constructor where the partial is already being used.

0.0.3 - 05.05.2021

  • Added MetaTags partial

0.0.2 - 15.04.2021

  • Addeed MarkdownifyP and FormBuilder partials

0.0.1 - 09.04.2021

  • First Release