{ "info": { "author": "Bryan Brattlof", "author_email": "hello@bryanbrattlof.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Pelican", "Framework :: Pelican :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "pelican-webassets\n#################\n\nThis plugin allows you to use `webassets\n`_ (a popular asset management\napplication for Python web development) to manage your CSS and JavaScript\nassets for your `Pelican `_ powered\nstatic website.\n\n:code:`webassets` comes with `many filters\n`_ like:\n\n* :code:`cssmin` and :code:`yui_css` to compress your CSS assets\n* :code:`libsass` and :code:`less` to compile CSS assets.\n* :code:`closure_js` and :code:`uglifyjs` for your JS assets\n\nas well as many more useful things like \n\n* `URL Expiry \"cache-busting\" \n `_, allowing you to\n set your :code:`Expires` headers for your assets long into the future.\n* :code:`spritemapper` to merge multiple images into one and generates CSS\n positioning for the corresponding slices\n* :code:`datauri` to replace :code:`url()` references to external files with\n internal `data: URIs `_.\n\nFor a more complete list, check out the `included filters\n`_ section in\ntheir documentation.\n\nInstalling\n##########\n\nThe :code:`pelican-webassets` package is ready to be installed via a simple\n:code:`pip` command:\n\n.. code-block::\n\n $ pip install pelican-webassets\n\nThen add the plugin to your list of :code:`PLUGINS` in your\n:code:`pelicanconf.py` file to include the plugin in your next pelican build.\n\n.. code-block:: python\n\n PLUGINS = [\n # ...\n 'pelican_webassets',\n # ...\n ]\n\n\nUsing the Plugin\n################\n\nAfter you've installed the package, include one or more :code:`{% assets %}` \ntags into your templates to generate the links to your processed assets.\n\n.. code-block:: jinja\n\n {% assets filters=\"libsass,cssmin\", output=\"css/style.min.css\", \"css/style.scss\" %}\n \n {% endassets %}\n\nThe example above uses the :code:`libsass` and :code:`cssmin` filters to\ncompile, minify and save :code:`style.scss` to :code:`ASSET_URL` (equals\n:code:`{THEME_STATIC_DIR}/`) and results in a final output path of:\n\n.. code-block:: jinja\n\n \n\nJavaScript\n==========\n\nAnother example using JavaScript, uses :code:`closure_js` to combine, minify\nand compress :code:`js/jQuery.js` and :code:`js/app.js`:\n\n.. code-block:: jinja\n\n {% assets filters=\"closure_js\", output=\"js/packed.js\", \"js/jQuery.js\", \"js/widgets.js\" %}\n \n {% endassets %}\n\ninto a script element like this:\n\n.. code-block:: jinja\n\n \n\nOptions\n#######\n\nWEBASSETS_CONFIG\n================\n\nSome filters require extra configuration options to function properly. You can\nuse :code:`WEBASSETS_CONFG` to specify these options in a list of \n:code:`(key, value)` tuples.\n\n.. code-block:: python\n\n WEBASSETS_CONFIG = [\n ('closure_compressor_optimization', 'ADVANCED_OPTIMIZATIONS'),\n ('libsass_style', 'compressed') \n ]\n\n\nWEBASSETS_BUNDLES\n=================\n\n:code:`WEBASSETS_BUNDLES` is a list of 3 item tuples consisting of\n:code:`(name, args, kwargs)` which will be passed to the environment's `register()\n`_\nmethod.\n\n.. code-block:: python\n\n WEBASSETS_BUNDLES = ((\n 'my_bundle',\n ('css/style.scss',),\n {'output': 'css/style.min.css', 'filters': ['libsass', 'cssmin']}\n ),)\n\nAllowing you to simplify something like this:\n\n.. code-block:: jinja\n\n {% assets filters=\"libsass,cssmin\", output=\"css/style.min.css\", \"css/style.scss\" %}\n\ninto this:\n\n.. code-block:: jinja\n\n {% assets 'my_bundle' %}\n\n\nWEBASSETS_DEBUG\n===============\n\nBy default, :code:`webassets` will disable asset packaging if Pelican is in\n:code:`DEBUG` mode. You can change this by overriding the :code:`WEBASSETS_DEBUG`\nvalue.\n\n.. code-block:: python \n\n # put webassets into DEBUG mode if pelican is \n WEBASSETS_DEBUG = logger.getEffectiveLevel() <= logging.DEBUG\n\nWEBASSETS_SOURCE_PATH\n=====================\n\nIf your raw assets are in directories other than your :code:`THEME_STATIC_PATHS`,\nyou can supply additional directories to search in with\n:code:`WEBASSETS_SOURCE_PATHS`.\n\n.. code-block:: python\n\n WEBASSETS_SOURCE_PATHS = [\n 'src/scss',\n 'src/js'\n ]\n\nWant to Help?\n#############\n\nPlease feel free to help. Issues, pull requests, even `patches via email\n`_, all are warmly welcomed.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/bryanbrattlof/pelican-webassets", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pelican-webassets", "package_url": "https://pypi.org/project/pelican-webassets/", "platform": "", "project_url": "https://pypi.org/project/pelican-webassets/", "project_urls": { "Homepage": "https://gitlab.com/bryanbrattlof/pelican-webassets" }, "release_url": "https://pypi.org/project/pelican-webassets/0.1.0/", "requires_dist": [ "webassets" ], "requires_python": "", "summary": "A Pelican plugin so you can use webassets", "version": "0.1.0" }, "last_serial": 5822232, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "d3c1a06511866ddf134c7fe460ed5fa8", "sha256": "a61773891e437e48b1e14821d93b1b54126a0e29d54ea1f982b0504f37f21f94" }, "downloads": -1, "filename": "pelican_webassets-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d3c1a06511866ddf134c7fe460ed5fa8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4435, "upload_time": "2019-09-12T19:49:51", "url": "https://files.pythonhosted.org/packages/8d/1f/64768758acbb8641152f7047921465f414e91fe1fdcb591f75d3c313cb60/pelican_webassets-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be6e14eab124ebd494731e445c14681f", "sha256": "0df584d2a52214af10b1aa8815c970675290832aba13dcf19eb1a3c392fd97d2" }, "downloads": -1, "filename": "pelican-webassets-0.0.0.tar.gz", "has_sig": false, "md5_digest": "be6e14eab124ebd494731e445c14681f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4041, "upload_time": "2019-09-12T19:49:54", "url": "https://files.pythonhosted.org/packages/99/61/5bd7e9c84a845aa54461d489407702218955433f7a4f0aa5c78dfc7359dc/pelican-webassets-0.0.0.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "09481688df7de073a2177f03386a5020", "sha256": "2ae5075df3de8801677aa628e20f1a8de3d585daf02b196b440cf6a94eddf37b" }, "downloads": -1, "filename": "pelican_webassets-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "09481688df7de073a2177f03386a5020", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4435, "upload_time": "2019-09-12T19:56:10", "url": "https://files.pythonhosted.org/packages/b2/cf/770d4858e9a1818297ace10f0c67b8f9a4f799682fb389206d071e428e67/pelican_webassets-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1efd74f36b0fbada8b1d4d234b715d5c", "sha256": "6c98cd0a38be3fd492e9c15b819d7dc8127c4550cf25e109047de4eda656e42b" }, "downloads": -1, "filename": "pelican-webassets-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1efd74f36b0fbada8b1d4d234b715d5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4042, "upload_time": "2019-09-12T19:56:11", "url": "https://files.pythonhosted.org/packages/28/eb/d3c95631e8aff92e3ac3f646ca48aebb884664c5df3e88c45eb53e7e89e5/pelican-webassets-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "09481688df7de073a2177f03386a5020", "sha256": "2ae5075df3de8801677aa628e20f1a8de3d585daf02b196b440cf6a94eddf37b" }, "downloads": -1, "filename": "pelican_webassets-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "09481688df7de073a2177f03386a5020", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4435, "upload_time": "2019-09-12T19:56:10", "url": "https://files.pythonhosted.org/packages/b2/cf/770d4858e9a1818297ace10f0c67b8f9a4f799682fb389206d071e428e67/pelican_webassets-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1efd74f36b0fbada8b1d4d234b715d5c", "sha256": "6c98cd0a38be3fd492e9c15b819d7dc8127c4550cf25e109047de4eda656e42b" }, "downloads": -1, "filename": "pelican-webassets-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1efd74f36b0fbada8b1d4d234b715d5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4042, "upload_time": "2019-09-12T19:56:11", "url": "https://files.pythonhosted.org/packages/28/eb/d3c95631e8aff92e3ac3f646ca48aebb884664c5df3e88c45eb53e7e89e5/pelican-webassets-0.1.0.tar.gz" } ] }