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

fix: set default layout for projects in cms #75

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

chosww
Copy link
Collaborator

@chosww chosww commented Jan 17, 2025

Default layout wasn't set in the CMS config file for project, so when a new project is created from the CMS, the project wasn't displayed properly. Also, fixed a small issue where card content wasn't stretched fully.

@chosww chosww self-assigned this Jan 17, 2025
@chosww chosww added the bug Something isn't working label Jan 17, 2025
@chosww chosww added this to the v1.0 milestone Jan 17, 2025
@chosww chosww requested a review from greatislander January 17, 2025 21:59
Copy link
Member

@greatislander greatislander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If projects all use the same layout you can set that layout in the directory data file for src/collections/projects rather than having to add a field in the CMS and specify it for every project. I think that would be the better approach here.

Copy link

cloudflare-workers-and-pages bot commented Jan 17, 2025

Deploying inclusive-standards with  Cloudflare Pages  Cloudflare Pages

Latest commit: 76274af
Status: ✅  Deploy successful!
Preview URL: https://8b0a818b.inclusive-standards.pages.dev
Branch Preview URL: https://fix-default-project-layout.inclusive-standards.pages.dev

View logs

@chosww chosww requested a review from greatislander January 17, 2025 22:35
@@ -2,6 +2,7 @@ import { __, generatePermalink } from "eleventy-plugin-fluid";

export default {
eleventyComputed: {
layout: "layouts/project",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually doesn't need to be computed so it can be moved outside the eleventyComputed block. See here: https://www.11ty.dev/docs/data-js/

@greatislander greatislander enabled auto-merge (squash) January 18, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants