mirror of
https://github.com/kremalicious/blog.git
synced 2024-12-22 17:23:50 +01:00
formatting
This commit is contained in:
parent
8385013eaa
commit
0576e4f662
@ -40,7 +40,7 @@ It is still not as fast as we would like it to be, and we will continue to make
|
|||||||
|
|
||||||
## 🔥 Burner Wallets: Commons Without Any Setup
|
## 🔥 Burner Wallets: Commons Without Any Setup
|
||||||
|
|
||||||
Since the launch of Commons, a Web3-capable browser with a wallet setup was required before full functionality became available. Without a wallet, and without a Web3-capable browser, the search feature *was *possible, but publishing or downloading data sets were not, because those processes require a cryptographic signing process — something which can only be done with a Web3 wallet.
|
Since the launch of Commons, a Web3-capable browser with a wallet setup was required before full functionality became available. Without a wallet, and without a Web3-capable browser, the search feature _was_ possible, but publishing or downloading data sets were not, because those processes require a cryptographic signing process — something which can only be done with a Web3 wallet.
|
||||||
|
|
||||||
We found this to be one of the main pain points users had when interacting with a marketplace providing free and publicly available data. Using the right browser, relying on a browser plugin, setting up a wallet, possibly managing crypto tokens, and connecting to the right network proved to be tricky for the target groups we’d like to have using Ocean.
|
We found this to be one of the main pain points users had when interacting with a marketplace providing free and publicly available data. Using the right browser, relying on a browser plugin, setting up a wallet, possibly managing crypto tokens, and connecting to the right network proved to be tricky for the target groups we’d like to have using Ocean.
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ exports.generatePostPages = (createPage, posts) => {
|
|||||||
const postTemplate = path.resolve('src/components/templates/Post/index.tsx')
|
const postTemplate = path.resolve('src/components/templates/Post/index.tsx')
|
||||||
|
|
||||||
// Create Post pages
|
// Create Post pages
|
||||||
posts.forEach(post => {
|
posts.forEach((post) => {
|
||||||
createPage({
|
createPage({
|
||||||
path: `${post.node.fields.slug}`,
|
path: `${post.node.fields.slug}`,
|
||||||
component: postTemplate,
|
component: postTemplate,
|
||||||
@ -103,7 +103,7 @@ exports.generateTagPages = (createPage, tags) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.generateRedirectPages = createRedirect => {
|
exports.generateRedirectPages = (createRedirect) => {
|
||||||
redirects.forEach(({ f, t }) => {
|
redirects.forEach(({ f, t }) => {
|
||||||
createRedirect({
|
createRedirect({
|
||||||
fromPath: f,
|
fromPath: f,
|
||||||
|
@ -4,7 +4,7 @@ const path = require('path')
|
|||||||
const { siteUrl, siteTitle, siteDescription, author } = require('../config')
|
const { siteUrl, siteTitle, siteDescription, author } = require('../config')
|
||||||
const writeFile = util.promisify(fs.writeFile)
|
const writeFile = util.promisify(fs.writeFile)
|
||||||
|
|
||||||
const feedContent = edge => {
|
const feedContent = (edge) => {
|
||||||
const { image } = edge.node.frontmatter
|
const { image } = edge.node.frontmatter
|
||||||
const { html } = edge.node
|
const { html } = edge.node
|
||||||
const footer =
|
const footer =
|
||||||
@ -16,7 +16,7 @@ const feedContent = edge => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function jsonItems(posts) {
|
async function jsonItems(posts) {
|
||||||
return await posts.map(edge => {
|
return await posts.map((edge) => {
|
||||||
const { frontmatter, fields, excerpt } = edge.node
|
const { frontmatter, fields, excerpt } = edge.node
|
||||||
const { slug, date } = fields
|
const { slug, date } = fields
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ async function jsonItems(posts) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const createJsonFeed = posts => ({
|
const createJsonFeed = (posts) => ({
|
||||||
version: 'https://jsonfeed.org/version/1',
|
version: 'https://jsonfeed.org/version/1',
|
||||||
title: siteTitle,
|
title: siteTitle,
|
||||||
description: siteDescription,
|
description: siteDescription,
|
||||||
@ -52,12 +52,12 @@ const createJsonFeed = posts => ({
|
|||||||
items: jsonItems(posts)
|
items: jsonItems(posts)
|
||||||
})
|
})
|
||||||
|
|
||||||
const generateJsonFeed = async posts => {
|
const generateJsonFeed = async (posts) => {
|
||||||
await writeFile(
|
await writeFile(
|
||||||
path.join('./public', 'feed.json'),
|
path.join('./public', 'feed.json'),
|
||||||
JSON.stringify(createJsonFeed(posts)),
|
JSON.stringify(createJsonFeed(posts)),
|
||||||
'utf8'
|
'utf8'
|
||||||
).catch(err => {
|
).catch((err) => {
|
||||||
throw Error('\nFailed to write JSON Feed file: ', err)
|
throw Error('\nFailed to write JSON Feed file: ', err)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx .",
|
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx .",
|
||||||
"lint:css": "stylelint 'src/**/*.{css,scss}'",
|
"lint:css": "stylelint 'src/**/*.{css,scss}'",
|
||||||
"lint:md": "markdownlint './**/*.{md,markdown}' --ignore './{node_modules,public,.cache,.git,coverage}/**/*'",
|
"lint:md": "markdownlint './**/*.{md,markdown}' --ignore './{node_modules,public,.cache,.git,coverage}/**/*'",
|
||||||
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json,css,scss}'",
|
"format": "prettier --ignore-path .gitignore --write '**/*.{js,jsx,ts,tsx,md,json,css,scss}'",
|
||||||
"tsc": "tsc --noEmit",
|
"tsc": "tsc --noEmit",
|
||||||
"deploy": "./scripts/deploy.sh",
|
"deploy": "./scripts/deploy.sh",
|
||||||
"new": "babel-node ./scripts/new.js"
|
"new": "babel-node ./scripts/new.js"
|
||||||
|
@ -80,12 +80,12 @@ async function createPhotoPost() {
|
|||||||
.join(description)
|
.join(description)
|
||||||
|
|
||||||
// copy photo file in place
|
// copy photo file in place
|
||||||
fs.copyFile(photo, `${photosPath}/${fileName}.jpg`, err => {
|
fs.copyFile(photo, `${photosPath}/${fileName}.jpg`, (err) => {
|
||||||
if (err) spinner.fail(`Error copying photo file: ${err}`)
|
if (err) spinner.fail(`Error copying photo file: ${err}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
// create photo post file
|
// create photo post file
|
||||||
fs.appendFile(postPhoto, newContentsPhoto, err => {
|
fs.appendFile(postPhoto, newContentsPhoto, (err) => {
|
||||||
if (err) spinner.fail(`Error creating photo post: ${err}`)
|
if (err) spinner.fail(`Error creating photo post: ${err}`)
|
||||||
spinner.succeed(`New photo post '${title}' as '${fileName}.md' created.`)
|
spinner.succeed(`New photo post '${title}' as '${fileName}.md' created.`)
|
||||||
})
|
})
|
||||||
@ -115,5 +115,5 @@ if (isPhoto) {
|
|||||||
fs.outputFile(file, newContents)
|
fs.outputFile(file, newContents)
|
||||||
.then(() => fs.readFile(file, 'utf8'))
|
.then(() => fs.readFile(file, 'utf8'))
|
||||||
.then(() => spinner.succeed(`New post '${title}' created.`))
|
.then(() => spinner.succeed(`New post '${title}' created.`))
|
||||||
.catch(err => spinner.fail(`Error creating post: ${err}`))
|
.catch((err) => spinner.fail(`Error creating post: ${err}`))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user