Extension Portaljs Improvements


Extension Basics

Title
Portaljs Improvements
Name
ckanext-portaljs-improvements
Type
Public extension
Description
An extension allowing for On demand Incremental Static Regeneration
CKAN versions
Download-Url (zip)
Last commit
2 years ago (2023-07-14 14:30:14)
Url to repo
Category
Authentication & Security


Background Infos

Description (long)
Show details

ckanext-portaljs-improvements

This extension has one my purpose, to allow the use of On demand Incremental Static Regeneration(On demand ISR) on Portal.JS websites. NextJS has three ways of fetching data, client fetching, ServerSideRendering and StaticSite Generation(SSG).

  • Client fetching allows us to send the skeleton of the page quickly, and then populate it with information using javascript, that has a lot of problems, the SEO get considerably affected, because the google crawlers can’t index the pages easly, there is also the problem of layout shifting, and also the browsers can’t cache the pages easly
  • Serverside rendering, has the advantages of SEO, no layout shifting and a easier time for caching, the problem is that we need to wait for all tha data to be fetched to show something on the screen to the user, depending on the page that could mean a lot of time
  • StaticSite Generation is a little bit different, we build the pages ahead of time, fetch all the data, inject that data into the html, and once the user requests it we just send everything already filled, this makes the page loads super fast and already with all the information needed, the SEO is great, the caching is great, there is no layout shift and perhaps most important, this allows us to use the <Link> tag to its fullest potential, when you have a static page that is linked using a <Link> tag, Next prefetches the html, for instance, if you have a list of 5 dataset pages, as soon the page loads, Next will use the iddle time to fetch everyone of those 5 pages on the background, this basically means app like speed when changing from one page to the next. But if StaticSite Generation is so awesome, why do we use the other two tactics most of the time? Thats because in SSG the pages are only built once when the project is deploy the project, so if someone changes an information after the deploy the only way to update that is by redeploying everything. There is a way in Next to schedule re
Version
Version release date
(not set)
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

To install ckanext-portaljs-improvements:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate

  2. Clone the source and install it on the virtualenv

    git clone https://github.com/datopian/ckanext-portaljs-improvements.git cd ckanext-portaljs-improvements pip install -e . pip install -r requirements.txt

  3. Add portaljs-improvements to the ckan.plugins setting in your CKAN config file (by default the config file is located at `/et

Plugins to configure (ckan.ini)
portaljs_improvements
CKAN Settings (ckan.ini)
DB migration to be executed
(not set)
<< back to Extensions