import dotenv from 'dotenv' import config from '../nuxt.config.js' import { hasStory, getStoryEndpoint } from '../helpers/app-derived.js' import { makeLastUpdatedFriendly } from '../helpers/parse-date' // import VideoRow from '../components-eleventy/video/row.js' // import VideoRow from '../components-eleventy/video/row.js' // import { isVideo } from '../helpers/app-derived' // Setup dotenv dotenv.config() export const makeTitle = function ( app ) { return `${app.name} on Apple Silicon and Apple M1 - ${ config.head.title }` } export const makeDescription = function ( app ) { return `Reported status of ${ app.name } on Apple Silicon and the new Apple Macs. ` } function makeFullUrlFromPath ( path ) { return `${process.env.URL}${path}` } // https://stackoverflow.com/a/34015511/1397641 function makeJsonLdDate ( dateObject ) { return dateObject.toLocaleDateString('en-US') } function makeJsonLdObject ( data ) { const { page, app } = data const fullUrl = makeFullUrlFromPath( page.url ) // console.log('app', app.payload.app ) return { "@context": "https://schema.org", "@type": "BlogPosting", "mainEntityOfPage": { "@type": "WebPage", "@id": fullUrl }, "headline": data.mainHeading, "description": data.description, // "datePublished": makeJsonLdDate( new Date( app.payload.app.lastUpdated.raw ) ), "dateModified": makeJsonLdDate( new Date( app.payload.app.lastUpdated.raw ) ), "author":{ "@type": "Organization", "name": "Does It ARM" }, "publisher":{ "@type": "Organization", "name": "Does It ARM", "logo": { "@type": "ImageObject", "url": "/images/mark.png", "width": 100, "height": 100 } } } } function makeBookend () { return { "bookendVersion": "v1.0", "shareProviders": [ "system", "email", "twitter", "sms" ], "components": [ { "type": "cta-link", "links": [ { "text": "Search Other Apps", "url": "doesitarm.com" }, { "text": "Get App Updates", "url": "doesitarm.com/embed-subscribe" } ] } ] } } const bookendJson = JSON.stringify( makeBookend() ) export class Story { // or `async data() {` // or `get data() {` data () { return { // layout: 'default.11ty.js', pagination: { data: 'eleventy-endpoints', size: 1, alias: 'app', before: function( data ) { return data.filter( entry => { // const appType = getAppType( entry.payload.app ) return hasStory ( entry.payload.app ) && entry.route === getStoryEndpoint( entry.payload.app ) }) } }, eleventyComputed: { title: ({ app: { payload: { app } } }) => { // console.log('data', data) return makeTitle( app ) }, description: ({ app: { payload: { app } } }) => { return makeDescription( app ) }, mainHeading: ({ app: { payload: { app } } }) => { return `Does ${ app.name } work on Apple Silicon?` }, }, permalink: ({ app }) => { // console.log('payload', app.route) return app.route//.substring(1) + '/story/' } } } render( data ) { // const { app: { payload: { app } } } = data const { // content, title = null, app: { payload: { app } } } = data const pageTitle = title || this.getNuxt().head.title // console.log('video.payload', Object.keys(video.payload)) const lastUpdatedFriendly = makeLastUpdatedFriendly( app.lastUpdated ) const jsonLd = JSON.stringify( makeJsonLdObject( data ) ) return /* html */` ${ pageTitle }

Ack has  been reported to support Apple Silicon nativelty as of Oct 31st, 2020!

ack has will support Apple Silicon and take full advantage of new higher perfomance Macs. 

This will apply to ack version 3.0.2 and newer 

The best therapist has fur and four legs

` } } module.exports = Story