datopian / datahub

🌀 Rapidly build rich data portals using a modern frontend framework
https://www.portaljs.org
MIT License
2.2k stars 328 forks source link

Add github star button with count to navbar #598

Closed rufuspollock closed 2 years ago

rufuspollock commented 3 years ago

See https://buttons.github.io/

Need to embed into site/components/Nav.js

<!-- Place this tag where you want the button to render. -->
<GitHubButton href="https://github.com/datopian/portal.js" data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="large" data-show-count="true" aria-label="Star datopian/portal.js on GitHub">Star</GitHubButton>
import GitHubButton from 'react-github-btn'
vishal-codes commented 3 years ago

Hey @rufuspollock Can I work on this issue?

rufuspollock commented 3 years ago

@vishal-codes sure! Please go for it!

vishal-codes commented 3 years ago

@rufuspollock I need help with locally running the website. I installed dependencies by using npm i and then entered npm start but the website didn't start on localhost.

rufuspollock commented 3 years ago

Recommend using yarn and I assume you were in the site subdirectory of the repo.

vishal-codes commented 3 years ago

@rufuspollock I ran yarn install then yarn build but still I wasn't able to run the website locally. I m using Ubuntu 20.04 . I need help with this.

rufuspollock commented 3 years ago

Try yarn dev. And paste output.

vishal-codes commented 3 years ago

Screenshot from 2021-09-10 23-44-26 @rufuspollock

rufuspollock commented 3 years ago

Did you cd into the site directory? I don't think so ...

vishal-codes commented 3 years ago

Did you cd into the site directory? I don't think so ...

I m in portal.js Screenshot from 2021-09-10 23-44-26

am I in the wrong directory? If yes then I should be in which directory while running yarn dev @rufuspollock

rufuspollock commented 3 years ago

@vishal-codes you need to move into the site subdirectory of the repo and then run yarn dev

vishal-codes commented 3 years ago

@rufuspollock I made changes but I am facing the following error : Server Error SyntaxError: Cannot use import statement outside a module I tried googling about it but of no avail.