This is not a standalone theme. It is a Hugo theme component providing a shortcode: loremipsum
to generate greek text paragraphs.
It starts off with a standard "Lorem ipsum …" text, then randomises the sentence order on each subsequent paragraph.
- Add the
hugo-loremipsum
as a submodule to be able to get upstream changes latergit submodule add https://github.com/martignoni/hugo-loremipsum.git themes/hugo-loremipsum
- Add
hugo-loremipsum
as the left-most element of thetheme
list variable in your site's or theme's configuration fileconfig.yaml
orconfig.toml
. Example, withconfig.yaml
:or, withtheme: ["hugo-loremipsum", "my-theme"]
config.toml
,theme = ["hugo-loremipsum", "my-theme"]
- In your site, use the shortcode, e.g. to generate 3 paragraphs of Lorem ipsum greek text :
or simply, for just one paragraph
{{< loremipsum 3 >}}
{{< loremipsum >}}
This is a Hugo theme component that automatically generates metadata complying to The Open Graph Protocol as well as Twitter Cards. This is NOT a standalone theme and must not be treated as such.
-
Add the hugo-social-metadata repository as a submodule to be able to get upstream changes later
git submodule add https://github.com/msfjarvis/hugo-social-metadata.git themes/hugo-social-metadata
-
Start off by configuring a few things in your
config.toml
(or equivalent file depending on whether you use YAML or JSON). These will be picked up by the theme component and used to provide metadata for the site.
[params]
description = "A description for your awesome website goes here"
keywords = "some, keywords, that, describe, your, content"
twitterUsername = "@your_twitter_username"
socialImage = "path/to/the/twitter/card/image"
- Include the
hugo-social-metadata
theme as the leftmost element of the theme list variable in your config file. Forconfig.toml
, it will look something like this:
theme = ["hugo-social-metadata", "hyde"]
- Include the
social_metadata.html
partial in yourhead.html
like so:{{ partial "social_metadata.html" . }}
.
You can customize some of the generated metadata on a per-page basis. Setting description
, socialImage
or tags
in the frontmatter will override the defaults loaded from the main config file.
+++
description = "A nice description for this blogpost"
socialImage = "path/to/an/image/that/describes/this/post/best"
tags = ["this", "blog", "rocks!"]
+++
A theme component to enable easy redirection in Hugo sites.
Hugo Redirect enables easy redirection: one of the major pieces missing from Hugo's impressive feature set.
Let's say you
- Have an Ugly URLs like
yoursite.com/cv.pdf
and you'd much rather point people toyoursite.com/cv
- Wrote an awesome post on
yoursite.com/blog/2019/09/08/how_to_add_clis
and you'd like to share it to people quickly atyoursite.com/cli
Redirection comes in very handy in these cases.
Hugo Redirect currently supports static meta refresh based redirects, _redirect
generation for Netlify and and .htaccess
(for Apache / Nginx servers) generation.
This is not a standalone theme. It is a Hugo theme component (sort of like a plugin) providing easy URL redirect capabilities to Hugo sites. A working demo of this redirection is available on my site at https://prag.io/cv.
Contributions welcome! Send your pull request.
In the root of your site repository:
- Add
hugo-redirect
as a submodule to be able to get upstream changes later$ git submodule add https://github.com/gcc42/hugo-redirect.git themes/hugo-redirect
- Add
hugo-redirect
as the left-most element of thetheme
list variable in your site's or theme's configuration fileconfig.yaml
orconfig.toml
. Example, withconfig.yaml
:or, withtheme: ["hugo-redirect", "other-components", "my-theme"]
config.toml
,theme = ["hugo-redirect", "other-components", "my-theme"]
- To add a new redirect rule, simply run (It's not recommended to create
them manually):
Open the newly created file
$ hugo new redirect/cv.md # Replace cv with a (arbitrary) redirect name
redirect/cv.md
in your editor and update theurl
andredirect_to
fields in the front matter, like so:type = "redirect" url = "/cv" redirect_to = "/cv.pdf" redirect_enabled = true
- If you're hosting on Netlify or Apache/Nginx/<Service that supports
.htaccess
>, follow the steps below to enable_redirects
file generation (recommended)
- I'd recommend enabling the appropriate
_redirects
/.htaccess
based on where you're hosting. (Even thoughmeta
redirects work fine, this will potentially improve the speed and help with SEO) - Avoid mixing
hugo-redirect
with manual redirection, or you could end up creating a nasty redirect loop - Make sure you enter the
url
andredirect_to
parameters exactly as you want them. This means that if you want/cv --> /cv.pdf
, make sure you seturl = /cv
and NOTurl = /cv/
(however because of the way Hugo works currently, both/cv --> /cv.pdf
and/cv/ --> /cv.pdf
will be set up)