Create a complete blog from scratch in Gatsby with pagination, categories, featured posts, author, SEO and navigation.
Check it out the demo.
📰 This repository is a demo from the article about how to build our own blog using Gatsby.
Home Page: https://danilowoz.com/blog/advanced-blog-system-in-gatsby
License: MIT License
Create a complete blog from scratch in Gatsby with pagination, categories, featured posts, author, SEO and navigation.
Check it out the demo.
OS: ubuntu 18.04
ran npm i
got thee following error
`> [email protected] install /home/vajrang/frugal/frontend/two/gatsby-advanced-blog-system/node_modules/sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.3.1 runtime=node arch=x64 libc= platform=linux)
make: Entering directory '/home/vajrang/frugal/frontend/two/gatsby-advanced-blog-system/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:223,
from ../src/common.cc:24:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBasev8::StringObject::return_t Nan::imp::Factoryv8::StringObject::New(v8::Localv8::String)’:
../../nan/nan_implementation_12_inl.h:356:37: error: no matching function for call to ‘v8::StringObject::New(v8::Localv8::String&)’
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from /home/vajrang/.node-gyp/12.3.1/include/node/node.h:63:0,
from ../src/common.cc:22:
/home/vajrang/.node-gyp/12.3.1/include/node/v8.h:5380:23: note: candidate: static v8::Localv8::Value v8::StringObject::New(v8::Isolate*, v8::Localv8::String)
static Local New(Isolate* isolate, Local value);
^~~
/home/vajrang/.node-gyp/12.3.1/include/node/v8.h:5380:23: note: candidate expects 2 arguments, 1 provided
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:223,
from ../src/common.cc:24:
../../nan/nan_implementation_12_inl.h:356:58: error: expected primary-expression before ‘>’ token
return v8::StringObject::New(value).Asv8::StringObject();
^
../../nan/nan_implementation_12_inl.h:356:60: error: expected primary-expression before ‘)’ token
return v8::StringObject::New(value).Asv8::StringObject();
^
In file included from /usr/include/c++/7/cassert:44:0,
from /home/vajrang/.node-gyp/12.3.1/include/node/node_object_wrap.h:26,
from ../../nan/nan.h:55,
from ../src/common.cc:24:
../../nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../../nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistentv8::Object’ has no member named ‘IsNearDeath’
assert(persistent().IsNearDeath());
^
../../nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfoNan::ObjectWrap&)’:
../../nan/nan_object_wrap.h:127:26: error: ‘class Nan::Persistentv8::Object’ has no member named ‘IsNearDeath’
assert(wrap->handle_.IsNearDeath());
^
In file included from ../src/common.cc:27:0:
../src/common.h: At global scope:
../src/common.h:78:20: error: ‘Handle’ is not a member of ‘v8’
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~~~~~
../src/common.h:78:37: error: expected primary-expression before ‘>’ token
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^
../src/common.h:78:39: error: ‘obj’ was not declared in this scope
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~~
../src/common.h:78:56: error: expected primary-expression before ‘attr’
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~~~
../src/common.h:78:60: error: expression list treated as compound expression in initializer [-fpermissive]
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^
../src/common.h:79:29: error: ‘Handle’ is not a member of ‘v8’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^~~~~~
../src/common.h:79:46: error: expected primary-expression before ‘>’ token
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^
../src/common.h:79:48: error: ‘obj’ was not declared in this scope
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^~~
../src/common.h:79:65: error: expected primary-expression before ‘attr’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^~~~
../src/common.h:80:38: error: ‘Handle’ is not a member of ‘v8’
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr);
^~~~~~
../src/common.h:80:55: error: expected primary-expression before ‘>’ token
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr);
^
../src/common.h:80:57: error: ‘obj’ was not declared in this scope
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr);
^~~
../src/common.h:80:74: error: expected primary-expression before ‘attr’
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr);
^~~~
../src/common.h:81:48: error: ‘Handle’ is not a member of ‘v8’
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.h:81:65: error: expected primary-expression before ‘>’ token
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:81:67: error: ‘obj’ was not declared in this scope
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^~~
../src/common.h:81:84: error: expected primary-expression before ‘attr’
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^~~~
../src/common.h:81:37: warning: variable templates only available with -std=c++14 or -std=gnu++14
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.h:81:90: error: expected ‘;’ before ‘{’ token
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:84:37: error: ‘Handle’ is not a member of ‘v8’
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.h:84:54: error: expected primary-expression before ‘>’ token
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:84:56: error: ‘obj’ was not declared in this scope
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^~~
../src/common.h:84:73: error: expected primary-expression before ‘attr’
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^~~~
../src/common.h:84:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.h:84:79: error: expected ‘;’ before ‘{’ token
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:87:37: error: ‘Handle’ is not a member of ‘v8’
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^~~~~~
../src/common.h:87:54: error: expected primary-expression before ‘>’ token
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^
../src/common.h:87:56: error: ‘obj’ was not declared in this scope
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^~~
../src/common.h:87:61: error: expected primary-expression before ‘int’
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^~~
../src/common.h:84:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.h:87:71: error: expected ‘;’ before ‘{’ token
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^
../src/common.h:93:9: error: ‘Handle’ is not a member of ‘v8’
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist);
^~~~~~
../src/common.h:93:26: error: expected primary-expression before ‘>’ token
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist);
^
../src/common.h:93:28: error: ‘input’ was not declared in this scope
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist);
^~~~~
../src/common.h:93:28: note: suggested alternative: ‘ino_t’
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist);
^~~~~
ino_t
../src/common.h:93:70: error: expected primary-expression before ‘&’ token
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist);
^
../src/common.h:93:71: error: ‘buffersToPersist’ was not declared in this scope
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist);
^~~~~~~~~~~~~~~~
../src/common.h:93:87: error: expression list treated as compound expression in initializer [-fpermissive]
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist);
^
../src/common.cc:34:20: error: redefinition of ‘bool sharp::HasAttr’
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:78:8: note: ‘bool sharp::HasAttr’ previously defined here
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~~~~~~
../src/common.cc:34:20: error: ‘Handle’ is not a member of ‘v8’
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.cc:34:37: error: expected primary-expression before ‘>’ token
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.cc:34:39: error: ‘obj’ was not declared in this scope
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~~
../src/common.cc:34:56: error: expected primary-expression before ‘attr’
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~~~
../src/common.cc:37:29: error: redefinition of ‘std::string sharp::AttrAsStr’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:79:15: note: ‘std::string sharp::AttrAsStr’ previously declared here
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^~~~~~~~~
../src/common.cc:37:29: error: ‘Handle’ is not a member of ‘v8’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.cc:37:46: error: expected primary-expression before ‘>’ token
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.cc:37:48: error: ‘obj’ was not declared in this scope
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^~~
../src/common.cc:37:65: error: expected primary-expression before ‘attr’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^~~~
../src/common.cc:40:38: error: redefinition of ‘std::vector sharp::AttrAsRgba’
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:80:23: note: ‘std::vector sharp::AttrAsRgba’ previously declared here
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr);
^~~~~~~~~~
../src/common.cc:40:38: error: ‘Handle’ is not a member of ‘v8’
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr) {
^~~~~~
../src/common.cc:40:55: error: expected primary-expression before ‘>’ token
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.cc:40:57: error: ‘obj’ was not declared in this scope
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr) {
^~~
../src/common.cc:40:74: error: expected primary-expression before ‘attr’
std::vector AttrAsRgba(v8::Handlev8::Object obj, std::string attr) {
^~~~
../src/common.cc:51:9: error: redefinition of ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist
^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:92:20: note: ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’ previously defined here
InputDescriptor* CreateInputDescriptor(
^~~~~~~~~~~~~~~~~~~~~
../src/common.cc:51:9: error: ‘Handle’ is not a member of ‘v8’
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist
^~~~~~
../src/common.cc:51:26: error: expected primary-expression before ‘>’ token
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist
^
../src/common.cc:51:28: error: ‘input’ was not declared in this scope
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist
^~~~~
../src/common.cc:51:28: note: suggested alternative: ‘ino_t’
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist
^~~~~
ino_t
../src/common.cc:51:70: error: expected primary-expression before ‘&’ token
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist
^
../src/common.cc:51:71: error: ‘buffersToPersist’ was not declared in this scope
v8::Handlev8::Object input, std::vector<v8::Localv8::Object> &buffersToPersist
^~~~~~~~~~~~~~~~
cc1plus: warning: unrecognized command line option ‘-Wno-cast-function-type’
sharp.target.mk:134: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/home/vajrang/frugal/frontend/two/gatsby-advanced-blog-system/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.18.0-20-generic
gyp ERR! command "/home/linuxbrew/.linuxbrew/Cellar/node/12.3.1/bin/node" "/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vajrang/frugal/frontend/two/gatsby-advanced-blog-system/node_modules/sharp
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vajrang/.npm/_logs/2019-06-07T09_43_16_035Z-debug.log`
I think the blog-list.js must be inside the folder /pages/blog
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.