Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
PythonVuetifyMarkdown
Readme
This is an extension for Python-Markdown created for those who combine Python, Markdown, Vue, and Vuetify. I've been using this combination in several projects, and finally came across a need to process Markdown code, and keep it styled with Vuetify. Rather than McGuyver some solution in, I settled on a simple extension to do the heavy lifting.
The code is dead simple, and can be modified or extended to fit your needs.
pip install PythonVuetifyMarkdown
Here's a quick example of usage within a Django project. We have a Page model for custom pages, and a function to return the content parsed through Markdown.
from django.db import models
from django.utils.html import mark_safe
import markdown
from python_vuetify_markdown import PythonVuetifyMarkdown
class Page(models.Model):
title = models.CharField(max_length=200)
body = models.TextField()
def get_body_as_markdown(self):
return mark_safe(markdown.markdown(self.body, extensions=[PythonVuetifyMarkdown()]))
With this, you can create a Page object, and when displaying the body, you can use Page.get_body_as_markdown()
to pass in the Markdown-formatted code.
Currently, this extension modifies H1 to H6 tags and P tags. The styles can be found on the Vuetify Typography page.
There is none. This is a small side project, like 30 minutes of research and work went into it. Good luck.
FAQs
Adds Vuetify typography classes to various tags
We found that PythonVuetifyMarkdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.