Skip to content

Conversation

@ArnavBallinCode
Copy link
Contributor

@ArnavBallinCode ArnavBallinCode commented Nov 4, 2025

Summary

fixes #244

added OpenGraph and Twitter Card meta tags to public pages so that shared links display rich, visually appealing previews on social media platforms.
It also fixes several Django template syntax issues introduced during previous formatting (via djlint), including a blocktranslate closing tag bug that caused rendering errors.

These changes preserve existing site behavior while improving SEO and shareability, without modifying any backend models or database schema.


Changes

1. Implemented Site-wide Meta Tag Blocks

  • Added new OpenGraph and Twitter meta blocks in base.html:
    • og_title, og_description, og_type, og_url, og_image, og_image_alt
    • Corresponding twitter_* blocks for Twitter-specific overrides
  • Provided sensible defaults; individual pages can override blocks for customized previews.

2. Added Page-level Overrides

Enhanced preview accuracy for key public and authentication pages:

  • index.html
  • stats.html
  • login.html
  • signup.html

3. Fixed Template Syntax Errors

Manual fixes to prevent djlint from breaking Django tags:

  • login.html — corrected blocktranslate usage and element nesting
  • base.html — fixed multi-line tag formatting, url tag syntax, and language selector markup
  • sponsorshipprofile_list.html — minor structural fix

@netlify
Copy link

netlify bot commented Nov 4, 2025

Deploy Preview for pyladiescon-portal-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 943e9f0
🔍 Latest deploy log https://app.netlify.com/projects/pyladiescon-portal-docs/deploys/690d8268b9862700081751c2
😎 Deploy Preview https://deploy-preview-265--pyladiescon-portal-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Add base OpenGraph tags to base.html template
  - og:title, og:description, og:type, og:url, og:image
  - og:image:alt, og:site_name, og:locale
- Add Twitter Card meta tags to base.html
  - twitter:card, twitter:title, twitter:description
  - twitter:image, twitter:image:alt
- Implement custom OpenGraph blocks for public pages:
  - Homepage (index.html)
  - Stats page (stats.html)
  - Volunteer page (volunteer/index.html)
  - Sponsorship page (sponsorship/sponsorshipprofile_list.html)
  - Login page (account/login.html)
  - Signup page (account/signup.html)

All pages now have proper social media preview tags that can be
tested with browser extensions or social media preview tools.
- Fixed Django template syntax errors in base.html (multi-line conditionals, URL tags, language selection)
- Fixed blocktranslate syntax error in account/login.html
- All 319 tests now passing with 100% coverage
- OpenGraph and Twitter Card meta tags implemented across all public pages
- Templates functional and ready for production

 pyladies#244
@ArnavBallinCode
Copy link
Contributor Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate Opengraph Tag

1 participant