Render content for all your Jekyll pages as a single JSON endpoint
You have the content of your site stored as Markdown pages, but you want to load each page as structured data. Such as for building a SPA (with React or Vue) or a mobile app.
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| function label_last_sent_message() { | |
| var emailAddress = Session.getEffectiveUser().getEmail(); | |
| Logger.log(emailAddress); | |
| var EMAIL_REGEX = /[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\.\-]+\.[a-z\.A-Z]+/g; | |
| var label = GmailApp.createLabel("LastSentMessage"); | |
| var d = new Date(); | |
| d.setDate(d.getDate() - 7); | |
| var dateString = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate(); | |
| threads = GmailApp.search("in:Sent after:" + dateString); | |
| for (var i = 0; i < threads.length; i++) |
| sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
| sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
| sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).