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

sanity #10

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
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
16 changes: 0 additions & 16 deletions .babelrc

This file was deleted.

8 changes: 7 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
contentfulPreviewGraphQLUrl=""
contentfulGraphQLUrl=""
SENDINBLUE_API_KEY=""
SENDINBLUE_API_KEY=""

# Created by Vercel CLI
NEXT_PUBLIC_SANITY_DATASET=""
SANITY_STUDIO_API_DATASET=""
NEXT_PUBLIC_SANITY_PROJECT_ID=""
SANITY_STUDIO_API_PROJECT_ID=""
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ yarn-error.log*

# local env files
.env.local
.env
.env.development.local
.env.test.local
.env.production.local
Expand All @@ -34,4 +35,5 @@ yarn-error.log*
.vercel

public/sitemap.xml
public/robots.txt
public/robots.txt
public/studio
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ https://www.bvrpersonaltraining.com/algemene-voorwaarden-verkoopsbeleid
Homepage:

- 2 Secties: Dieten en Training

- Data editting beter maken
- Vriendelijke 404 page?
- SEO Editing support
- Navlinks rerouting?
- Terms & Conditions page + link from tarieven
14 changes: 4 additions & 10 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
module.exports = {
collectCoverageFrom: [
'**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
],
testEnvironment: 'jsdom',
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts', '!**/node_modules/**'],
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
testPathIgnorePatterns: ['/node_modules/', '/.next/', '/.vercel/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
},
transformIgnorePatterns: [
'/node_modules/',
'^.+\\.module\\.(css|sass|scss)$',
],
transformIgnorePatterns: ['/node_modules/', '^.+\\.module\\.(css|sass|scss)$'],
moduleNameMapper: {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
},
}
};
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"packages": ["studio"],
"version": "0.0.0",
"npmClientArgs": ["--legacy-peer-deps"]
}
60 changes: 51 additions & 9 deletions next-seo.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,69 @@
{
"title": "Brent DW - Styrkr",
"titleTemplate": "%s | Brent DW",
"description": "Fitness Coach Brent DW",
"title": "Styrkr - Personal Coaching",
"titleTemplate": "%s | Styrkr",
"defaultTitle": "Styrkr - Personal Coaching",
"description": "Gepersonaliseerde voedings- en trainingsplannen, begeleiding, training programs en online coaching. Ontworpen speciaal voor jou door Styrkr.",
"favicon": "/favicon.ico",
"additionalMetaTags": [
{ "property": "author", "content": "Brent De Wolf" },
{
"property": "keywords",
"content": ""
"name": "msapplication-TileColor",
"content": "#2b5797"
},
{
"name": "theme-color",
"content": "#333333"
}
],
"additionalLinkTags": [
{
"rel": "icon",
"type": "image/png",
"href": "/favicon-16x16.png",
"sizes": "16x16"
},
{
"rel": "icon",
"type": "image/png",
"href": "/favicon-32x32.png",
"sizes": "32x32"
},
{
"rel": "apple-touch-icon",
"href": "/apple-touch-icon.png",
"sizes": "180x180"
},
{
"rel": "mask-icon",
"href": "/safari-pinned-tab.svg",
"color": "#333333"
},
{
"rel": "manifest",
"href": "/site.webmanifest"
}
],
"openGraph": {
"locale": "nl_BE",
"type": "website",
"site_name": "Brent DW - Styrkr",
"site_name": "Styrkr - Personal Coaching",
"url": "https://styrkr-staging.vercel.app",
"title": "Styrkr - Personal Coaching",
"description": "Gepersonaliseerde voedings- en trainingsplannen, begeleiding, training programs en online coaching. Ontworpen speciaal voor jou door Styrkr.",
"profile": {
"firstName": "Brent"
"firstName": "Brent",
"lastName": "De Wolf"
},
"images": [
{
"url": "/images/og.jpg",
"url": "https://styrkr-staging.vercel.app/images/styrkr-logo.jpg",
"width": 1280,
"height": 720
"height": 720,
"alt": "Bedrijfslogo Styrkr"
}
]
},
"twitter": {
"cardType": "summary_large_image"
}
}
4 changes: 3 additions & 1 deletion next-sitemap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
require('dotenv-flow').config();

//TODO change back to
// siteUrl: `https://styrkr.be`,
module.exports = {
siteUrl: `https://styrkr.be`,
siteUrl: `https://styrkr-staging.vercel.app`,
changefreq: 'daily',
priority: 0.7,
sitemapSize: 5000,
Expand Down
24 changes: 13 additions & 11 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});

// TODO: fetch navLinks from sanity, setup rewrites for baseUrl -> url.

const STUDIO_REWRITE = {
source: '/studio/:path*',
destination: process.env.NODE_ENV === 'development' ? 'http://localhost:3333/studio/:path*' : '/studio/index.html',
};

const nextConfig = {
reactStrictMode: true,

experimental: { optimizeCss: true },
future: {
webpack5: true,
},
experimental: { optimizeCss: process.env.NODE_ENV === 'production', modern: true, polyfillsOptimization: true },
images: {
domains: ['tailwindui.com', 'images.unsplash.com', 'images.ctfassets.net'],
domains: ['tailwindui.com', 'images.unsplash.com', 'images.ctfassets.net', 'cdn.sanity.io'],
},
async headers() {
return [
Expand All @@ -25,17 +34,10 @@ const nextConfig = {
},
];
},
rewrites: () => [STUDIO_REWRITE],
async redirects() {
return [];
},
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.node = { fs: 'empty' };
}

return config;
},
};

module.exports = withPlugins([[withBundleAnalyzer], [withPreact]], nextConfig);
109 changes: 57 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,78 @@
{
"name": "next-typescript-tailwind-mdx-starter",
"name": "styrk-website",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "NODE_ENV=production next build",
"postbuild": "NODE_ENV=production next-sitemap",
"start": "next start",
"test": "jest --watch"
"start": "vercel dev",
"dev": "concurrently \"next dev --port $PORT\" \"cd studio && sanity start\"",
"build": "echo 'Building Sanity to public/studio…' && cd studio && sanity build ../public/studio -y && cd .. && next build",
"postbuild": "next-sitemap",
"postinstall": "lerna bootstrap",
"test": "jest --watch",
"prepare": "husky install"
},
"dependencies": {
"@headlessui/react": "^0.3.1",
"@next/bundle-analyzer": "^10.0.8",
"@headlessui/react": "^1.2.0",
"@sanity/block-content-to-react": "^3.0.0",
"@sanity/client": "^2.11.0",
"@sanity/image-url": "^0.140.22",
"clsx": "^1.1.1",
"graphql": "^15.5.0",
"next": "^10.0.8",
"next-plugin-preact": "^3.0.3",
"next-seo": "^4.20.0",
"next-sitemap": "^1.5.14",
"preact": "^10.5.12",
"preact-render-to-string": "^5.1.14",
"react": "npm:@preact/compat",
"react-dom": "npm:@preact/compat",
"react-hook-form": "^6.15.4",
"react-ssr-prepass": "npm:preact-ssr-prepass",
"sib-api-v3-typescript": "^2.2.0",
"urql": "^2.0.1"
"next": "^10.2.3",
"next-plugin-preact": "^3.0.6",
"next-sanity": "^0.2.0",
"next-seo": "^4.24.0",
"next-sitemap": "^1.6.108",
"preact": "^10.5.13",
"preact-render-to-string": "^5.1.19",
"react": "npm:@preact/[email protected]",
"react-dom": "npm:@preact/[email protected]",
"react-ssr-prepass": "npm:[email protected]",
"sib-api-v3-typescript": "^2.2.1"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"@babel/plugin-transform-react-jsx": "^7.12.17",
"@tailwindcss/aspect-ratio": "^0.2.0",
"@tailwindcss/forms": "^0.2.1",
"@tailwindcss/typography": "^0.4.0",
"@testing-library/jest-dom": "^5.11.9",
"@babel/core": "^7.14.5",
"@babel/plugin-transform-react-jsx": "^7.14.5",
"@next/bundle-analyzer": "^10.2.3",
"@sanity/cli": "^2.11.0",
"@tailwindcss/aspect-ratio": "^0.2.1",
"@tailwindcss/forms": "^0.3.3",
"@tailwindcss/typography": "^0.4.1",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/preact": "^2.0.1",
"@types/node": "^14.14.32",
"@types/react": "^17.0.3",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"autoprefixer": "^10.2.5",
"@types/node": "^15.12.2",
"@types/react": "^17.0.11",
"@typescript-eslint/eslint-plugin": "^4.26.1",
"@typescript-eslint/parser": "^4.26.1",
"autoprefixer": "^10.2.6",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"babel-plugin-macros": "^3.0.1",
"babel-jest": "^27.0.2",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-module-resolver": "^4.1.0",
"critters": "^0.0.8",
"concurrently": "^6.2.0",
"critters": "^0.0.10",
"dotenv-flow": "^3.2.0",
"eslint": "^7.21.0",
"eslint": "^7.28.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.3.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-flowtype": "^5.7.2",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^4.3.8",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"husky": "^6.0.0",
"jest": "^27.0.4",
"lerna": "^4.0.0",
"lint-staged": "^11.0.0",
"next-compose-plugins": "^2.2.1",
"postcss": "^8.2.7",
"prettier": "^2.2.1",
"react-test-renderer": "^17.0.1",
"tailwindcss": "^2.0.3",
"typescript": "^4.2.3"
"postcss": "^8.3.2",
"prettier": "^2.3.1",
"react-test-renderer": "^17.0.2",
"tailwindcss": "^2.1.4",
"typescript": "^4.3.2",
"webpack": "^5.38.1"
},
"eslintConfig": {
"extends": "react-app"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,json,md}": [
"prettier --write"
Expand All @@ -88,5 +90,8 @@
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false
},
"volta": {
"node": "16.2.0"
}
}
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#2b5797</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
Binary file added public/images/brent.webp
Binary file not shown.
Binary file added public/images/styrkr-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading