Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opengraph meta tags to pages. #127

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,34 @@ After installing Hugo, you can serve the page by running:
```
hugo server --buildDrafts
```


## Writing News entries

On the terminal, create a news entry by typing: (Replace ``breaking-news`` with your desired filename).

```
hugo new content content/news/breaking-news.md
```

A new file will be created in the ``/content/news/`` directory with the following front matter set by default.

```
+++
title = 'Breaking News'
date = 2024-08-15T11:01:52-07:00
draft = true
description = ''
image = ''
imagealt = ''
+++
```

Fill in all the fields above.

The frontmatter ``description``, ``image``, ``imagealt`` are used to generate opengraph meta tags. It is important
to fill these in correctly.

If the ``image`` or ``imagealt`` are not set, it defaults to render the PyLadiesCon logo.


3 changes: 3 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title = 'Home'
draft = false
layout = 2
description = "PyLadies Conference (PyLadiesCon) is the first Pyladies conference held– an exciting online and FREE event dedicated to empowerment, learning, and diversity within the Python community! Date: December 6th-8th At PyLadiesCon, we're bringing the Python world right to your doorstep. Make sure to mark your calendars for the first weekend of December as we embark on a two-day journey that promises to be unforgettable."
image = "/img/banner.png"
imagealt = "Website banner of PyLadiesCon 2024 Online. 6th-8th December | Multi-language | Multi-timezone."
+++

{{< rawhtml >}}
Expand Down
3 changes: 3 additions & 0 deletions content/about/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title = 'About'
draft = false
layout = 2
description = "PyLadies Conference (PyLadiesCon) is the first Pyladies conference held– an exciting online and FREE event dedicated to empowerment, learning, and diversity within the Python community! Date: December 6th-8th At PyLadiesCon, we're bringing the Python world right to your doorstep. Make sure to mark your calendars for the first weekend of December as we embark on a two-day journey that promises to be unforgettable."
image = "/img/about-photo-1.png"
imagealt = "Video call with 6 female participants with a diversity of hair styles and colours, skin tones and are all smiling."
+++

{{< pageheader
Expand Down
3 changes: 3 additions & 0 deletions content/news/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: 'News'
description: "Get news about PyLadiesCon by following us on social media (Mastodon, Twitter/X, Instagram, and LinkedIn and subscribing to our RSS Feed."
image: "/img/about-photo-2.png"
imagealt: "Three recially diverse women sitting on a sofa each with a laptop on their lap and smiling."
---

{{< pageheadersmall
Expand Down
3 changes: 3 additions & 0 deletions content/sponsors/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title = 'Sponsors'
draft = false
layout = 3
description = "Support PyLadies as we work to improve diversity by bringing fresh talent into the Python community and to support both seasoned and budding developersthrough workshops, community activities, and local advocacy.Supporting our first global conference will help PyLadies provide financialsupport to help more women around the world with training, mentorship, and aidto attend conferences and community events."
image = "/img/about-photo-2.png"
imagealt = "Three recially diverse women sitting on a sofa each with a laptop on their lap and smiling."
+++

{{< pageheadersmall
Expand Down
3 changes: 3 additions & 0 deletions content/volunteer/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title = 'Volunteer'
draft = false
layout = 1
description = "We would not be able to run this conference without help from our volunteers. Below are several volunteer roles available. Please read the role description thoroughly to understand the responsibilities and the expected time commitment. Once you decided which role you would like to volunteer for, please fill in the form, and one of our organizers will reach out to you."
image = "/img/about-photo-1.png"
imagealt = "Video call with 6 female participants with a diversity of hair styles and colours, skin tones and are all smiling."
+++

{{< pageheadersmall
Expand Down
3 changes: 3 additions & 0 deletions themes/pyladies/archetypes/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
description = ''
image = ''
imagealt = ''
+++
14 changes: 14 additions & 0 deletions themes/pyladies/layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta property="og:title" content="{{ .Page.Title }}">
<meta property="og:description" content="{{ .Page.Description }}">
<meta property="og:type" content="{{ .Page.Type }}">
<meta property="og:url" content="{{ .Page.Permalink }}">
{{ if isset .Page.Params "image" }}
<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Page.Params.Image }}">
{{ else }}
<meta property="og:image" content="{{ .Site.BaseURL }}img/icon.png">
{{ end }}
{{ if isset .Page.Params "imagealt" }}
<meta property="og:image:alt" content="{{ .Page.Params.Imagealt }}">
{{ else }}
<meta property="og:image:alt" content="PyLadiesCon Logo">
{{ end }}
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
Loading