Git Product home page Git Product logo

nextjs-developer-portfolio's Introduction

Developer Portfolio built with Next.js and Cosmic

Screenshot of the Cosmic Developer Porfolio application template

To build this app, we’re going to use the following technologies:

  • Next.js - A React framework for production that makes it easy to spin up a full-stack application.
  • Cosmic - A Headless CMS enables the independence of the data (content) layer and gives us the ability to quickly manage template content.
  • Tailwind CSS - A performant utility-first CSS framework that can be composed directly in your markup.

Links

Getting started

Environment Variables

You'll need to create an .env file in the root of the project. Log in to Cosmic and from Bucket Settings > API Access take the following values:

//.env
COSMIC_BUCKET_SLUG=your_cosmic_slug
COSMIC_READ_KEY=your_cosmic_read_key
COSMIC_PREVIEW_SECRET=your_preview_secret

Install the dependencies by running one of the following commands:

pnpm install
# or
yarn
# or
npm install

Then run the development server:

pnpm dev
# or
yarn dev
# or
npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

Previewing Unpublished Content

This template supports Next.js Draft Mode, allowing you to preview unpublished blog posts and works pages from the Cosmic dashboard.

Setup in the codebase

To enable preview mode, you'll need to set the COSMIC_PREVIEW_SECRET environment variable in your .env file. This secret can be any random string, though we recommend creating a secure string for security reasons.

Setup in Cosmic

*Note that this template currently supports Draft Mode for Posts and Works Object types.

In your Cosmic dashboard, go to your Content and select Posts or Works from the list of Object types. Next, select Object type settings > Additional settings.

Start by copying and pasting this URL into the Preview link field:

https://YOUR_LOCAL_OR_PROD_HOST/api/draft?secret=YOUR_SECRET_PREVIEW_KEY&path=OBJECT_TYPE_PATH&slug=[object_slug]

Replace YOUR_LOCAL_OR_PROD_HOST with your local host (e.g. http://localhost:3000) or production host (e.g. https://your-app.vercel.app), and replace YOUR_SECRET_PREVIEW_KEY with the secret you set in your .env file. Match the OBJECT_TYPE_PATH to the Object type you're editing (e.g. posts or works).

From here, you can now preview unpublished content from the Cosmic dashboard by clicking the Preview button in the righthand sidebar when editing an individual Object.

Deploy on Vercel

Use the following button to deploy to Vercel. You will need to add API accesss keys as environment variables. Find these in Bucket Settings > API Access.

Check out our Next.js deployment documentation for more details.

Your feedback and contributions are welcome!

nextjs-developer-portfolio's People

Contributors

stefkudla avatar tonyspiro avatar

Stargazers

 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

nextjs-developer-portfolio's Issues

/about is broken by default

Hey team, thanks for awesome product. While I was trying this repo, I've found out that the /about is not working. I have forked the project and fixed it. Also, I have done couple of refactoring and would like to raise the PR to fix this. You can see my fork here 🔗

Changes that I have done in my fork:
1- Have created new DeveloperAvatar componen to show animate pulse while it loads image. It improves a bit of user experience for users on slow network.

2- Refactor page.jsx(see change) and about/page.jsx(see change) to improve the readability. (This will fix the screenshot issue as well)

Note: I can deploy on vercel or cloudflare to show the demo or record a loom video if you would like to.

image

Category Filter Issue in /posts and /work Routes

In the /posts and /work routes, the category filter doesn't work as expected, failing to filter the posts correctly.

Screen.Recording.2023-11-08.at.8.25.45.PM.mov

I have not edited anything in cosmic dashboard and GitHub repo :)
Screenshot 2023-11-08 at 8 26 35 PM

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.