Resolving article images
@@ -24,7 +24,7 @@ const ContentThumbnailTemplate = ({
|
||||
: post.frontmatter.thumbnail.horizontal;
|
||||
|
||||
if (imageName) {
|
||||
// Return path to image in content/blog directory
|
||||
// Return path to image in public/content/blog directory
|
||||
return `/content/blog/${imageName}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,10 +30,12 @@ export default function LearnPage() {
|
||||
<div className="min-h-screen bg-[var(--color-surface-default-primary)]">
|
||||
<ContentLockup {...contentLockupData} />
|
||||
|
||||
<div className="space-y-[var(--spacing-scale-002)]">
|
||||
<div className="pt-[var(--spacing-scale-024)] pb-[var(--spacing-scale-024)] px-[var(--spacing-scale-020)] space-y-[var(--spacing-scale-002)]">
|
||||
{allPosts.slice(0, 3).map((post, index) => (
|
||||
<ContentThumbnailTemplate
|
||||
key={post.slug}
|
||||
key={`${post.slug}-${index}-${
|
||||
post.frontmatter.thumbnail?.horizontal || "default"
|
||||
}`}
|
||||
post={post}
|
||||
variant="horizontal"
|
||||
/>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
--breakpoint-xsm: 429px;
|
||||
--breakpoint-sm: 430px;
|
||||
--breakpoint-sm2: 440px;
|
||||
--breakpoint-smd: 540px;
|
||||
--breakpoint-md: 640px;
|
||||
--breakpoint-xmd: 768px;
|
||||
--breakpoint-lg: 1024px;
|
||||
@@ -29,15 +30,12 @@
|
||||
--color-*: initial;
|
||||
|
||||
/* Font families */
|
||||
--font-sans:
|
||||
var(--font-inter), ui-sans-serif, system-ui, -apple-system, "Segoe UI",
|
||||
Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
--font-display:
|
||||
var(--font-bricolage-grotesque), ui-sans-serif, system-ui, -apple-system,
|
||||
--font-sans: var(--font-inter), ui-sans-serif, system-ui, -apple-system,
|
||||
"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
--font-mono:
|
||||
var(--font-space-grotesk), ui-monospace, SFMono-Regular, "SF Mono",
|
||||
Consolas, "Liberation Mono", Menlo, monospace;
|
||||
--font-display: var(--font-bricolage-grotesque), ui-sans-serif, system-ui,
|
||||
-apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
--font-mono: var(--font-space-grotesk), ui-monospace, SFMono-Regular,
|
||||
"SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
|
||||
|
||||
/* Dimension */
|
||||
--spacing-scale-000: 0px;
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
title: "Sample: Making Decisions Without Hierarchy"
|
||||
description: "A brief guide to collaborative nonhierarchical decision making"
|
||||
author: "Author name"
|
||||
date: "2025-04-05"
|
||||
related: ["resolving-active-conflicts", "operational-security-mutual-aid"]
|
||||
thumbnail:
|
||||
vertical: "making-decisions-without-hierarchy-vertical.svg"
|
||||
horizontal: "making-decisions-without-hierarchy-horizontal.svg"
|
||||
---
|
||||
|
||||
Traditional organizations rely on hierarchical structures where decisions flow from top to bottom. But what if you want to create a more collaborative, egalitarian approach? This guide explores practical methods for making decisions without traditional power structures.
|
||||
|
||||
Before diving into methods, it's worth understanding why groups choose to avoid hierarchy. Benefits include increased participation with more voices in decision-making, better solutions through diverse perspectives leading to creative outcomes, stronger commitment as people support decisions they helped create, skill development as members learn leadership and facilitation skills, and reduced power abuse with less opportunity for exploitation. However, challenges include being time intensive as consensus takes longer than top-down decisions, requiring training as people need to learn new skills, being frustrating as not everyone is comfortable with the process, and the risk of paralysis as groups can get stuck on difficult decisions.
|
||||
|
||||
Effective nonhierarchical decision making is built on several key principles. Equality means all members have equal voice and influence in decisions that affect them. Transparency requires information to be shared openly and decision-making processes to be clear to everyone. Participation means everyone is encouraged and supported to participate in decisions. Accountability means members are responsible for their commitments and actions.
|
||||
|
||||
Consensus is perhaps the most well-known nonhierarchical decision-making method. It works by presenting the proposal clearly, allowing time for questions and clarification, discussing concerns and potential improvements, seeking to address all concerns, testing for consensus with no blocking objections, and implementing the decision. Use consensus for important decisions affecting the whole group, when you need strong commitment to implementation, and for policy decisions or major changes. Tips for success include using a skilled facilitator, allowing plenty of time, focusing on interests rather than positions, and being willing to modify proposals.
|
||||
|
||||
Consent-based decision making focuses on finding decisions that are "good enough" rather than perfect. It works by presenting a proposal, checking for objections rather than preferences, addressing any objections, adopting the proposal if there are no blocking objections, and implementing and reviewing regularly. Use this method for operational decisions, when you need to move quickly, and for decisions that can be easily changed later.
|
||||
|
||||
Sociocracy uses circles or teams to make decisions within their domain. It works by organizing into functional circles, having each circle make decisions in its domain, using consent-based decision making within circles, connecting circles through representatives, and conducting regular review and adaptation. Use sociocracy for larger organizations, when you need clear domains of responsibility, and for ongoing operations.
|
||||
|
||||
Good facilitation is crucial for nonhierarchical decision making. Basic facilitation includes active listening by paying full attention to speakers, reflecting back what you've heard, asking clarifying questions, and avoiding interrupting. Managing discussion involves keeping discussions focused, ensuring everyone has a chance to speak, managing time effectively, and summarizing key points. Handling conflict requires addressing tensions directly, focusing on interests rather than positions, looking for common ground, and knowing when to take breaks.
|
||||
|
||||
Advanced techniques include progressive stack by keeping a list of people who want to speak, prioritizing voices that haven't been heard, balancing different perspectives, and managing dominant speakers. Small group work involves breaking into smaller groups for discussion, using different formats like pairs or triads, reporting back to the larger group, and synthesizing insights. Visual tools include using flip charts or whiteboards, creating visual representations of ideas, tracking decisions and action items, and making processes visible.
|
||||
|
||||
Common challenges include the dominant speaker where one person talks too much, limiting others' participation. Solutions include using progressive stack, setting time limits for individual contributions, directly addressing the behavior, and creating structured discussion formats. Analysis paralysis occurs when groups get stuck in endless discussion without making decisions. Solutions include setting clear time limits, using consent-based methods, focusing on "good enough" solutions, and implementing with regular review. The silent majority problem occurs when many people don't participate in discussions. Solutions include using small group formats, asking direct questions, creating safer spaces for participation, and addressing power dynamics. Veto power abuse happens when people block decisions for personal rather than group reasons. Solutions include clarifying what constitutes a valid objection, distinguishing between preferences and concerns, using consent-based methods, and addressing underlying issues.
|
||||
|
||||
Creating effective nonhierarchical decision making requires cultural change. Training and education should include skills development through regular facilitation training, decision-making method workshops, conflict resolution skills, and communication skills. Process education involves explaining methods clearly, practicing with low-stakes decisions, learning from other groups, and conducting regular process review. Creating safe spaces requires psychological safety by encouraging respectful disagreement, addressing power dynamics, supporting quieter voices, and handling conflict constructively. Inclusive practices include considering different communication styles, providing multiple ways to participate, addressing accessibility needs, and being aware of cultural differences.
|
||||
|
||||
Modern technology can support nonhierarchical decision making. Digital platforms include collaborative tools like shared documents for proposals, online voting platforms, video conferencing for remote participation, and project management tools. Communication tools include discussion forums, chat platforms, email lists, and social media groups. Hybrid approaches combine methods by using online tools for preparation, making final decisions in person, using digital tools for implementation, and conducting regular online check-ins.
|
||||
|
||||
Measuring success involves looking at participation indicators like high attendance at decision-making meetings, diverse voices in discussions, new people taking on leadership roles, and reduced reliance on a few key people. Quality of decisions indicators include decisions being implemented effectively, fewer decisions needing to be revisited, creative solutions emerging, and group satisfaction with outcomes. Group health indicators include low conflict and high trust, strong commitment to decisions, good communication, and sustainable participation levels. Regular review involves process evaluation through monthly process check-ins, annual decision-making reviews, member surveys, and external facilitation. Continuous improvement includes learning from mistakes, adapting methods to your context, sharing learnings with other groups, and staying updated on new approaches.
|
||||
|
||||
Nonhierarchical decision making is not about eliminating leadership—it's about distributing it more broadly and creating more inclusive, effective decision-making processes. While it requires more time and skill than traditional approaches, the benefits in terms of participation, creativity, and commitment can be significant. Remember: there's no one "right" way to make decisions without hierarchy. The key is finding methods that work for your specific group, context, and goals, and being willing to adapt as you learn and grow.
|
||||
@@ -1,31 +0,0 @@
|
||||
<svg width="320" height="226" viewBox="0 0 320 226" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_19244_45768)">
|
||||
<path d="M0 0C105.6 0 211.2 0 320 0C320 74.415 320 148.83 320 225.5C214.4 225.5 108.8 225.5 0 225.5C0 151.085 0 76.67 0 0Z" fill="#E2EFFF"/>
|
||||
<path d="M115.5 191L116.609 222.823L139.895 201.105L118.178 224.391L150 225.5L118.178 226.609L139.895 249.895L116.609 228.178L115.5 260L114.391 228.178L91.1048 249.895L112.823 226.609L81 225.5L112.823 224.391L91.1048 201.105L114.391 222.823L115.5 191Z" fill="#16A9C4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M188 183.5L188 172L174.169 172C166.53 172 160 182.297 160 195C160 207.702 166.53 218 174.169 218L188 218L188 206.5C188 200.149 183.048 195 179.229 195C183.048 195 188 189.851 188 183.5Z" fill="#D96043"/>
|
||||
<circle cx="272.745" cy="122.485" r="22.4851" fill="#D93529"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M287.526 184.726C298.26 184.726 306.961 176.118 306.961 165.5C306.961 154.881 298.26 146.274 287.526 146.274L269.16 146.274L269.16 184.726L287.526 184.726Z" fill="#16A9C4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M269.16 146.274C258.722 146.274 250.26 154.882 250.26 165.5C250.26 176.119 258.722 184.727 269.16 184.727L269.16 146.274Z" fill="#D96043"/>
|
||||
<path d="M269.87 205.918C266.339 210.468 259.788 211.294 255.238 207.763C250.688 204.232 249.862 197.682 253.393 193.132C256.924 188.582 272.663 184.921 272.705 185.256C272.705 185.256 273.4 201.369 269.87 205.918Z" fill="#0BA960"/>
|
||||
<rect x="12" y="189" width="12.5" height="12.5" fill="#16A9C4"/>
|
||||
<rect x="24.5" y="189" width="12.5" height="12.5" fill="#D93529"/>
|
||||
<rect x="12" y="201.5" width="12.5" height="12.5" fill="#8D5AC4"/>
|
||||
<rect x="24.5" y="201.5" width="12.5" height="12.5" fill="#0BA960"/>
|
||||
<g clip-path="url(#clip1_19244_45768)">
|
||||
<mask id="mask0_19244_45768" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="281" y="8" width="23" height="27">
|
||||
<path d="M304 8H281V35H304V8Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_19244_45768)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M286.75 8H281V21.5C281 28.9558 286.149 35 292.5 35C298.851 35 304 28.9558 304 21.5V8H298.25C295.074 8 292.5 11.0221 292.5 14.75C292.5 11.0221 289.926 8 286.75 8Z" fill="#0BA960"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_19244_45768">
|
||||
<rect width="320" height="225.5" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_19244_45768">
|
||||
<rect width="23" height="27" fill="white" transform="translate(281 8)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
@@ -1,31 +0,0 @@
|
||||
<svg width="260" height="390" viewBox="0 0 260 390" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="260" height="390" fill="#E2EFFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M155.258 311.992C156.1 310.897 156.715 309.645 157.07 308.311C157.608 306.304 157.54 304.183 156.874 302.215C156.208 300.247 154.974 298.52 153.328 297.253C151.682 295.986 149.697 295.235 147.624 295.095C145.551 294.955 143.483 295.432 141.681 296.467L138.817 297.987L137.111 295.25C135.715 292.835 133.417 291.074 130.722 290.353C128.027 289.633 125.157 290.013 122.742 291.409C120.327 292.805 118.566 295.103 117.845 297.798C117.125 300.493 117.505 303.363 118.901 305.778L130.286 325.835C130.38 326.002 130.508 326.149 130.66 326.267C130.812 326.384 130.986 326.47 131.172 326.52C131.357 326.57 131.551 326.582 131.742 326.556C131.932 326.531 132.116 326.467 132.282 326.37L152.17 314.692C153.368 314.005 154.417 313.087 155.258 311.992ZM103.329 355.054C102.488 356.149 101.872 357.4 101.518 358.735C100.979 360.742 101.047 362.863 101.713 364.831C102.379 366.799 103.613 368.525 105.259 369.792C106.906 371.06 108.891 371.811 110.964 371.951C113.036 372.091 115.104 371.613 116.906 370.579L119.77 369.059L121.476 371.796C122.872 374.211 125.171 375.972 127.865 376.692C130.56 377.413 133.431 377.033 135.846 375.637C138.26 374.241 140.021 371.942 140.742 369.248C141.462 366.553 141.082 363.683 139.686 361.268L128.301 341.211C128.207 341.044 128.08 340.897 127.927 340.779C127.775 340.661 127.601 340.575 127.416 340.525C127.23 340.476 127.036 340.463 126.845 340.489C126.655 340.515 126.471 340.579 126.305 340.676L106.418 352.353C105.22 353.041 104.17 353.958 103.329 355.054ZM154.506 361.299C153.171 360.945 151.92 360.329 150.824 359.488C149.729 358.647 148.811 357.597 148.124 356.399L136.447 336.511C136.349 336.345 136.286 336.162 136.26 335.971C136.234 335.781 136.246 335.587 136.296 335.401C136.346 335.215 136.432 335.041 136.55 334.889C136.667 334.737 136.814 334.61 136.982 334.515L157.038 323.131C159.453 321.734 162.324 321.355 165.019 322.075C167.713 322.795 170.012 324.557 171.408 326.971C172.804 329.386 173.183 332.257 172.463 334.951C171.743 337.646 169.982 339.944 167.567 341.34L164.829 343.046L166.35 345.911C167.384 347.712 167.861 349.78 167.721 351.853C167.581 353.926 166.83 355.911 165.563 357.557C164.296 359.204 162.57 360.438 160.602 361.104C158.634 361.77 156.512 361.838 154.506 361.299ZM107.763 307.558C106.668 306.717 105.416 306.101 104.082 305.747C102.075 305.208 99.9538 305.276 97.9858 305.942C96.0178 306.608 94.2912 307.842 93.024 309.488C91.7568 311.135 91.0059 313.12 90.8659 315.193C90.7259 317.265 91.2032 319.333 92.2375 321.135L93.7578 323.999L91.0205 325.705C88.6056 327.102 86.8444 329.4 86.1241 332.095C85.4038 334.789 85.7836 337.659 87.1797 340.074C88.5757 342.489 90.874 344.251 93.5687 344.971C96.2634 345.691 99.1339 345.311 101.549 343.915L121.606 332.531C121.773 332.436 121.92 332.309 122.037 332.156C122.155 332.004 122.241 331.83 122.291 331.645C122.341 331.459 122.353 331.265 122.327 331.074C122.301 330.884 122.238 330.7 122.141 330.535L110.463 310.647C109.776 309.449 108.858 308.399 107.763 307.558Z" fill="#080033"/>
|
||||
<rect x="184" y="276" width="13" height="13" fill="#16A9C4"/>
|
||||
<rect x="197" y="276" width="13" height="13" fill="#D93529"/>
|
||||
<rect x="184" y="289" width="13" height="13" fill="#8D5AC4"/>
|
||||
<rect x="197" y="289" width="13" height="13" fill="#0BA960"/>
|
||||
<g clip-path="url(#clip0_19192_4776)">
|
||||
<mask id="mask0_19192_4776" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="205" y="327" width="38" height="45">
|
||||
<path d="M243 327H205V372H243V327Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_19192_4776)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M214.5 327H205V349.5C205 361.926 213.507 372 224 372C234.493 372 243 361.926 243 349.5V327H233.5C228.253 327 224 332.037 224 338.25C224 332.037 219.747 327 214.5 327Z" fill="#0BA960"/>
|
||||
</g>
|
||||
</g>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M136 227.75L136 215L119.699 215C110.696 215 103 226.417 103 240.5C103 254.583 110.696 266 119.699 266L136 266L136 253.25C136 246.208 130.164 240.5 125.663 240.5C130.164 240.5 136 234.792 136 227.75Z" fill="#D96043"/>
|
||||
<path d="M56.5 205.855H72.9998L56.5 222.355L40.0002 205.855H56.5Z" fill="#8D5AC4"/>
|
||||
<path d="M56.5 239.039L40.0002 239.039L56.5 222.54L72.9998 239.039L56.5 239.039Z" fill="#080033"/>
|
||||
<path d="M45.5 270L46.6092 301.823L69.8953 280.105L48.1775 303.391L80 304.5L48.1775 305.609L69.8953 328.895L46.6092 307.178L45.5 339L44.391 307.178L21.1048 328.895L42.8226 305.609L11 304.5L42.8226 303.391L21.1048 280.105L44.391 301.823L45.5 270Z" fill="#16A9C4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M58.1683 374.4C58.1683 361.05 49.3981 351.008 38.5797 351.008C32.9369 351.008 23.966 351 23.0332 351C23.0332 356.846 23.0332 368.013 23.0332 374.4H58.1683Z" fill="#D96043"/>
|
||||
<path d="M211.503 172C214.195 172 216.378 174.183 216.378 176.875V188.842L220.392 177.568C221.295 175.032 224.083 173.708 226.619 174.611C229.155 175.514 230.479 178.303 229.576 180.839L225.367 192.659L233.363 182.989C235.079 180.915 238.152 180.623 240.227 182.339C242.301 184.054 242.592 187.127 240.877 189.202L233.065 198.648L243.611 192.404C245.928 191.033 248.918 191.798 250.29 194.114C251.662 196.431 250.896 199.421 248.579 200.793L237.601 207.293L250.152 204.967C252.799 204.476 255.343 206.224 255.834 208.871C256.325 211.518 254.576 214.062 251.929 214.553L239.103 216.93L251.957 219.159C254.61 219.619 256.388 222.143 255.928 224.796C255.468 227.448 252.944 229.225 250.292 228.766L237.573 226.56L248.74 233.026C251.07 234.376 251.865 237.358 250.516 239.688C249.166 242.017 246.184 242.812 243.854 241.463L232.332 234.79L240.781 245.082C242.489 247.163 242.187 250.234 240.106 251.942C238.026 253.65 234.954 253.348 233.246 251.268L225.427 241.742L229.554 253.354C230.455 255.89 229.13 258.677 226.594 259.579C224.057 260.481 221.269 259.155 220.367 256.618L216.378 245.393V257.307C216.378 259.999 214.195 262.182 211.503 262.182C208.811 262.182 206.628 259.999 206.628 257.307V245.295L202.599 256.612C201.695 259.148 198.908 260.472 196.372 259.569C193.836 258.666 192.511 255.878 193.414 253.342L197.625 241.512L189.624 251.189C187.908 253.264 184.836 253.555 182.761 251.84C180.686 250.124 180.395 247.052 182.11 244.978L189.924 235.526L179.371 241.776C177.055 243.148 174.065 242.382 172.693 240.065C171.322 237.749 172.087 234.759 174.403 233.387L185.371 226.891L172.845 229.214C170.198 229.705 167.654 227.956 167.163 225.31C166.672 222.662 168.42 220.119 171.067 219.628L183.893 217.25L171.042 215.021C168.39 214.561 166.612 212.038 167.072 209.386C167.532 206.733 170.055 204.956 172.708 205.416L185.412 207.618L174.251 201.155C171.922 199.806 171.127 196.824 172.476 194.494C173.825 192.164 176.808 191.37 179.138 192.719L190.66 199.391L182.212 189.1C180.504 187.019 180.806 183.947 182.887 182.239C184.968 180.531 188.039 180.833 189.747 182.914L197.554 192.424L193.434 180.83C192.532 178.293 193.858 175.506 196.395 174.604C198.931 173.703 201.719 175.029 202.62 177.565L206.628 188.842V176.875C206.628 174.183 208.811 172 211.503 172Z" fill="#080033"/>
|
||||
<circle cx="231.433" cy="23.8333" r="10.8333" fill="#D93529"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M229.706 35.2948C224.677 35.2948 220.6 39.4421 220.6 44.558C220.6 49.674 224.677 53.8213 229.706 53.8213L229.706 35.2948Z" fill="#D96043"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M238.554 53.8215C243.726 53.8215 247.918 49.6741 247.918 44.5582C247.918 39.4422 243.726 35.2949 238.554 35.2949L229.705 35.2949L229.705 53.8215L238.554 53.8215Z" fill="#16A9C4"/>
|
||||
<path d="M230.047 64.0307C228.346 66.2228 225.19 66.6208 222.998 64.9196C220.806 63.2184 220.408 60.0623 222.109 57.8702C223.81 55.6781 231.393 53.9142 231.413 54.0756C231.413 54.0756 231.749 61.8386 230.047 64.0307Z" fill="#0BA960"/>
|
||||
<defs>
|
||||
<clipPath id="clip0_19192_4776">
|
||||
<rect width="38" height="45" fill="white" transform="translate(205 327)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
@@ -39,6 +39,21 @@ export const BLOG_POST_SCHEMA = {
|
||||
maxLength: 50,
|
||||
},
|
||||
},
|
||||
thumbnail: {
|
||||
type: "object",
|
||||
required: false,
|
||||
default: null,
|
||||
properties: {
|
||||
vertical: {
|
||||
type: "string",
|
||||
required: false,
|
||||
},
|
||||
horizontal: {
|
||||
type: "string",
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -81,12 +96,12 @@ export function validateBlogPost(frontmatter) {
|
||||
if (config.type === "string" && typeof frontmatter[field] === "string") {
|
||||
if (config.minLength && frontmatter[field].length < config.minLength) {
|
||||
errors.push(
|
||||
`Field ${field} must be at least ${config.minLength} characters`,
|
||||
`Field ${field} must be at least ${config.minLength} characters`
|
||||
);
|
||||
}
|
||||
if (config.maxLength && frontmatter[field].length > config.maxLength) {
|
||||
errors.push(
|
||||
`Field ${field} must be no more than ${config.maxLength} characters`,
|
||||
`Field ${field} must be no more than ${config.maxLength} characters`
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -105,12 +120,12 @@ export function validateBlogPost(frontmatter) {
|
||||
}
|
||||
if (config.items.minLength && item.length < config.items.minLength) {
|
||||
errors.push(
|
||||
`Item ${i} in ${field} must be at least ${config.items.minLength} characters`,
|
||||
`Item ${i} in ${field} must be at least ${config.items.minLength} characters`
|
||||
);
|
||||
}
|
||||
if (config.items.maxLength && item.length > config.items.maxLength) {
|
||||
errors.push(
|
||||
`Item ${i} in ${field} must be no more than ${config.items.maxLength} characters`,
|
||||
`Item ${i} in ${field} must be no more than ${config.items.maxLength} characters`
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -134,7 +149,12 @@ export function sanitizeBlogPost(frontmatter) {
|
||||
|
||||
for (const [field, config] of Object.entries(BLOG_POST_SCHEMA)) {
|
||||
if (frontmatter[field] !== undefined) {
|
||||
sanitized[field] = frontmatter[field];
|
||||
// Special handling for thumbnail object
|
||||
if (field === "thumbnail" && typeof frontmatter[field] === "object") {
|
||||
sanitized[field] = frontmatter[field];
|
||||
} else {
|
||||
sanitized[field] = frontmatter[field];
|
||||
}
|
||||
} else if (config.default !== undefined) {
|
||||
sanitized[field] = config.default;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |