![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@last-rev/adapter-contentful
Advanced tools
Transforms data from contentful's structure to one which is expected by LastRev components
Converts contentful data shape to one that is expected by LastRev components.
import Adapter from '@last-rev/adapter-contentful';
import config from './adapter-config';
import contentful from './contentfulApi';
const transform = Adapter(config);
export default async () => {
return transform(contentful.getGlobalSettings());
};
Confifg allows one to override specific field names for parsing URLs:
// defaults
{
urlMap = {},
linkContentType = 'elementLink',
sameWindowActionText = 'Open in the same window',
newWindowActionText = 'Open in a new window',
modalActionText = 'Open in a modal',
downloadActionText = 'Download',
manualEntryTypeText = 'Manual text entry',
contentRefTypeText = 'Content reference',
assetRefTypeText = 'Asset reference',
contentUrlLookup = {}
skipContentTypes = []
}
// example:
{
"urlMap": {
"pageGeneral": {
"url": "/[key]", // alweays use "key" for the slug here
"key": "slug" // this is what the next.js dynamic routing framework
// expects the param to be called
},
"pageRecipe": {
"url": "/recipes/[key]",
"key": "slug"
}
},
"linkContentType": "ElementCta"
}
The preferred method to generate the correct _href
and _as
properties for the content items is to pass in a contentUrlLookup property which maps a contentID to an object like this { href: '...whatever', as: '...whatever' }
. If this cannot be done, the old urlMap method is still supported.
If for whatever reason we do not want to traverse items of a specific content type, just pass those content type IDs into the skipContentTypes
array.
FAQs
Transforms data from contentful's structure to one which is expected by LastRev components
We found that @last-rev/adapter-contentful demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.