summaryrefslogtreecommitdiff
path: root/examples/blog/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-11-21feat: support new location for content config (#12475)Gravatar Matt Kane 1-0/+0
* feat: support new location for content config * Test fixes * Handle missing dir * Handle missing content dir * chore: changes from review * Revert legacy fixtures * Clarify changeset
2024-09-03feat(next): better tsconfig (#11859)Gravatar Florian Lefebvre 1-1/+0
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-08-14Content Layer (#11360)Gravatar Matt Kane 1-1/+0
* Empty commit * Changeset * feat: add Content Layer loader (#11334) * wip * wip * wip * Update demo * Add meta * wip * Add file loader * Add schema validation * Remove log * Changeset * Format * Lockfile * Fix type * Handle loading for data store JSON * Use rollup util to import JSON * Fix types * Format * Add tests * Changes from review * fix: sync content layer in dev (#11365) * wip * wip * wip * Update demo * Add meta * wip * Add file loader * Add schema validation * Remove log * Changeset * Format * Lockfile * Fix type * Handle loading for data store JSON * Use rollup util to import JSON * Fix types * Format * Add tests * Changes from review * Sync content layer in dev * feat: add typegen for loaders (#11358) * fix: watch for content layer changes (#11371) * fix: watch for content layer changes * Add test * feat: adds simple loader (#11386) * wip * Add simple loader * Fix type guard * Tighten loader schema * Add loader function to type * Reinstall vitest * feat: add glob loader (#11398) * feat: add glob loader * Enable watching and fix paths * Store the full entry object, not just data * Add generateId support * Fix test * Rename loaders to sync * Refacctor imports * Use getEntry * Format * Fix import * Remove type from output * Windows path * Add test for absolute path * Update lockfile * Debugging windows * Allow file URL for base dir * Reset time limit * feat: add markdown rendering to content layer (#11440) * feat: add glob loader * Enable watching and fix paths * Store the full entry object, not just data * Add generateId support * Fix test * Rename loaders to sync * Refacctor imports * Use getEntry * Format * Fix import * Remove type from output * Windows path * Add test for absolute path * Update lockfile * Debugging windows * Allow file URL for base dir * Reset time limit * wip: add markdown rendering to content layer * use cached entries * CLean up types * Instrument more of the build * Add digest helper * Add comments * Make image extraction work * feat: image support for content layer (#11469) * wip * wip * Add image to benchmark * Stub assets if missing * Resolve assets in data * Ignore virtual module * Format * rm log * Handle images when using cached data * Fix CCC * Add a comment * Changes from review * Format * Use relative paths for asset files * Pass all md props to getImage * Ensure dotastro dir exists * Fix tests * Changes from review * Don't use temp array in getcollection * Add error handling * Format * Handle paths that are already relative * Dedupe sync runs * Fix syncing in dev * Changes from review * Windows paths ftw * feat(content-layer): support references in content layer (#11494) * Support references in content layer * Fix utf8 rendering * Warn for invalid entries * Fix test * lol windows paths * Remove assertion * chore: fix content layer types (#11527) * Add experimental_content type * Fix import * Make data store methods generic * fix loader types * Lockfile * Clean content layer with `--force` (#11541) * Clearn content layer with `--force` * Add tests * Document --force flag * Fixes to content layer render types (#11558) * Lockfile * feat: use devalue to serialize content layer data (#11562) * feat: use devalue to serialize content layer data * Fix import * Use devalue stringify * Unused import * Propagate error messages correctly * Support --force flag in sync and dev (#11581) * Support --force flag in sync and dev * Fix test * Separate render function and merge content layer types (#11579) * Separate render function and merge content layer types * Changes from review * fix: clear content layer cache if config has changed (#11591) * fix: clear content layer cache if config has changed * Add test * Watch config * Change from review * fix: skip glob files in content dir (#11622) * fix: skip glob files in content dir * Changes from review * Log pattern * Refactor content layer into shared instance (#11625) * Refactor content layer into shared instance * Clean up when testing * Handle cleanup * fix: support filters in content layer getCollection (#11631) * Throw when using deprecated getEntryByX functions with content layer (#11637) * Updates to content layer types and jsdocs (#11643) * Add hot key to reload content layer (#11626) * Add hot key to reload content layer * Fix filename * Remove cli message * Update example * Change key to "s" * feat: handle simple mdx rendering (#11633) * feat: handle simple mdx rendering * cleanup * feedback * fix regression * remove log * flip condition * update tests * log collections to understand the error * let's try this alternative * try parallel test to understand the issue * chore: use a new fixture to fix tests * rebase and docs * fix regressions * remove old code * address feedback * rename param * log error * rebase * chore: try a different cache dir to solve the error test * fix invalidation of the module when there's no store available * address suggestion * run formatter * update lock file * Lint * Add experimental content layer flag (#11652) * Add experimental content layer flag * Syntax and format * Aside * Format * Reset content config between runs * Update fixture * Update terminology * Lint * wut * Normalize render function return value (#11663) * Add markdoc support to content layer (#11664) * Add markdoc support to content layer * Switch test to cheerio * Update benchmarks * update lock file * Update content layer flag docs (#11682) * Update content layer flag docs * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * More markdoc * Typo * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Add changeset for content layer experimental release (#11644) * Add changeset for content layer experimental release * Update changeset * Update .changeset/smooth-chicken-wash.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * feat: injectTypes (#11551) * feat: make inline config 1st arg * fix: run config done in sync * feat: start working on injectTypes * feat: write files * feat: adapt core features * feat: migrate db to injectTypes * feat: special db handling * feat: update settings instead of workarounds * fix: create dotAstroDir * feat: refactor sync tests * fix: path * fix: paths * chore: add comments * feat: overwrite content file if exists * chore: remove unused db env related code * feat: use dotAstroDir for settings * chore: simplify astro env sync * feat: use dotAstroDir for preferences * feat: handle db in integration api * chore: reorganize * feat: format * feat: add test * Discard changes to examples/basics/astro.config.mjs * Discard changes to examples/basics/package.json * Discard changes to pnpm-lock.yaml * chore: remove test files * feat: update examples dts * fix: dts * chore: changesets * fix: indentation * Apply suggestions from code review Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Apply suggestions from code review Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * chore: format * Update packages/astro/src/integrations/hooks.ts * Update .changeset/mean-horses-kiss.md * feat: remove formatting * feat: handle fs errors * feat: remove astro:db special path handling * feat: add fs error * Update packages/astro/src/content/types-generator.ts * Update .changeset/mean-horses-kiss.md * Update errors-data.ts * Update .changeset/mean-horses-kiss.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/mean-horses-kiss.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> * Add file generation and flag for content intellisense (#11639) * feat: add type to infer input type of collection * refactor: * feat: generate json schema for content too * feat: generate a manifest of all the collections * refactor: unnecessary type * fix: only add content collections to manifest * chore: changeset * fix: generate file URLs * fix: flag it properly * fix: save in lower case * docs: add jsdoc to experimental option * nit: move function out * fix: match vscode flag name * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update serious-pumas-run.md * test: add tests * Add content layer support * Apply suggestions from code review * fix: test * Update .changeset/serious-pumas-run.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Apply suggestions from code review * Remove check for json --------- Co-authored-by: Matt Kane <m@mk.gg> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * nit: use same filesystem error as injectTypes * fix: code component was missing support for meta string (#11605) * fix: code component was missing support for meta string Fixed #11604 * Create odd-buttons-pay.md * <Code>: add reference link for meta prop * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/odd-buttons-pay.md * Update .changeset/odd-buttons-pay.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Deprecates exporting prerender with dynamic values (#11657) * wip * done i think * Add changeset * Use hook instead * Reorder hooks [skip ci] * Update .changeset/eleven-pens-glow.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Fix run * Fix link * Add link Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com> * More accurate migration [skip ci] --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com> * Use node parseArgs instead of yargs-parser and arg (#11645) * wip * done * Add changeset * Format * Update * Fix houston * Fix test * Fix test * [ci] format * resolve conflict --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Julien Cayzac <jcayzac@users.noreply.github.com> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com> Co-authored-by: Bjorn Lu <ematipico@users.noreply.github.com>
2024-08-08update formatter config (#11640)Gravatar Darius 1-1/+1
* update formatter config * format --------- Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-08-05sort newest to oldest (#11587)Gravatar Jeff R 3-3/+3
* sort newest to oldest * Update pubDate to preserve a meaningful order in the examples/blog folder
2024-05-08Fix markdown of `markdown-style-guide.md` in the blog example (#10962)Gravatar Eduardo Pereira 1-10/+10
2024-05-01Fix typos (#10923)Gravatar Viktor Szépe 2-2/+2
2024-04-19fixed the path to checkout existing blog posts on the home page of the blog ↵Gravatar Damanjeet Singh 1-1/+1
starter template (#10814) Currently the 4th point on home page says: "Check out the included blog posts in src/pages/blog/". It the path here should be "src/content/blog/".
2024-02-21Fix blog ordering (#10168)Gravatar zsombok 2-2/+2
Co-authored-by: David Zsombok <david.zsombok@baxter-it.com>
2024-01-30chore: support isActive link all subpages (#9694)Gravatar だいき 1-1/+2
* chore: support isActive link all subpages * Update examples/blog/src/components/HeaderLink.astro Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-29remove unused prop in blog template (#9848)Gravatar Jaga Santagostino 1-1/+1
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-01-02[ci] formatGravatar Houston (Bot) 1-4/+4
2023-12-08feat(examples): make content collections type explicitGravatar __dil__ 1-0/+1
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Co-authored-by: Bjorn Lu <34116392+bluwy@users.noreply.github.com> Co-authored-by: Florian Lefebvre <69633530+florian-lefebvre@users.noreply.github.com>
2023-09-06[ci] formatGravatar natemoo-re 2-6/+6
2023-09-04Update examples & uppercase endpoints & fix response (#8391)Gravatar 李瑞丰 1-1/+1
Co-authored-by: liruifeng <liruifeng@troila.com>
2023-09-04chore: use `z.coerce.date()` to pass input through `new Date(input)`. (#8383)Gravatar Michael Oliver 1-8/+2
2023-08-15Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 2-2/+2
2023-08-11[ci] release (beta) (#7952)astro@3.0.0-beta.1@astrojs/vercel@4.0.0-beta.1@astrojs/telemetry@3.0.0-beta.1@astrojs/solid-js@3.0.0-beta.1@astrojs/react@3.0.0-beta.1@astrojs/preact@3.0.0-beta.1@astrojs/netlify@3.0.0-beta.1@astrojs/cloudflare@7.0.0-beta.1Gravatar Houston (Bot) 1-1/+1
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-10Remove unnecessary hyphen from svg tag (#8025)Gravatar Shinya Fujino 1-1/+1
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-10Update path to image in public/ to suppress warning (#8026)Gravatar Shinya Fujino 1-1/+1
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-10Merge remote-tracking branch 'origin/main' into nextGravatar Emanuele Stoppa 1-6/+113
2023-08-09[ci] formatGravatar ElianCodes 1-14/+14
2023-08-09fixed image path and add markdown syntax in example (#7802)Gravatar Keshav Mohta 1-6/+113
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Elian ☕️ <hello@elian.codes>
2023-08-08chore: update prettier to `3.0` (#7957)Gravatar Emanuele Stoppa 1-1/+1
2023-08-08Remove support for Node 16 (#7780) (#7820)Gravatar Emanuele Stoppa 1-1/+1
2023-08-07Add screen reader text to example blog footer (#7984)Gravatar Jeff Ruane 1-0/+3
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-07-25[ci] formatGravatar doodlemarks 6-54/+103
2023-07-25Blog theme styling updates (#7768)Gravatar Mark Peck 14-81/+318
* whole lotta updates and including some new fonts * update placeholders * fix mobile first child * remove experimental stuff * adding accessible text to header icon links * preloading font files * i did dum things --------- Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
2023-07-14nit: export props has been unnecessary.. forever (#7646)Gravatar Erika 2-2/+2
2023-06-26Format markdown files (#7439)Gravatar Bjorn Lu 4-16/+16
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-03-20added prop type definition for FormattedDate in Blog example (#6591)Gravatar Matthew Mercuri 1-0/+4
2023-02-21Fix import of type HTMLAttributes in blog example (#6322)Gravatar Christofer J. Ekervhén 1-1/+3
* Fix extend type HTMLAttributes in blog example * Update examples/blog/src/components/HeaderLink.astro Co-authored-by: Christofer J. Ekervhén <45903979+ChrisEke@users.noreply.github.com> --------- Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2023-02-09Fix blog starter about page (#6195)Gravatar Ben Holmes 5-28/+86
* refactor: about.md -> about.astro * chore: add strictNullChecks * fix: format date on blog post layout
2023-01-19[RSS] Get ready for content collections (#5851)Gravatar Ben Holmes 1-1/+1
* chore: strictNullChecks for zod * feat: expose `rssSchema` helper * refactor: align types with schema types * feat: break glob handler to globToRssItems util * refactor: RSS options validation to Zod * refactor: avoid intermediate type * fix: allow numbers and dates in pubDate * test: update glob and error tests * feat: add rss to with-content starter * fix: move globToRssItems back to internal behavior * chore: JSON.stringify * Revert "fix: move globToRssItems back to internal behavior" This reverts commit 85305075e6444907455541b24bccbccd5016951a. * test: missing url * docs: `import.meta.env.SITE` -> `context.site` * docs: update README to content collections example * fix: url -> link * docs: add `rssSchema` to README * chore: consistent formatting * docs: add `pagesGlobToRssItems()` reference * chore: globToRssItems -> pagesGlobToRssItems * chore: changeset * fix: bad docs line highlighting * fix: add collections export to example * nit: remove "our" * fix: are -> all * fix: more README edits * deps: kleur * chore: add back import.meta.glob handling as deprecated * docs: bump down to `minor`, update headline to be less content collections-y * typo: suggest adding * chore: support URL object on `site` * docs: add await to pagesGlob ex * docs: tighten `rssSchema` explainer * docs: tighten pagesGlobToRssItems section * docs: add content to README * docs: replace examples with docs link * docs: re-we Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-18Migrate blog and docs starters to content collections (#5858)Gravatar Ben Holmes 15-59/+99
* docs: update README for `content/` * chore: update env * feat: update blog to use content collections * chore: remove with-content starter * fix: single quotes -> double * feat: update docs starter to content collections * refactor: config -> consts * chore: import type * edit: Astro will -> Use Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * chore: remove unused null check * nit: spacing * nit: `as Props` 1 Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * nit: `as Props` 2 Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * chore: consistent CONSTS usage * chore: `type` imports at top * chore: consistent quote usage on YAML * chore: remove `as Props` from docs Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-12-21[ci] formatGravatar delucis 1-1/+1
2022-12-21Add canonical URL to blog example (#5651)Gravatar Shivam 1-0/+5
2022-11-08[ci] formatGravatar Princesseuh 2-17/+21
2022-11-01fix: consider trailing slashes when calculating current path in blog example ↵Gravatar Shoubhit Dash 1-1/+3
(#5272)
2022-10-24[ci] formatGravatar Princesseuh 1-14/+11
2022-09-22examples rss: add mdx file ending (#4710)Gravatar Tobias 1-1/+1
This follows the same pattern used in https://github.com/withastro/astro/blob/main/examples/blog/src/pages/blog.astro#L8. Without adding `mdx` here, only some blog posts will be part of the rss.xml file.
2022-09-22Update blog post date text color to meet contrast-ratio guidelines (#4821)Gravatar Brett Jankord 1-1/+1
2022-09-13Template (Blog): fix `HeaderLink` `isActive` check (#4647)Gravatar Sami Jaber 1-1/+1
* remove trailing slashes when checking active href * use simpler regex Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * remove unused code Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-09-03examples: Blog template changes (#4577)Gravatar Daren Chandisingh 3-4/+4
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-08-26Remove "as Props" from the astro examples (#4494)Gravatar Mohammed Elhaouari 2-2/+2
2022-08-26Update blog.astro (#4486)Gravatar Peter Singh 1-2/+2
2022-08-17Switch examples favicon to use svg (#4331)Gravatar Nate Moore 1-1/+1
* chore(examples): switch favicon to svg * chore: astro.svg => favicon.svg * Update examples/basics/README.md Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Nate Moore <nate@astro.build> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2022-08-17Fix example blog post markdown-style-guide.md image extension (#4360)Gravatar Caleb 1-1/+1
2022-08-15fix(blog): height auto img (#4327)Gravatar Nate Moore 1-0/+1
Co-authored-by: Nate Moore <nate@astro.build>
2022-08-15[ci] formatGravatar FredKSchott 2-9/+9