Saravanan666/pypi-org huggingface dataset:
Package: lektor-npm-support
lektor-npm-supportlektor-npm-supportmakes it easy to useParcel,webpack,browserify, or any other tool to build assets forLektorprojects.Enabling the PluginTo enable the plugin, run this command while inside your Lektor project directory:lektorpluginsaddlektor-npm-supportExample: Creating aParcelProjectCreate aparcel/folder and inside that folder create the following files:configs/npm-support.iniThis file instructs the plugin how to generate the assets:[parcel]npm=yarnwatch_script=watchbuild_script=buildThe section name[parcel]is the name of the folder where the Parcel project is located.npmis the package manager command used to build the project. This example will useYarn.watch_scriptis the npm script used inlektor server -f npm,build_scriptis the npm script used inlektor build -f npm.This plugin supports more than one such entry.parcel/package.jsonThis is a standardpackage.jsonfile. It should contain two entries in thescriptssection. Thebuildscript is used duringlektor build -f npm, and thewatchscript is used duringlektor server -f npm.{"name":"my-parcel-project","version":"1.0.0","scripts":{"watch":"NODE_ENV=development parcel --out-dir=../assets/static/gen --out-file=main.js --public-url=./assets/ main.js","build":"NODE_ENV=production parcel build --out-dir=../assets/static/gen --out-file=main.js --public-url=./assets/ main.js"},"private":true}Now we can useyarn addto add Parcel,BabelandSass:$ cd </path/to/your/lektor/project>/parcel
$ yarn add parcel-bundler babel-preset-env node-sassparcel/babelr.rcNext up is a simple Babel config file, using the recommendedenvpreset.{"presets":["env"]}parcel/main.scssA simple SCSS file.body{border:10pxsolidred;}parcel/main.jsA simple Javascript file that imports the SCSS file so that Parcel will know to include it as well.import'./main.scss';Running the ServerNow you're ready to go.  When you runlektor servernothing wil happen,
instead you need to now run it aslektor server -f npmwhich
will enable the Parcel build.  Parcel will automatically build your files
intoassets/static/genand this is where Lektor will then pick up the
files.  This is done so that you can ship the generated assets
to others that might not have these tools, which simplifies using a
Lektor website that use this plugin.Manual BuildsTo manually trigger a build that also invokes webpack you can uselektor build -f npm.Including The FilesNow you need to include the files in your template.  This will do it:<linkrel="stylesheet"href="{{ '/static/gen/main.css'| asseturl }}"><scripttype=text/javascriptsrc="{{ '/static/gen/main.js'| asseturl }}"charset="utf-8"></script>Complete Working ExampleTheexamplesfolder of this repository contains working projects.CreditsThis plugin is based on the officiallektor-webpack-supportLektor plugin byArmin Ronacher.
Package: lektor-polymorphic-type
Lektor Polymorphic TypeThis plugin adds a new polymorphiclektorfield type,polymorphic.
The determination of the actual type implementation of the field value
is deferred until evaluation time.A motivating use case is to support having a “body” field whose
formatting can be switched between, e.g.,markdown, andhtml(or
some other formatted type, such asreStructuredText.)InstallationAdd lektor-polymorphic-type to your project from command line:lektor plugins add lektor-polymorphic-typeSeethe Lektor plugin documentationfor more information.How It WorksIf the field has apolymorphic_typeoption set, that value is evaluated
and the result is interpreted as the name of the final type for the
field.If nopolymorphic_typeoption is set for the field, then we look for a
field on the current record whose name is name of the current field
with “_type” appended.ExamplesSimple ExampleHere is an example model file for a simple page, with a selectable body format:# page.ini[model]name=Pagelabel={{ this.title }}[fields.title]label=Titletype=string[fields.body]label=Bodytype=polymorphic[fields.body_type]label=Body Typetype=selectchoices=markdown, html, textdefault=markdownHere, the value of thebody_typefield on a particular page will
determine whether thebodyfield is interpreted as beingmarkdown,htmlortext.Contrived ExampleHere is a contrived example showing the use of thepolymorphic_typeoption:# page.ini[model]name=Pagelabel={{ this.title }}[fields.title]label=Titletype=string[fields.body]label=Bodytype=polymorphicpolymorphic_type='html' if this.body.lstrip().startswith('<') else 'markdown'In this case, thebodyfield will be interpreted as raw HTML if the
content of that field starts with a “<”, otherwise it will be
interpreted asMarkdowntext.AuthorJeff Dairikidairiki@dairiki.orgChangelog0.1 — 2021-02-05No code changes.Update development status classifier to "stable".Test under python 3.9.  Stop testing under 3.5.0.1b1 — 2020-05-04Initial release.
Package: lektor-pythonmarkdown
Lektor Python-Markdown PluginALektorplugin to parse markdown usingPython-Markdown. By default, lektor
usesmistuneto parse markdown
field.
With this plugin, you can chose which parser is to be used by setting a
different type on the field. Either:markdownorpythonmarkdownInstallationAdd lektor-pythonmarkdown to your project from command line:lektor plugins add lektor-pythonmarkdownUsageIn your model, you need to define the type of field as follow:[model]
name = Page

[fields.body]
label = Body
type = pythonmarkdownWarning !This plugins is is obviously incompatible with all of the mistune-specific events and plugins. Namely, all ofmarkdown-*events and the plugins built around them.Advance configurationThis lektor plugins provide a nice way to configure python-markdown. For instance, it's possible to explicitly define the extentions to be enabled and to configure each of them seperatly.For an advance configuration, you need to create a file namedpythonmarkdown.iniin theconfigsfolder.In that file you may write something similar to the following:[markdown]
# Define the configuration of python-markdown.
# Reference: https://python-markdown.github.io/reference/#markdown

#output_format = xhtml1
#tab_length = 4
#safe_mode = False
#enable_attributes = True
#smart_emphasis = True
#lazy_ol = True

[extensions]
# List extensions to be enabled.
markdown.extensions.extra = 1
markdown.extensions.admonition = 1
markdown.extensions.codehilite = 1
markdown.extensions.meta = 1
markdown.extensions.nl2br = 1
markdown.extensions.sane_lists = 1
markdown.extensions.smarty = 1
markdown.extensions.toc = 1
markdown.extensions.wikilinks = 1

[markdown.extensions.codehilite]
# Specific configuration for an extension.
# Reference: https://python-markdown.github.io/extensions/code_hilite/#usage
linenums = True
#guess_lang = True
#css_class = codehilite
#pygments_style = default
#noclasses = False
#use_pygments = TrueReferencesLektor-PythonMarkdown plugin
Package: lektor-responsive-image
Lektor Responsive Images PluginThis plugin hacks up Lektor’s Markdown renderer to support
multi-resolution responsive images in Markdown text.Local images will be resized to a variety of sizes, and<img>tags
will be rendered withsrcsetand (optionally)sizesattributes in
order to support the use ofresponsive image
resolutions.This plugin also registers a Jinja global function,responsive_image,
which can be used to render markup for multi-resolution images from
Jinja templates.ConfigurationThe plugin is configured throughconfigs/responsive-images.ini.
Here is an annotated example:# Currently, only a section named "default" is used[default]# Widths of images to generate.## Images will be generated at these widths (but only up to the native# width of the image.)## (This is the default value.)widths=480 800 1200 2400# Image quality for generating scaled images# (This is the default value.)# NOTE: the quality parameter will be ignored if running under lektor version# before 3.1.quality=92# Width of the image put into the `src` attribute of the `<img>` tag.# (Though the orignal image is never up-scaled.  If the original is narrower than# this width, then the original image is used.)# (This is the default value.)default_width=1200# Value put into the `sizes` attribute of the `<img>` tag.# The default is not to set a `sizes` attributesizes=(max-width: 576px) 95vw, (max-width: 992px) 65vw, 800pxUsageIn the common use case, you will want to adjust the CSS stylesheet for
your site so that images within Markdown text get eitherdisplay: blockordisplay: inline-block, along withmax-width: 100%, or
similar.Jinja global functionThis plugin also registers a Jinja global function namedresponsive_image.
It expects a single argument, which should be anImageinstance.
It returns an object which has an.attrattribute whose value is
a dict of attribute which could be set on an<img>tag to generate
markup for a multi-resolution image.  E.g.{%setimage=this.attachments.get('figure.png')%}{%setimg_attrs=responsive_image(image).attrs%}<figureclass="figure"><imgclass="figure-img"{{img_attrs|xmlattr}}><figcaptionclass="figure-caption text-center">{{-this.caption-}}</figcaption></figure>AuthorJeff Dairikidairiki@dairiki.orgChangelogRelease 1.0.0 (2024-01-24)There are no substantive code changes from release 1.0.0b1.Test under python 3.12, drop testing under python 3.7.Usepdmfor build and dev env management.Userufffor style linting and formatting.Release 1.0.0b1 (2023-04-20)We've dropped support for python < 3.7.
We now test under both Lektor 3.3.x and (now in pre-release) Lektor 3.4.xVersion 0.1a1 (2021-02-13)Split code into it's own git respository.
Package: lektor-root-relative-path
Lektor root-relative-path pluginThis plugin returns root-relative-path list from top page to current page as below.[(toppage_url, toppage_name), ...(parent_url, parent_name), (url, name)]InstallationAddlektor-root-relative-pathto your project from the command line:lektor plugins add lektor-root-relative-pathSeethe Lektor documentation for more instructions on installing plugins.ConfigurationSet these option inconfigs/root-relative-path.ini:navi_top_page_nameOptional. Name of top page inidicated in the navication. Default is 'Top Page'navi_top_page_name = 'Top Page'How to useInsert the following line in the template (e.g. layout.html) which you would like to show navigation.{% for i in this._path | root_relative_path_list %}
  >><a href="{{i[0]}}">{{i[1]}}</a>
{% endfor %}Then, navigation is shown as below in case the page 'blog/first-post/'>>Top Page >>blog >>first-postIf you do not want to show current page in the navigation, modify template as below.{% for i in this._path | root_relative_path_list %}
  {% if not loop.last %}
    >><a href="{{i[0]}}">{{i[1]}}</a>
  {% endif %}
{% endfor %}Then, navigation is shown as below.>>Top Page >>blog
Package: lektor-scss
SCSS compiler for lektorSCSS compiler forLektorthat compiles css from sass.How does it actually work?It useslibsassIt looks for.scssand.sassfiles(ignores part files that begin with a underscore e.g. '_testfile.scss') and compiles them as part of the build process.It only rebuilds the css when it's needed (file changed, a file it imports changed or the config changed).When starting the the development server it watches the files for changes in the background and rebuilds them when needed.InstallationYou can install the plugin with Lektor's installer:lektorpluginsaddlektor-scssOr by hand, adding the plugin to the packages section in your lektorproject file:[packages]lektor-scss=1.5.0UsageTo enable the plugin, pass thescssflag when starting the development
server or when running a build:# build and compile css from scsslektorbuild-fscss# edit site with new generated csslektorserver-fscssPython3It is highly recommended to use this plugin with a python3 version of lektor.Since lektor can be used as a python module it is possible to enforce this(after lektor is installed eg. withpip3 install --user --upgrade lektor)with the following command:# run a python3 lektor server with new generated csspython3-mlektorserver-fscssConfigurationThe Plugin has the following settings you can adjust to your needs:parameterdefault valuedescriptionsource_dirassets/scss/the directory in which the plugin searchs for sass files (subdirectories are included)output_dirassets/css/the directory the compiled css files get place atoutput_stylecompressedcoding style of the compiled result. choose one of: 'nested', 'expanded', 'compact', 'compressed'source_commentsFalsewhether to add comments about source linesprecision5precision for numbersinclude_pathsIf you want to include SASS libraries from a different directory, libsass's compile function has a parameter calledinclude_pathsto add those directories to the search path.use_compile_flagTrueIf True the flag '-scss' is needed. Otherwise not.An example file with the default config can be found atconfigs/scss.ini. For every parameter that is not specified in the config file the default value is used by the plugin.DevelopmentTo test and/or develop on this plugin in your running lektor installation, simply place it in thepackages/Folder and have a look at theLektor Doku
Package: lektor-scsscompile
SCSScompileSCSS compiler for Lektor that automatically compiles sass.Useslibsassand looks for .scss/.sass files (ignores part files that begin with a underscore e.g. '_testfile.scss'),
compiling them as part of the build process. It only rebuilds when it's needed (file changed, a file it imports changed or the config changed). When starting the the development server it watchs the files for changes in the background and rebuilds them when needed.InstallingYou can install the plugin with Lektor's installer::lektorpluginsaddlektor-scsscompileOr by hand, adding the plugin to the packages section in your lektorproject file::[packages]lektor-scsscompile=1.3.0UsageTo enable scsscompile, pass thescsscompileflag when starting the development
server or when running a build::lektorbuild-fscsscompilelektorbuild-fscsscompileThe Plugin has the following settings you can adjust to your needs:parameterdefault valuedescriptionsource_dirasset_sources/scss/the directory in which the plugin searchs for sass files (subdirectories are included)output_dirassets/css/the directory the compiled css files get place atoutput_stylecompressedcoding style of the compiled result. choose one of: 'nested', 'expanded', 'compact', 'compressed'source_commentsFalsewhether to add comments about source linesprecision5precision for numbersoutput_source_mapFalsewhether a source map should be generatedAn example file with the default config can be found atconfigs/scsscompile.ini
Package: lektor-shortcodes
Lektor ShortcodesThe Lektor Shortcodes plugin allows you to use shortcodes (shortcodes are
something like custom tags) in your fields (not templates), so your content
doesn't have to have repetitive snippets over and over.For example, my blog has some specific HTML that I add when I want an image with
a border and caption to be displayed.  The HTML looks like this:<divclass="alignright"><ahref="image-large.jpg"><imgsrc="image.jpg"/><spanclass="caption">The caption</span></a></div>Copy-pasting this every time gets tedious, and I have to search and replace it
in all the content files every time I want to make a change.  With the
shortcodes plugin, this can be written as:[% image align=right link="image-large.jpg" image=image.jpg caption="The caption" %]Much easier, cleaner and less repetitive.InstallationTo install the plugin, just addlektor-shortcodesto your plugins from the
command line:lektor plugins add lektor-shortcodesUsageUsing the plugin is simple. Just create a config file calledshortcodes.iniin
yourconfigsdirectory and specify some shortcode templates. The templates are
full Jinja templates, although (due to some limitations of ini files) they need
to be on one line.For instance, for the example above, the config file could be:[global]image='<div class="align{{ align }}">{% if link %}<a href="{{ link }}"{% if not link.startswith("http") %} data-lightbox="gallery"{% endif %}>{% endif %}<img src="{{ image }}">{% if link %}</a>{% endif %}{% if caption %}<span class="caption">{{ caption }}</span>{% endif %}</div>'This will allow you to use shortcodes with optional arguments, like so:# An image with no caption or link:
[% image align=right image=hello.jpg %]


# An image with a link:
[% image align=right link=http://www.example.com image=hello.jpg %]

# Link and caption:
[% image align=right link=http://www.example.com image=hello.jpg caption="Hello!" %]Shortcodes defined within the section namedglobalwill be processed
automatically inside any of your site’s Markdown content. It is also possible to
define shortcodes which are only expanded when the Jinja2 template for a page
explicitly requests it. Shortcodes defined in any section not namedglobalwill only be applied when the template passed the content through a Jinja2
filter namedshortcode. For example, if your HTML template references a field
calledbody, and your config has a section called[special], you may request
expanding shortcodes defined within thespecialsection like so:{{ body|shortcodes(section="special") }}This will enable all shortcodes from the specified section, in addition to all
globally defined shortcodes. If no section is specified, the filter defaults to
the section namedmain(so it will include shortcodes inmainunless you
request a different section, and it will always include shortcodes inglobalno
matter what).MiscellaneaIf you find a bug or have a feature request, please open an issue or file a PR.
Thanks!
Package: lektor-simplemde
What is this?This is a plugin forLektorintegrates theSimpleMDEvisual markdown editor. It attaches SimpleMDE to all fields of typemarkdownaccording to the modelInstallationInstall the plugin from pypi with one of thestandard ways. No settings are required.Known issuesCurrently, the editor is also shown fortextfields i.e. it is shown for all fields that render as a <textarea> in the admin interface.LicenseThe plugin is distributed under theMIT licenseSupportIf you have problems or suggestions, submit them via issues here or useSpherical support form
Package: lektor-slugify
lektor-slugifyThis is a Lektor plugin that provides a simple template filter that transforms a (unicode) string into a slug.Usage:{{ var|slug }}Advanced usage: The|slugfilter can also accept keyword arguements that are passed to python-slugify. That means you have the option of doing, for example,{{ var|slug(lowercase=False) }}to preserve case sensitivity.This is a simple use of the Python packagepython-slugify.
Package: lektor-strip-html-tags
lektor-strip-html-tagsThis is a simple Lektor plugin that creates a template filter to remove HTML tags from a string. The use it was created for was to do processing on HTML outputted from a Markdown content field. The Markdown is rendered into HTML, and this filter can turn that into simple text, which was then passed to thelektor-natural-languagefilters to get keywords, unsullied by things like<div>tags.Example usage:{{ this.body|striphtmltags }}{%setvar='<p><strong>Hello</strong>World!</p>'%}{{var|striphtmltags}}The last example will render as "Hello World!"
Package: lektor-surge
Lektor Surge Publisher PluginPublishes yourLektorsite toSurge.InstallationAdd lektor-surge to your project from command line:lektor plugins add lektor-surgeSeethe Lektor documentation for more instructions on installing plugins.ConfigurationConfigure Surge in your.lektorprojectfile:[servers.surge]target=surge:my-domain.comTo force all traffic to HTTPS, update your.lektorprojectfile:[servers.surge]target=surge+https:my-domain.comFor more information, see theSurge guide to HTTPS.DeploymentDeploy your site with Lektor from the command line:lektor deploy surge
Package: lektor-tailwind
Lektor 💛 Tailwind CSSA Lektor plugin that adds Tailwind CSS to your project seamlessly.Get StartedAdd plugin to your project$lektorpluginaddlektor-tailwind
$lektorpluginlistConfigure your template pathsIntailwindcss.config.js:module.exports={content:['./templates/**/*.{html,j2}'],theme:{extend:{},},plugins:[],}Add the Tailwind directives to your CSSInassets/static/style.css:@tailwindbase;@tailwindcomponents;@tailwindutilities;Start lektor build or server:$lektorbuild
$lektorserverYou got it. Please refer toofficial Tailwind documentationfor more information on using Tailwind CSS and its CLI.ConfigurationBy default, the input CSS file inassets/static/style.css, while it can be changed bycss_pathplugin config.
Package: lektor-tawk
# Lektor TawkThis plugin adds support for Tawk to Lektor. Once the plugin is enabled a render_tawk function will render a Tawk Live Chat.## Enabling the PluginTo enable the plugin add this to your project file:` $ lektor plugins addlektor-tawk`## Configuring the PluginThe plugin has a config file that is needed to inform it about your website. Just create a file named tawk.ini into your configs/ folder and configure the live_chat_code key with the ID if your Tawk:` live_chat_code = your_live_chat_code `## In TemplatesNow you can render to any of your templates by just using the render_tawk function. Just calling it is enough to get the live chat:`<div>{{render_tawk}}</div>`
Package: lektor-tekir
lektor-tekir is an alternative admin panel forLektor.What works:Navigating content.Adding, editing and deleting content items.Adding, deleting and replacing attachments.Publishing (deploying) the site.Multiple language support in the UI (English and Turkish at the moment).Support for light/dark mode preference.A widget for navigating content elements in the site.What’s planned in the short term:Editing attachments.Editing system fields.Dividing edit form fields into tabs.Supporting Git.Managing content translations.TinyMCE, Quill or some other editor integration.What’s planned in the longer term:Managing databags.Markdown editor integration.Managing everything (templates, static assets, models, flow blocks, etc).It can be installed using pip:pip install lektor-tekirTo use it, run:lektor-tekir serveAnd use the edit buttons on pages.Thelektor-tekirCLI is identical to the Lektor CLI
except that it patches theservecommand to enable its own panel.All icons are from the Breeze project.
Package: lektor-thumbnail-generator
Lektor Thumbnail GeneratorThis plugin automatically generates thumbnails for any images in your Lektor
content. The difference between this plugin and thethumbnailfilter is that
this is geared towards content, i.e. you don't need to have any references to
the images in your templates at all.UsageUse this plugin if you want to be able to link to full-size images in your
content, but still want thumbnails to be generated for the link itself. For
example, you may have an image calledcat.jpg, and to link to it in thecontent(not the template), but also show a thumbnail.You can do that like so:<a href="cat.jpg"><img src="cat-small.jpg" /></a>InstallationTo install the plugin, just addlektor-thumbnail-generatorto your plugins
from the command line:lektor plugins add lektor-thumbnail-generatorIf you have trouble, see theplugin
installationsection of the Lektor
documentation.Then, create a config file calledconfigs/thumbnail-generator.iniand add
a few sections for images. The section names can be whatever you want, the
final images will be calledimagename-sectionname.ext. For example, this
config file:[small]
max_width = 30

[medium]
max_width = 400
max_height = 400

[woowee]
max_width = 2000Will take a file calledcat.jpgand create the filescat-small.jpg,cat-medium.jpgandcat-woowee.jpg. All the files will be created, regardless
of whether the original file is smaller, so you can link without worrying
whether a file will exist or not. If the original file is smaller than the width
you have specified, the file will only be copied, and will not be resized.
Themax_width/max_heightparameters work like for theLektor
thumbnailcommand.