kentico / kentico-amp Goto Github PK
View Code? Open in Web Editor NEWAccelerated Mobile Pages module for Kentico EMS.
Home Page: https://www.kentico.com/
License: MIT License
Accelerated Mobile Pages module for Kentico EMS.
Home Page: https://www.kentico.com/
License: MIT License
Will you be upgrading this to use K11
While Kentico 11 CMS App has a dependency on AngleSharp, Kentico AMP uses HtmlAgilityPack, which provides a similar functionality. It's redundant to have both.
Get rid of the HtmlAgilityPack dependency and replace it with AngleSharp.
Note: AngleSharp does not support XPaths, the code needs to be rewritten to LINQ for AngleSharp.
It's common that Kentico generates picture
tags with several source
s. The following syntax (which can be found on the Dancing Goat sample site) is not a valid AMP:
<picture>
<source media="(max-width: 767px)" srcset="/Kentico10webapp/getattachment/4aeae1fa-1cbe-4d28-9523-fc9b754ed379/teaser.aspx?variant=large"></source>
<source media="(min-width: 768px) and (max-width: 1111px)" srcset="/Kentico10webapp/getattachment/4aeae1fa-1cbe-4d28-9523-fc9b754ed379/teaser.aspx?variant=small"></source>
<source media="(min-width: 1112px)" srcset="/Kentico10webapp/getattachment/4aeae1fa-1cbe-4d28-9523-fc9b754ed379/teaser.aspx?variant=medium"></source>
<amp-img class="article-tile-image" src="/Kentico10webapp/getattachment/4aeae1fa-1cbe-4d28-9523-fc9b754ed379/teaser.aspx" alt="Article Coffee processing techniques"></amp-img>
</picture>
The validator says:
The tag 'picture' is disallowed.
The markup should resolve into one of the defined sources. Ideally, to the one with the lowest resolution.
A new replacement logic will have to be added to [TransformToAmpHtml()
](
You have in the instructions that we go to
Settings -> Content -> Output filter -> AMP Filter
Should be
Settings -> System -> Output filter -> AMP Filter
Global
Settings -> System -> Output filter -> AMP Filter seems to have more options for setting the script URL. Most people will not need to change.
I'm very unfamiliar with standard practices with submitting git "issues" but i couldn't find a way to just contact someone directly with this question:
Would it be possible to deploy this as a module within the Kentico Markeplace and if not, is it possible to export this module from one kentico instance and import it via the Kentico Portal in another instance of the same exact version?
Set description from marketplace to installation package of Accelerated Mobile Pages for Kentico module.
Would it be possible to re-use some of the functionality for Kentico MVC?
In settings, it should be possible to add domains like:
amp.localhost
amp.sub.domain.com
amp.com/kentico
(to support virtual directories)The validation regex needs to be adjusted.
^(?!.{256})(?:a-z0-9?.)+(?:[a-z]{1,63}| xn--[a-z0-9]{1,59})$
.There should be a single class containing setting accessors. This helps to find occurrences when refactoring. E.g. AMPFilterDomainAlias
is being queried on multiple places.
Could be based on #development=1
The goal of this task is to:
/Articles/%
CheckStateHelper
to use wildcard scopes instead pf PageNodeGUID for matchingWe have implemented the AMP Module in our site based on the below reference link and our site running on kentico 10 version and the Nuget package version we used for AMP module is Kentico.AcceleratedMobilePages/1.0.3.
Ref: https://devnet.kentico.com/articles/google-amping-the-kentico-advantage-site
We have an issue in our site while browsing the page we are getting wrong URL as canonical URL.
We have given custom URL pattern to our page.
In that custom URL we given a macros like "/amp/{sectionname}/{mm}/{dd}/{yy}/{title}", so the canonical URL displaying
the same path instead of page URL.
Below are the steps to reproduce the issue on live site.
Kindly help me to get the correct canonical url display or to remove the canonical URL link.
Optimize performance of replacements.
finalHtml = Regex.Replace(finalHtml, "</head>", metaTag + "</head>");
Good resources:
https://blog.maartenballiauw.be/post/2017/04/24/making-string-validation-faster-no-regular-expressions.html
It should be possible to add other amp elements either by including configuration to allow them within the UI or, probably more useful, by providing an event or a way to extend the parsing that is already being done.
Currently, the AMP pages can be located only on different domains or subdomains.
original: http://domain.tld/my-blogpost
amp: http://amp.domain.tld/my-blogpost
alt amp: http://different.tld/my-blogpost
It should be possible to set it up so that the AMP pages are served from the same domain as where the original content is located.
original: http://domain.tld/my-blogpost
amp: http://domain.tld/amp/my-blogpost
alternatively: http://domain.tld/my-blogpost/amp
GetFilterState()
method needs to be adjusted.Related to #4
If the application runs on http://localhost/Kentico10
and I set the AMP domain to amp.localhost.com
, the link pointing to AMP version of a page is generated incorrectly:
<link rel="amphtml" href="http://amp.localhost.com/Home" />
instead of
<link rel="amphtml" href="http://amp.localhost.com/Kentico10/Home" />
The module should be adjusted to support this scenario. This method is the starting point for fixing.
Relates to: #4
In a Kentico 11.0.49 site, I installed the K11 release of the Kentico.AcceleratedMobilePages module via NuGet. The generated AMP tag includes the specified AMP domain, and all the URL friendly extensions for the site. (http://amp.local.wfdev.net;;.aspx;.html;.xml;.txt)
I think this may have been fixed in #31, but that fix doesn't seem to be pulled down in the Kentico 11 version of the module.
domain.com/thewire should have an amphtml tag with an href of amp.domain.com/thewire
I'm hoping the Kentico 11 release of this module can be updated to include the bug fixes made before it was ported to Kentico 12.
I'm getting the following error in the browser's console window when a basic Kentico form is submitted on an AMP.
Response must contain the AMP-Access-Control-Allow-Source-Origin header
From the documentation, I'm not seeing any steps to allow basic form submissions on an AMP. I also see that on my phone, the amp.advantage.kentico.com site's search functionality leads to a 404 page so I'm not currently seeing any working examples of a Kentico on-line form on an AMP.
Any help or insight you can provide would be greatly appreciated.
The CMSFriendlyURLExtension
setting can be one extension (e.g. .aspx
), but it can also be list of extensions separated by semicolon (e.g. .aspx;.html;.htm
).
The list of extensions is not taken into account in code using this setting, e.g.
Review usage of the setting and in case of more extension, use just first one.
The default DOCTYPE declaration for the master page in Kentico is DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
I'm getting a number of errors relating to this when I validate my accelerated mobile page. I tried using the macro to determine what the DOCTYPE declaration should be but it's not actually evaluated and produces a similar validation error.
Validation Error Example:
Prohibited or invalid use of HTML Tag
The attribute '"-//w3c//dtd' may not appear in tag 'html doctype'.
1 instance
Line 1:0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/
Another Example:
The attribute '!ampfilter.isamppage()' may not appear in tag 'html doctype'. (see https://www.ampproject.org/docs/reference/spec#required-markup)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.