themes: delete hugo-social-metadata to re-merge correctly

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-05-11 23:02:26 +05:30
parent 4157698894
commit 89f3f87694
4 changed files with 0 additions and 116 deletions

View File

@ -1,20 +0,0 @@
The MIT License (MIT)
Copyright (c) 2020 Harsh Shandilya
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,37 +0,0 @@
# hugo-social-metadata
## About
This is a [Hugo](https://gohugo.io) theme component that automatically generates metadata complying to [The Open Graph Protocol](https://ogp.me/) as well as [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started). This is **NOT** a standalone theme and must not be treated as such.
## Usage
1. 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`
2. 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.
```toml
[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"
```
3. Include the `social_metadata.html` partial in your `head.html` like so: `{{ partial "social_metadata.html" . }}`.
## Additional customizations
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.
```markdown
+++
description = "A nice description for this blogpost"
socialImage = "path/to/an/image/that/describes/this/post/best"
tags = ["this", "blog", "rocks!"]
+++
```
## License
Check out the [LICENSE](/LICENSE) file in the root of this repository.

View File

@ -1,47 +0,0 @@
<!-- Configure meta and title tags -->
<meta property="og:type" content="website" />
{{ if .Site.Params.TwitterCardType }}
<meta name="twitter:card" content="{{ .Site.Params.TwitterCardType }}" />
{{ else }}
<meta name="twitter:card" content="summary_large_image" />
{{ end }}
{{ if .Site.Params.TwitterUsername }}
<meta name="twitter:site" content="{{ .Site.Params.TwitterUsername }}" />
{{ end }}
{{ if .IsHome }}
<title>{{ .Site.Title }}</title>
<meta name="description" content="{{ $.Site.Params.description }}" />
<meta name="keywords" content="{{ $.Site.Params.Keywords }}" />
<meta property="og:image" content="{{ .Site.BaseURL}}{{ .Site.Params.SocialImage }}" />
<meta property="og:url" content="{{ .Site.BaseURL }}" />
<meta property="og:title" content="{{ .Site.Title }}" />
<meta name="og:description" content="{{ $.Site.Params.description }}" />
<meta name="twitter:title" content="{{ .Site.Title }}" />
<meta name="twitter:description" content="{{ $.Site.Params.description }}" />
<meta name="twitter:url" content="{{ .Site.BaseURL }}" />
<meta name="twitter:image:src" content="{{ .Site.BaseURL}}{{ .Site.Params.SocialImage }}" />
{{ else }}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title>
<meta name="description" content="{{ .Description }}" />
{{ if .Params.tags }}
<meta name="keywords" content="{{ range .Params.tags }}{{ . }},{{ end }}" />
{{ else }}
<meta name="keywords" content="{{ $.Site.Params.Keywords }}" />
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:title" content="{{ .Title }} &middot; {{ .Site.Title }}" />
<meta name="twitter:title" content="{{ .Title }} &middot; {{ .Site.Title }}" />
{{ if .Description }}
<meta name="og:description" content="{{ .Description }}" />
<meta name="twitter:description" content="{{ .Description }}" />
{{ else }}
<meta name="og:description" content="{{ $.Site.Params.description }}" />
<meta name="twitter:description" content="{{ $.Site.Params.description }}" />
{{ end }}
<meta name="twitter:url" content="{{ .Permalink }}" />
{{ if .Params.SocialImage }}
<meta name="twitter:image:src" content="{{ .Site.BaseURL }}{{ .Params.SocialImage }}" />
{{ else }}
<meta name="twitter:image:src" content="{{ .Site.Params.SocialImage }}" />
{{ end }}
{{ end }}

View File

@ -1,12 +0,0 @@
name = "Hugo Social Metadata"
license = "MIT"
licenselink = "https://github.com/msfjarvis/hugo-social-metadata/blob/master/LICENSE"
description = "Hugo theme component that automatically generates metadata for Twitter's cards and Facebook's Open Graph protocol"
homepage = "http://example.com/"
tags = ["component", "social metadata"]
features = ["twitter cards", "open graph protocol"]
min_version = "0.41"
[author]
name = "Harsh Shandilya"
homepage = "https://msfjarvis.dev"