Git Product home page Git Product logo

unibit's People

Contributors

benedfit avatar denar90 avatar jugglerx avatar rodikh avatar smnh avatar stackbit-admin avatar vitaliyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

unibit's Issues

Build issue with theme

Hi, when I'm loading my custom theme, I'm getting this error:

Loading site /tmp/38293bf1-7fb2-4c1c-a40b-4261a681b83d
Error loading theme at /tmp/38293bf1-7fb2-4c1c-a40b-4261a681b83d

I can't figure out what's missing.

Request: Pug loader

Pug's syntax is less verbose than Nunjucks and has very similar features. It would be nice if unibit supported themes written using Pug templates.

Error when installing through npm

Issue: Not able to install unibit

When using: $ sudo npm install -g @stackbit/unibit:

npm WARN deprecated @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/usr/local/bin/unibit -> /usr/local/lib/node_modules/@stackbit/unibit/unibit.js

> [email protected] install /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass
> node scripts/install.js

Unable to save binary /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/vendor/linux-x64-64 : { Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/vendor'
    at Object.mkdirSync (fs.js:757:3)
    at sync (/usr/local/lib/node_modules/@stackbit/unibit/node_modules/mkdirp/index.js:72:13)
    at Function.sync (/usr/local/lib/node_modules/@stackbit/unibit/node_modules/mkdirp/index.js:78:24)
    at checkAndDownloadBinary (/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/scripts/install.js:114:11)
    at Object.<anonymous> (/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/scripts/install.js:157:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path:
   '/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/vendor' }

> [email protected] postinstall /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass
> node scripts/build.js

Building: /usr/bin/node /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli   '/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.18
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 10.21.0
gyp verb command install [ '10.21.0' ]
gyp verb install input version string "10.21.0"
gyp verb install installing version: 10.21.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.21.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/.node-gyp"
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '--node_gyp_internal_noretry', '10.21.0' ]
gyp verb install input version string "10.21.0"
gyp verb install installing version: 10.21.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 10.21.0
gyp verb ensuring nodedir is created /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/.node-gyp/10.21.0
gyp WARN install got an error, rolling back install
gyp verb command remove [ '10.21.0' ]
gyp verb remove using node-gyp dir: /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/.node-gyp
gyp verb remove removing target version: 10.21.0
gyp verb remove removing development files for version: 10.21.0
gyp WARN install got an error, rolling back install
gyp verb command remove [ '10.21.0' ]
gyp verb remove using node-gyp dir: /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/.node-gyp
gyp verb remove removing target version: 10.21.0
gyp verb remove removing development files for version: 10.21.0
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass/.node-gyp'
gyp ERR! System Linux 5.7.0-kali1-amd64
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/local/lib/node_modules/@stackbit/unibit/node_modules/node-sass
gyp ERR! node -v v10.21.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/@stackbit/unibit/node_modules/chokidar/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] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall 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!     /root/.npm/_logs/2020-08-03T23_12_46_843Z-debug.log

2020-08-03T23_12_46_843Z-debug.log

Additional Information

My system is a Kali Linux Laptop with x64 architecture; $ uname -a:

Linux nonuser 5.7.0-kali1-amd64 #1 SMP Debian 5.7.6-1kali2 (2020-07-01) x86_64 GNU/Linux

$ npm version:

{ npm: '6.14.6',
  ares: '1.16.1',
  brotli: '1.0.7',
  cldr: '37.0',
  http_parser: '2.9.3',
  icu: '67.1',
  modules: '64',
  napi: '6',
  nghttp2: '1.41.0',
  node: '10.21.0',
  openssl: '1.1.1g',
  tz: '2019c',
  unicode: '13.0',
  uv: '1.38.0',
  v8: '6.8.275.32-node.56',
  zlib: '1.2.11' }

If any more information is needed to take a solution I'll handle it!

Can't install @stackbit/unibit on Mac

I am trying to install @stackbit/unibit on a new MacBook Pro with macOS 10.14.5

I have created a new folder and from inside that folder I do:
sudo npm install -g @stackbit/unibit
It always fails with
EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/fsevents-335b7d19/node_modules/yallist'
ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/@stackbit/unibit/node_modules/atob/bin/atob.js'

I tried this on two different Mac, no deal. Any idea where I should look?

How to add custom Nunjucks Filters

Hello,

Sorry in advanced for my noobishness in this...

I have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was described in Nunjucks documentation..

Could somebody help me to navigate through this?

The custom filter I made is in the file located at /index.js has the following:

var nunjucks = require('nunjucks');
var env = new nunjucks.Environment();
var crypto = require('crypto');

env.addFilter('md5', function(str) {
    return crypto.createHash('md5').update(str).digest("hex");
});

But it is not being picked up by anything..

What i need is the following to work:

{% hash = some_variable | md5 %}

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.