Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update starter to use app router #78

Merged
merged 9 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FLOTIQ_API_URL=https://api.flotiq.com
NEXT_PUBLIC_FLOTIQ_API_URL=https://api.flotiq.com
FLOTIQ_API_KEY=
NEXT_PUBLIC_GA_ID=123
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

64 changes: 0 additions & 64 deletions .eslintrc.js

This file was deleted.

26 changes: 1 addition & 25 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"next"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
}
"extends": "next/core-web-vitals"
}
1 change: 0 additions & 1 deletion .flotiq/.env.dist

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run: yarn build
env:
FLOTIQ_API_KEY: ${{ secrets.FLOTIQ_API_KEY }}
FLOTIQ_API_URL: ${{ secrets.FLOTIQ_API_URL }}
NEXT_PUBLIC_FLOTIQ_API_URL: ${{ secrets.NEXT_PUBLIC_FLOTIQ_API_URL }}
dependabot:
needs: test-build
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
- run: yarn build
env:
FLOTIQ_API_KEY: ${{ secrets.FLOTIQ_API_KEY }}
FLOTIQ_API_URL: ${{ secrets.FLOTIQ_API_URL }}
NEXT_PUBLIC_FLOTIQ_API_URL: ${{ secrets.NEXT_PUBLIC_FLOTIQ_API_URL }}

12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage
Expand All @@ -25,14 +26,15 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# IDE
.idea
.vscode
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"endOfLine": "lf",
"semi": false,
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Next JS starter for blog with Flotiq source
Kick off your project with this blog boilerplate. This starter ships with the main Next JS configuration files you might need to get up and running blazing fast with the blazing fast app generator for React.
Check our live demo: [https://flotiq-nextjs-blog-1.netlify.app](https://flotiq-nextjs-blog-1.netlify.app)

On the main branch, you can see a project based on the Next.js app router. This setup leverages the latest routing capabilities provided by Next.js, offering improved performance and flexibility. On the `page-router` branch, there is a starter that uses an older version of routing, specifically the page router. This version might be more familiar to those who have worked with previous iterations of Next.js.

## Quick start

1. **Start the project from template using npx**
Expand Down
19 changes: 0 additions & 19 deletions components/blog-post/BlogPostMetaDetails.js

This file was deleted.

41 changes: 0 additions & 41 deletions components/blog-post/BlogPostNavigation.js

This file was deleted.

18 changes: 0 additions & 18 deletions components/blog-post/BlogPostTags.js

This file was deleted.

7 changes: 7 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
20 changes: 0 additions & 20 deletions layouts/layout.js

This file was deleted.

13 changes: 0 additions & 13 deletions lib/config.js

This file was deleted.

13 changes: 0 additions & 13 deletions lib/flotiqImage.js

This file was deleted.

17 changes: 0 additions & 17 deletions lib/gtag.js

This file was deleted.

2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[template.environment]
FLOTIQ_API_URL="https://api.flotiq.com"
NEXT_PUBLIC_FLOTIQ_API_URL="https://api.flotiq.com"
FLOTIQ_API_KEY="YOUR FLOTIQ API KEY"
31 changes: 0 additions & 31 deletions next.config.js

This file was deleted.

16 changes: 16 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['flotiq-components-react'],
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'api.flotiq.com',
port: '',
pathname: '/image/**',
},
],
},
};

export default nextConfig;
Loading
Loading