Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@stalkerGH
Copy link
Contributor

Summary

I added safe and markdown filters to some pages because I couldn't use Markdown and HTML formatting in titles and descriptions (like italic or <em>italic</em>) - they was rendering "as-is" and not interpreted as I wanted to see them.

Related issue

This PR resolves issue #468

Screenshots

card

article

footer

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have updated config.toml in tabi-start
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Mastering tabi" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

@stalkerGH stalkerGH requested a review from welpo as a code owner February 11, 2025 08:30
@netlify
Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit dadc597
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/67b0971250ca9a0008d94ad2
😎 Deploy Preview https://deploy-preview-486--tabi-demo.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 site configuration.

@stalkerGH
Copy link
Contributor Author

Hmmm, I forgot about adding archive.html file. How can I add it to the PR?

BTW: I've noticed undesirable change in appearance of archived posts - line height is increased and post title's baseline is slightly lower than date's baseline. When I use only safe filter and use HTML tags in title, everything is OK. Maybe @welpo will find a solution?

@welpo
Copy link
Owner

welpo commented Feb 11, 2025

Hmmm, I forgot about adding archive.html file. How can I add it to the PR?

Edit the files locally, then create a new commit:

git add archive.html  # this tells git you want to commit this file
git commit -m "Add safe filter to archive"  # creates a commit with this message
git push  # pushes the changes to github

Any changes on your fork will be reflected in this PR :)

I've noticed undesirable change in appearance of archived posts - line height is increased and post title's baseline is slightly lower than date's baseline

I'll take a look once you commit archive.html! Shouldn't be too hard to solve with CSS. I'm guessing the filters are changing the rendered HTML structure.

@welpo welpo added the enhancement New feature or request label Feb 11, 2025
@welpo welpo changed the title Add safe and markdown filters to page titles and descriptions for HTM… ✨ feat: render markdown in page titles & descriptions Feb 11, 2025
@welpo
Copy link
Owner

welpo commented Feb 15, 2025

The problem with archive is that the markdown filter wraps everything in a paragraph (<p>), and we're styling paragraphs in main.scss to get that spacing. Docs.

Solution: call the filter as markdown(inline=true)

I've pushed the fix and I'll merge now.

Thanks for your contribution!

@welpo welpo merged commit 6837f6f into welpo:main Feb 15, 2025
7 checks passed
@stalkerGH
Copy link
Contributor Author

Great! Thanks for applying my commit and for all help with Github guts :)

@welpo
Copy link
Owner

welpo commented Feb 15, 2025

My pleasure!

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants