0.1.4 • Published 12 months ago

psk-hugo v0.1.4

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

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:

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
0.1.4

12 months ago

0.1.2

3 years ago

0.1.3

3 years ago

0.1.0

3 years ago

0.0.3

3 years ago

0.1.1

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago