Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
collective.behavior.amp
Advanced tools
Support for Accelerated Mobile Pages (AMP) on Dexterity-based content types.
.. image:: https://raw.githubusercontent.com/collective/collective.behavior.amp/master/docs/amp.png :align: left :alt: Accelerated Mobile Pages :height: 128px :width: 128px
Support for Accelerated Mobile Pages in Plone
.. contents:: Table of Contents
The Accelerated Mobile Pages Project <https://www.ampproject.org/>
_ (AMP) is an open source project and service to accelerate content on mobile devices.
This package implements a behavior for Dexterity-based content types that adds an AMP HTML version of your content. Most newest mobile browsers will serve this version by default. Google will also link the mobile search results to this version.
.. image:: http://img.shields.io/pypi/v/collective.behavior.amp.svg :target: https://pypi.python.org/pypi/collective.behavior.amp
.. image:: https://img.shields.io/travis/collective/collective.behavior.amp/master.svg :target: http://travis-ci.org/collective/collective.behavior.amp
.. image:: https://img.shields.io/coveralls/collective/collective.behavior.amp/master.svg :target: https://coveralls.io/r/collective/collective.behavior.amp
Got an idea? Found a bug? Let us know by opening a support ticket <https://github.com/collective/collective.behavior.amp/issues>
_.
To enable this package in a buildout-based installation:
#. Edit your buildout.cfg and add add the following to it:
.. code-block:: ini
[buildout]
...
eggs =
collective.behavior.amp
After updating the configuration you need to run ''bin/buildout'', which will take care of updating your system.
Go to the 'Site Setup' page in a Plone site and click on the 'Add-ons' link.
Check the box next to Accelerated Mobile Pages Support
and click the 'Activate' button.
Go to 'Site Setup' and select 'Accelerated Mobile Pages';
set the publisher logo and the AMP analytics code <https://developers.google.com/analytics/devguides/collection/amp-analytics/>
_, if available.
.. figure:: https://raw.githubusercontent.com/collective/collective.behavior.amp/master/docs/controlpanel.png :align: center :height: 720px :width: 768px
The Accelerated Mobile Pages control panel configlet.
Go to 'Site Setup' and select 'Dexterity Content Types' and enable the 'Accelerated Mobile Pages' in your content types.
A new view named @@amp
will become available in all instances of your content type.
The view will display the logo of your site, a global navigation sidebar, and the main fields of your content type (including title, byline, resume, body text, and related items, if available);
it will also include metadata as structured data.
Capture of analytics data from AMP documents is supported using the amp-analytics
tag.
Refer to the examples in Adding Analytics to your AMP pages <https://developers.google.com/analytics/devguides/collection/amp-analytics/>
_ for more information on how to use this feature.
If sc.social.like <https://pypi.python.org/pypi/sc.social.like>
_ is installed,
a list of social share buttons honoring the configured plugins will be displayed between the byline and the resume.
Note that you have to enter a valid Facebook app_id
if you want to enable the Facebook button.
AMP is a way to build web pages for static content that render fast. AMP consists of three different parts:
AMP HTML AMP HTML is HTML with some restrictions for reliable performance and some extensions for building rich content beyond basic HTML. AMP JS The AMP JS library ensures the fast rendering of AMP HTML pages. Google AMP Cache The Google AMP Cache can be used to serve cached AMP HTML pages.
This package adds an alternate view to display your content as AMP HTML page, and adds a link to it in the header of any other view:
.. code-block:: xml
The body text is processed to remove invalid elements or to replace them by the corresponding AMP components.
This package would not have been possible without the contribution of the following people:
icons <http://fontawesome.io/>
_)You can find an updated list of package contributors on GitHub <https://github.com/collective/collective.behavior.amp/contributors>
_.
There's a frood who really knows where his towel is.
Fix i18n and update Brazilian Portuguese and Spanish translations (fixes #44
_).
[hvelarde]
Set correct language information (fixes #43
_).
[hvelarde]
Add support for the amp-sticky-ad
tag.
[hvelarde]
Fix support for the <amp-analytics>
tag.
[agnogueira, hvelarde]
Fix CSS error in logo position. [kakshay21]
Avoid exception when related items relation is broken. [rodfersou]
Fix loading order for main AMP script. [hvelarde]
Add class for social icon
Move description to article header. [agnogueira]
Do not fail if an image doesn't have a src
attribute,
or if it was referenced inside the body text as an external resource.
[hvelarde]
Clean up invalid AMP HTML attributes (fixes #26
_).
[rodfersou]
Explicitly disable any Diazo theme on the AMP HTML view. [hvelarde]
Use byline
field (if present) to get the name of the content's author.
[hvelarde]
Fix various exceptions raised when content has Archetypes based lead images. [hvelarde]
.. _#26
: https://github.com/collective/collective.behavior.amp/issues/26
.. _#43
: https://github.com/collective/collective.behavior.amp/issues/43
.. _#44
: https://github.com/collective/collective.behavior.amp/issues/44
FAQs
Support for Accelerated Mobile Pages (AMP) on Dexterity-based content types.
We found that collective.behavior.amp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.