IDEMSInternational / molo-iogt

IoGT Frontend Site for Molo
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Assess the use of existing library to implement Google OneBox #11

Open isedwards opened 4 years ago

isedwards commented 4 years ago

@nathanbaleeta wrote:

In response to 1.2.5, wagtail-schema.org library seems to be a ready solution out of the box to help standardize IoGT content as structured data for search engines like Google, Microsoft, Yahoo, Yandex etc to understand the semantics. It also provides JSON-LD tags for Wagtail sites which are consistent with Schema.org.

But it doesn't seem to offer a feature that can be enabled in the backend to allow content managers in the rich text editors to identify a mark-up for How-To, FAQ, and Video etc.

Therefore wagtail-schema.org assumes all the customization (basically embedding tags in templates) is handled by the developers leaving no room for manipulation by the content managers.

If the business requirement demands the content managers have to identify the JSON-LD tags for IoGT content on a rolling basis, then wagtail-schema.org may not fit the purpose, however if content managers can pre-determine the content which needs structuring and then let the developers do the heavy lifting, then this tool could suffice for this use case.

In response to 1.2.4, here is a great tool by Google for validating whether our JSON-LD tags in IoGT are working well: https://search.google.com/test/rich-results

PS: It may also be helpful to eventually follow and monitor how IoGT structured data is being used using Google search console.

More helpful resources: https://jsonld.com/

isedwards commented 4 years ago

I think wagtail-schema.org is the way to go. We should aim to get a working branch that demonstrates the out-of-the-box capabilities that it adds and then decide how to give content managers direct access to the capabilities (assuming they cannot use the provided template tags?).

Both releases of wagtail-schema.org on GitHub require wagtail 2.0, so we need to update to molo.core 8.0.0 before we can add this dependency.

@nathanbaleeta - Suggested steps:

Then, based on @michaelzhang608's work on dependencies, we then need to make the following changes to requirements.txt:

nathanbaleeta commented 4 years ago

Found release molo.commenting==8.0.1 to be compatible with molo.core<9.0.0,>=8.0.0

Hint: https://pypi.org/project/molo.commenting/8.0.1/

isedwards commented 4 years ago

Is it working as expected? Can you give us an example of adding the extra information required by Google OneBox and how that is then rendered in the page?

nathanbaleeta commented 4 years ago

The installation part using the updated requirements.txt worked when I used pip3 version though with some warnings which could be addressed maybe in the near future. Below is a snapshot of the warnings to keep in the know:

warnings

However disabling molo.usermetadata dependency seems to cause other unprecedented bugs hence may not be able to verify whether the molo related updates are working as expected until this bug is resolved.

As you suggested, it would be good to create a separate issue to investigate this further. @isedwards

Below is the error it shows: ImportError: cannot import name 'urlresolvers' from 'django.core'

Stackoverflow gives some clue but still trying to figure out where to make the changes since what seems to be affected is a 3rd party library(django_comments) and not necessarily iogt code.