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

[examples] Add Tina CMS blog starter #35045

Merged
merged 11 commits into from Mar 5, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion examples/blog-starter/components/avatar.js
@@ -1,7 +1,14 @@
import Image from 'next/image'
export default function Avatar({ name, picture }) {
return (
<div className="flex items-center">
<img src={picture} className="w-12 h-12 rounded-full mr-4" alt={name} />
<Image
src={picture}
width={48}
height={48}
className="w-12 h-12 rounded-full mr-4"
alt={name}
/>
<div className="text-xl font-bold">{name}</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion examples/blog-starter/components/cover-image.js
Expand Up @@ -18,7 +18,7 @@ export default function CoverImage({ title, src, slug, height, width }) {
return (
<div className="sm:mx-0">
{slug ? (
<Link as={`/posts/${slug}`} href="/posts/[slug]">
<Link href={`/posts/${slug}`}>
<a aria-label={title}>{image}</a>
</Link>
) : (
Expand Down
2 changes: 1 addition & 1 deletion examples/blog-starter/components/hero-post.js
Expand Up @@ -25,7 +25,7 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link as={`/posts/${slug}`} href="/posts/[slug]">
<Link href={`/posts/${slug}`}>
<a className="hover:underline">{title}</a>
</Link>
</h3>
Expand Down
2 changes: 1 addition & 1 deletion examples/blog-starter/components/post-preview.js
Expand Up @@ -23,7 +23,7 @@ export default function PostPreview({
/>
</div>
<h3 className="text-3xl mb-3 leading-snug">
<Link as={`/posts/${slug}`} href="/posts/[slug]">
<Link href={`/posts/${slug}`}>
<a className="hover:underline">{title}</a>
</Link>
</h3>
Expand Down
6 changes: 3 additions & 3 deletions examples/blog-starter/package.json
Expand Up @@ -16,8 +16,8 @@
"remark-html": "15.0.1"
},
"devDependencies": {
"autoprefixer": "^10.4.0",
"postcss": "^8.4.4",
"tailwindcss": "^3.0.1"
"autoprefixer": "^10.4.2",
"postcss": "^8.4.7",
"tailwindcss": "^3.0.23"
}
}
34 changes: 34 additions & 0 deletions examples/cms-tina/.gitignore
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

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

# vercel
.vercel
1 change: 1 addition & 0 deletions examples/cms-tina/.tina/__generated__/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.