@highjumpdigitalsoftware/blog-kit 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INTEGRATION.md +76 -0
- package/LICENSE +74 -0
- package/README.md +102 -0
- package/astro/AdPreview.astro +64 -0
- package/astro/AdPreviewPair.astro +10 -0
- package/astro/AuditFindings.astro +29 -0
- package/astro/AuditScores.astro +60 -0
- package/astro/AuthorCard.astro +32 -0
- package/astro/BeforeAfter.astro +26 -0
- package/astro/BlogBehaviors.astro +15 -0
- package/astro/CTABanner.astro +28 -0
- package/astro/CalloutBox.astro +28 -0
- package/astro/CaseStudyHero.astro +45 -0
- package/astro/ChannelMixBars.astro +33 -0
- package/astro/Checklist.astro +24 -0
- package/astro/ChecklistItem.astro +15 -0
- package/astro/CodeSnippet.astro +20 -0
- package/astro/ComparisonTable.astro +103 -0
- package/astro/Definition.astro +30 -0
- package/astro/DeliveryComparison.astro +40 -0
- package/astro/FAQList.astro +43 -0
- package/astro/FurtherReading.astro +34 -0
- package/astro/ImageFeature.astro +22 -0
- package/astro/Infographic.astro +12 -0
- package/astro/KeyMetric.astro +40 -0
- package/astro/KeywordTable.astro +69 -0
- package/astro/List.astro +46 -0
- package/astro/MetricHighlight.astro +77 -0
- package/astro/NewsletterCTA.astro +40 -0
- package/astro/NumberedCard.astro +6 -0
- package/astro/ProConBlock.astro +38 -0
- package/astro/ProseList.astro +46 -0
- package/astro/QuoteBlock.astro +72 -0
- package/astro/RegionCallout.astro +24 -0
- package/astro/RelatedPosts.astro +47 -0
- package/astro/ResultsStrip.astro +59 -0
- package/astro/ScoreBar.astro +19 -0
- package/astro/SerpPreview.astro +35 -0
- package/astro/ServicePromoCard.astro +21 -0
- package/astro/StatCard.astro +48 -0
- package/astro/StepBlock.astro +5 -0
- package/astro/TableOfContents.astro +12 -0
- package/astro/TimelineBlock.astro +30 -0
- package/astro/TipBox.astro +14 -0
- package/astro/TrafficChart.astro +61 -0
- package/astro/VerdictCard.astro +48 -0
- package/astro/blogkit/Article.astro +63 -0
- package/astro/blogkit/BlogIndex.astro +144 -0
- package/core/behaviors/code.js +78 -0
- package/core/behaviors/comparison.js +52 -0
- package/core/behaviors/delivery-comparison.js +52 -0
- package/core/behaviors/faq.js +61 -0
- package/core/behaviors/index.d.ts +3 -0
- package/core/behaviors/index.js +35 -0
- package/core/behaviors/keyword-table.js +52 -0
- package/core/behaviors/toc.js +130 -0
- package/core/css/base.css +146 -0
- package/core/css/components.css +2632 -0
- package/core/css/index-listing.css +207 -0
- package/core/css/index.css +13 -0
- package/core/css/tokens.css +127 -0
- package/core/icons.ts +20 -0
- package/core/lib.ts +70 -0
- package/core/manifest/components.json +573 -0
- package/core/manifest/frontmatter.json +19 -0
- package/core/manifest/templates.json +77 -0
- package/dist/core/behaviors/code.js +78 -0
- package/dist/core/behaviors/comparison.js +52 -0
- package/dist/core/behaviors/delivery-comparison.js +52 -0
- package/dist/core/behaviors/faq.js +61 -0
- package/dist/core/behaviors/index.d.ts +3 -0
- package/dist/core/behaviors/index.js +35 -0
- package/dist/core/behaviors/keyword-table.js +52 -0
- package/dist/core/behaviors/toc.js +130 -0
- package/dist/core/css/base.css +146 -0
- package/dist/core/css/components.css +2632 -0
- package/dist/core/css/index-listing.css +207 -0
- package/dist/core/css/index.css +13 -0
- package/dist/core/css/tokens.css +127 -0
- package/dist/core/icons.d.ts +2 -0
- package/dist/core/icons.d.ts.map +1 -0
- package/dist/core/icons.js +20 -0
- package/dist/core/icons.js.map +1 -0
- package/dist/core/lib.d.ts +21 -0
- package/dist/core/lib.d.ts.map +1 -0
- package/dist/core/lib.js +57 -0
- package/dist/core/lib.js.map +1 -0
- package/dist/core/manifest/components.json +573 -0
- package/dist/core/manifest/frontmatter.json +19 -0
- package/dist/core/manifest/templates.json +77 -0
- package/dist/package/adapters/hjd-api.d.ts +14 -0
- package/dist/package/adapters/hjd-api.d.ts.map +1 -0
- package/dist/package/adapters/hjd-api.js +57 -0
- package/dist/package/adapters/hjd-api.js.map +1 -0
- package/dist/package/adapters/index.d.ts +13 -0
- package/dist/package/adapters/index.d.ts.map +1 -0
- package/dist/package/adapters/index.js +16 -0
- package/dist/package/adapters/index.js.map +1 -0
- package/dist/package/adapters/local.d.ts +13 -0
- package/dist/package/adapters/local.d.ts.map +1 -0
- package/dist/package/adapters/local.js +72 -0
- package/dist/package/adapters/local.js.map +1 -0
- package/dist/package/adapters/source.d.ts +39 -0
- package/dist/package/adapters/source.d.ts.map +1 -0
- package/dist/package/adapters/source.js +19 -0
- package/dist/package/adapters/source.js.map +1 -0
- package/dist/package/article.d.ts +17 -0
- package/dist/package/article.d.ts.map +1 -0
- package/dist/package/article.js +37 -0
- package/dist/package/article.js.map +1 -0
- package/dist/package/astro/data.d.ts +45 -0
- package/dist/package/astro/data.d.ts.map +1 -0
- package/dist/package/astro/data.js +81 -0
- package/dist/package/astro/data.js.map +1 -0
- package/dist/package/astro/freshness.d.ts +11 -0
- package/dist/package/astro/freshness.d.ts.map +1 -0
- package/dist/package/astro/freshness.js +48 -0
- package/dist/package/astro/freshness.js.map +1 -0
- package/dist/package/astro/index.d.ts +12 -0
- package/dist/package/astro/index.d.ts.map +1 -0
- package/dist/package/astro/index.js +31 -0
- package/dist/package/astro/index.js.map +1 -0
- package/dist/package/blog-index.d.ts +10 -0
- package/dist/package/blog-index.d.ts.map +1 -0
- package/dist/package/blog-index.js +27 -0
- package/dist/package/blog-index.js.map +1 -0
- package/dist/package/cli/exchange.d.ts +27 -0
- package/dist/package/cli/exchange.d.ts.map +1 -0
- package/dist/package/cli/exchange.js +94 -0
- package/dist/package/cli/exchange.js.map +1 -0
- package/dist/package/cli/index.d.ts +3 -0
- package/dist/package/cli/index.d.ts.map +1 -0
- package/dist/package/cli/index.js +301 -0
- package/dist/package/cli/index.js.map +1 -0
- package/dist/package/config/define.d.ts +13 -0
- package/dist/package/config/define.d.ts.map +1 -0
- package/dist/package/config/define.js +14 -0
- package/dist/package/config/define.js.map +1 -0
- package/dist/package/config/resolve.d.ts +11 -0
- package/dist/package/config/resolve.d.ts.map +1 -0
- package/dist/package/config/resolve.js +43 -0
- package/dist/package/config/resolve.js.map +1 -0
- package/dist/package/config/types.d.ts +74 -0
- package/dist/package/config/types.d.ts.map +1 -0
- package/dist/package/config/types.js +13 -0
- package/dist/package/config/types.js.map +1 -0
- package/dist/package/index-core.d.ts +28 -0
- package/dist/package/index-core.d.ts.map +1 -0
- package/dist/package/index-core.js +102 -0
- package/dist/package/index-core.js.map +1 -0
- package/dist/package/index.d.ts +13 -0
- package/dist/package/index.d.ts.map +1 -0
- package/dist/package/index.js +25 -0
- package/dist/package/index.js.map +1 -0
- package/dist/package/mdx/render-astro.d.ts +18 -0
- package/dist/package/mdx/render-astro.d.ts.map +1 -0
- package/dist/package/mdx/render-astro.js +75 -0
- package/dist/package/mdx/render-astro.js.map +1 -0
- package/dist/package/mdx/render.d.ts +13 -0
- package/dist/package/mdx/render.d.ts.map +1 -0
- package/dist/package/mdx/render.js +37 -0
- package/dist/package/mdx/render.js.map +1 -0
- package/dist/react/AdPreview.d.ts +26 -0
- package/dist/react/AdPreview.d.ts.map +1 -0
- package/dist/react/AdPreview.js +8 -0
- package/dist/react/AdPreview.js.map +1 -0
- package/dist/react/AdPreviewPair.d.ts +7 -0
- package/dist/react/AdPreviewPair.d.ts.map +1 -0
- package/dist/react/AdPreviewPair.js +5 -0
- package/dist/react/AdPreviewPair.js.map +1 -0
- package/dist/react/AuditFindings.d.ts +14 -0
- package/dist/react/AuditFindings.d.ts.map +1 -0
- package/dist/react/AuditFindings.js +5 -0
- package/dist/react/AuditFindings.js.map +1 -0
- package/dist/react/AuditScores.d.ts +12 -0
- package/dist/react/AuditScores.d.ts.map +1 -0
- package/dist/react/AuditScores.js +25 -0
- package/dist/react/AuditScores.js.map +1 -0
- package/dist/react/AuthorCard.d.ts +10 -0
- package/dist/react/AuthorCard.d.ts.map +1 -0
- package/dist/react/AuthorCard.js +6 -0
- package/dist/react/AuthorCard.js.map +1 -0
- package/dist/react/BeforeAfter.d.ts +12 -0
- package/dist/react/BeforeAfter.d.ts.map +1 -0
- package/dist/react/BeforeAfter.js +7 -0
- package/dist/react/BeforeAfter.js.map +1 -0
- package/dist/react/BlogBehaviors.d.ts +10 -0
- package/dist/react/BlogBehaviors.d.ts.map +1 -0
- package/dist/react/BlogBehaviors.js +20 -0
- package/dist/react/BlogBehaviors.js.map +1 -0
- package/dist/react/CTABanner.d.ts +8 -0
- package/dist/react/CTABanner.d.ts.map +1 -0
- package/dist/react/CTABanner.js +9 -0
- package/dist/react/CTABanner.js.map +1 -0
- package/dist/react/CalloutBox.d.ts +13 -0
- package/dist/react/CalloutBox.d.ts.map +1 -0
- package/dist/react/CalloutBox.js +9 -0
- package/dist/react/CalloutBox.js.map +1 -0
- package/dist/react/CaseStudyHero.d.ts +20 -0
- package/dist/react/CaseStudyHero.d.ts.map +1 -0
- package/dist/react/CaseStudyHero.js +7 -0
- package/dist/react/CaseStudyHero.js.map +1 -0
- package/dist/react/ChannelMixBars.d.ts +18 -0
- package/dist/react/ChannelMixBars.d.ts.map +1 -0
- package/dist/react/ChannelMixBars.js +6 -0
- package/dist/react/ChannelMixBars.js.map +1 -0
- package/dist/react/Checklist.d.ts +10 -0
- package/dist/react/Checklist.d.ts.map +1 -0
- package/dist/react/Checklist.js +7 -0
- package/dist/react/Checklist.js.map +1 -0
- package/dist/react/ChecklistItem.d.ts +7 -0
- package/dist/react/ChecklistItem.d.ts.map +1 -0
- package/dist/react/ChecklistItem.js +5 -0
- package/dist/react/ChecklistItem.js.map +1 -0
- package/dist/react/CodeSnippet.d.ts +17 -0
- package/dist/react/CodeSnippet.d.ts.map +1 -0
- package/dist/react/CodeSnippet.js +14 -0
- package/dist/react/CodeSnippet.js.map +1 -0
- package/dist/react/ComparisonTable.d.ts +22 -0
- package/dist/react/ComparisonTable.d.ts.map +1 -0
- package/dist/react/ComparisonTable.js +35 -0
- package/dist/react/ComparisonTable.js.map +1 -0
- package/dist/react/Definition.d.ts +9 -0
- package/dist/react/Definition.d.ts.map +1 -0
- package/dist/react/Definition.js +19 -0
- package/dist/react/Definition.js.map +1 -0
- package/dist/react/DeliveryComparison.d.ts +16 -0
- package/dist/react/DeliveryComparison.d.ts.map +1 -0
- package/dist/react/DeliveryComparison.js +7 -0
- package/dist/react/DeliveryComparison.js.map +1 -0
- package/dist/react/FAQList.d.ts +20 -0
- package/dist/react/FAQList.d.ts.map +1 -0
- package/dist/react/FAQList.js +19 -0
- package/dist/react/FAQList.js.map +1 -0
- package/dist/react/FurtherReading.d.ts +21 -0
- package/dist/react/FurtherReading.d.ts.map +1 -0
- package/dist/react/FurtherReading.js +13 -0
- package/dist/react/FurtherReading.js.map +1 -0
- package/dist/react/ImageFeature.d.ts +9 -0
- package/dist/react/ImageFeature.d.ts.map +1 -0
- package/dist/react/ImageFeature.js +6 -0
- package/dist/react/ImageFeature.js.map +1 -0
- package/dist/react/Infographic.d.ts +6 -0
- package/dist/react/Infographic.d.ts.map +1 -0
- package/dist/react/Infographic.js +7 -0
- package/dist/react/Infographic.js.map +1 -0
- package/dist/react/KeyMetric.d.ts +16 -0
- package/dist/react/KeyMetric.d.ts.map +1 -0
- package/dist/react/KeyMetric.js +15 -0
- package/dist/react/KeyMetric.js.map +1 -0
- package/dist/react/KeywordTable.d.ts +18 -0
- package/dist/react/KeywordTable.d.ts.map +1 -0
- package/dist/react/KeywordTable.js +23 -0
- package/dist/react/KeywordTable.js.map +1 -0
- package/dist/react/List.d.ts +11 -0
- package/dist/react/List.d.ts.map +1 -0
- package/dist/react/List.js +21 -0
- package/dist/react/List.js.map +1 -0
- package/dist/react/MetricHighlight.d.ts +15 -0
- package/dist/react/MetricHighlight.d.ts.map +1 -0
- package/dist/react/MetricHighlight.js +26 -0
- package/dist/react/MetricHighlight.js.map +1 -0
- package/dist/react/NewsletterCTA.d.ts +9 -0
- package/dist/react/NewsletterCTA.d.ts.map +1 -0
- package/dist/react/NewsletterCTA.js +5 -0
- package/dist/react/NewsletterCTA.js.map +1 -0
- package/dist/react/NumberedCard.d.ts +9 -0
- package/dist/react/NumberedCard.d.ts.map +1 -0
- package/dist/react/NumberedCard.js +7 -0
- package/dist/react/NumberedCard.js.map +1 -0
- package/dist/react/ProConBlock.d.ts +6 -0
- package/dist/react/ProConBlock.d.ts.map +1 -0
- package/dist/react/ProConBlock.js +7 -0
- package/dist/react/ProConBlock.js.map +1 -0
- package/dist/react/ProseList.d.ts +17 -0
- package/dist/react/ProseList.d.ts.map +1 -0
- package/dist/react/ProseList.js +26 -0
- package/dist/react/ProseList.js.map +1 -0
- package/dist/react/QuoteBlock.d.ts +17 -0
- package/dist/react/QuoteBlock.d.ts.map +1 -0
- package/dist/react/QuoteBlock.js +26 -0
- package/dist/react/QuoteBlock.js.map +1 -0
- package/dist/react/RegionCallout.d.ts +13 -0
- package/dist/react/RegionCallout.d.ts.map +1 -0
- package/dist/react/RegionCallout.js +5 -0
- package/dist/react/RegionCallout.js.map +1 -0
- package/dist/react/RelatedPosts.d.ts +20 -0
- package/dist/react/RelatedPosts.d.ts.map +1 -0
- package/dist/react/RelatedPosts.js +7 -0
- package/dist/react/RelatedPosts.js.map +1 -0
- package/dist/react/ResultsStrip.d.ts +18 -0
- package/dist/react/ResultsStrip.d.ts.map +1 -0
- package/dist/react/ResultsStrip.js +22 -0
- package/dist/react/ResultsStrip.js.map +1 -0
- package/dist/react/ScoreBar.d.ts +8 -0
- package/dist/react/ScoreBar.d.ts.map +1 -0
- package/dist/react/ScoreBar.js +6 -0
- package/dist/react/ScoreBar.js.map +1 -0
- package/dist/react/SerpPreview.d.ts +18 -0
- package/dist/react/SerpPreview.d.ts.map +1 -0
- package/dist/react/SerpPreview.js +13 -0
- package/dist/react/SerpPreview.js.map +1 -0
- package/dist/react/ServicePromoCard.d.ts +14 -0
- package/dist/react/ServicePromoCard.d.ts.map +1 -0
- package/dist/react/ServicePromoCard.js +12 -0
- package/dist/react/ServicePromoCard.js.map +1 -0
- package/dist/react/StatCard.d.ts +13 -0
- package/dist/react/StatCard.d.ts.map +1 -0
- package/dist/react/StatCard.js +20 -0
- package/dist/react/StatCard.js.map +1 -0
- package/dist/react/StepBlock.d.ts +8 -0
- package/dist/react/StepBlock.d.ts.map +1 -0
- package/dist/react/StepBlock.js +5 -0
- package/dist/react/StepBlock.js.map +1 -0
- package/dist/react/TableOfContents.d.ts +14 -0
- package/dist/react/TableOfContents.d.ts.map +1 -0
- package/dist/react/TableOfContents.js +12 -0
- package/dist/react/TableOfContents.js.map +1 -0
- package/dist/react/TimelineBlock.d.ts +14 -0
- package/dist/react/TimelineBlock.d.ts.map +1 -0
- package/dist/react/TimelineBlock.js +8 -0
- package/dist/react/TimelineBlock.js.map +1 -0
- package/dist/react/TipBox.d.ts +6 -0
- package/dist/react/TipBox.d.ts.map +1 -0
- package/dist/react/TipBox.js +5 -0
- package/dist/react/TipBox.js.map +1 -0
- package/dist/react/TrafficChart.d.ts +16 -0
- package/dist/react/TrafficChart.d.ts.map +1 -0
- package/dist/react/TrafficChart.js +14 -0
- package/dist/react/TrafficChart.js.map +1 -0
- package/dist/react/VerdictCard.d.ts +15 -0
- package/dist/react/VerdictCard.d.ts.map +1 -0
- package/dist/react/VerdictCard.js +5 -0
- package/dist/react/VerdictCard.js.map +1 -0
- package/dist/react/components-map.d.ts +133 -0
- package/dist/react/components-map.d.ts.map +1 -0
- package/dist/react/components-map.js +120 -0
- package/dist/react/components-map.js.map +1 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +13 -0
- package/dist/react/index.js.map +1 -0
- package/package.json +116 -0
- package/react/AdPreview.tsx +94 -0
- package/react/AdPreviewPair.tsx +16 -0
- package/react/AuditFindings.tsx +43 -0
- package/react/AuditScores.tsx +73 -0
- package/react/AuthorCard.tsx +35 -0
- package/react/BeforeAfter.tsx +27 -0
- package/react/BlogBehaviors.tsx +21 -0
- package/react/CTABanner.tsx +32 -0
- package/react/CalloutBox.tsx +31 -0
- package/react/CaseStudyHero.tsx +71 -0
- package/react/ChannelMixBars.tsx +50 -0
- package/react/Checklist.tsx +31 -0
- package/react/ChecklistItem.tsx +19 -0
- package/react/CodeSnippet.tsx +36 -0
- package/react/ComparisonTable.tsx +114 -0
- package/react/Definition.tsx +36 -0
- package/react/DeliveryComparison.tsx +62 -0
- package/react/FAQList.tsx +61 -0
- package/react/FurtherReading.tsx +46 -0
- package/react/ImageFeature.tsx +26 -0
- package/react/Infographic.tsx +18 -0
- package/react/KeyMetric.tsx +61 -0
- package/react/KeywordTable.tsx +92 -0
- package/react/List.tsx +58 -0
- package/react/MetricHighlight.tsx +86 -0
- package/react/NewsletterCTA.tsx +48 -0
- package/react/NumberedCard.tsx +7 -0
- package/react/ProConBlock.tsx +42 -0
- package/react/ProseList.tsx +72 -0
- package/react/QuoteBlock.tsx +89 -0
- package/react/RegionCallout.tsx +38 -0
- package/react/RelatedPosts.tsx +58 -0
- package/react/ResultsStrip.tsx +77 -0
- package/react/ScoreBar.tsx +27 -0
- package/react/SerpPreview.tsx +59 -0
- package/react/ServicePromoCard.tsx +43 -0
- package/react/StatCard.tsx +62 -0
- package/react/StepBlock.tsx +5 -0
- package/react/TableOfContents.tsx +27 -0
- package/react/TimelineBlock.tsx +35 -0
- package/react/TipBox.tsx +16 -0
- package/react/TrafficChart.tsx +79 -0
- package/react/VerdictCard.tsx +60 -0
- package/react/components-map.ts +122 -0
- package/react/index.ts +13 -0
- package/templates/blogkit/app/api/blogkit/revalidate/route.ts.tmpl +32 -0
- package/templates/blogkit/app/blog/[slug]/page.tsx.tmpl +41 -0
- package/templates/blogkit/app/blog/page.tsx.tmpl +18 -0
- package/templates/blogkit/blogkit.config.ts.tmpl +23 -0
- package/templates/blogkit-astro/BLOGKIT_ASTRO_SETUP.md.tmpl +49 -0
- package/templates/blogkit-astro/src/blogkit.config.ts.tmpl +29 -0
- package/templates/blogkit-astro/src/pages/api/blogkit/revalidate.ts.tmpl +46 -0
- package/templates/blogkit-astro/src/pages/blog/[slug].astro.tmpl +39 -0
- package/templates/blogkit-astro/src/pages/blog/index.astro.tmpl +29 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineConfig } from "@highjumpdigitalsoftware/blog-kit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* blog-kit configuration for __BRAND__.
|
|
5
|
+
*
|
|
6
|
+
* SOURCE — where articles come from:
|
|
7
|
+
* "hjd-api" : pull from High Jump Digital's content API (managed, live updates).
|
|
8
|
+
* URL + token resolve from BLOGKIT_CONTENT_URL / BLOGKIT_SITE_TOKEN.
|
|
9
|
+
* "local" : read .mdx from content/posts/ in this repo (the EJECTED state).
|
|
10
|
+
*
|
|
11
|
+
* To eject later, flip mode to "local" and run `npx @highjumpdigitalsoftware/blog-kit eject`
|
|
12
|
+
* (downloads posts + images to this repo). Nothing else changes.
|
|
13
|
+
*/
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
source: { mode: "__MODE__" },
|
|
16
|
+
brand: { name: "__BRAND__" },
|
|
17
|
+
listing: {
|
|
18
|
+
listingBasePath: "/blog",
|
|
19
|
+
articleBasePath: "/blog",
|
|
20
|
+
pageSize: 12,
|
|
21
|
+
},
|
|
22
|
+
freshness: { revalidate: 60 },
|
|
23
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# blog-kit on Astro — finish wiring (__BRAND__)
|
|
2
|
+
|
|
3
|
+
`npx @highjumpdigitalsoftware/blog-kit connect` scaffolded your `/blog` routes + config. Two
|
|
4
|
+
manual steps remain because they touch your `astro.config` and your host.
|
|
5
|
+
|
|
6
|
+
## 1. Run Astro in SSR mode (required)
|
|
7
|
+
|
|
8
|
+
The managed blog pulls content from our API at **request time** so new posts
|
|
9
|
+
appear with **no redeploy**. That needs an on-demand (SSR) server, not a static
|
|
10
|
+
export. In `astro.config.mjs`:
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import { defineConfig } from "astro/config";
|
|
14
|
+
import node from "@astrojs/node"; // or @astrojs/vercel, @astrojs/netlify, etc.
|
|
15
|
+
|
|
16
|
+
export default defineConfig({
|
|
17
|
+
output: "server", // SSR — the blog renders on demand
|
|
18
|
+
adapter: node({ mode: "standalone" }),
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Install the adapter for your host:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx astro add node # generic Node server (Replit, Railway, a VPS)
|
|
26
|
+
# or: npx astro add vercel / netlify / cloudflare
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
> The `/blog` and `/blog/[slug]` routes set `export const prerender = false`, so
|
|
30
|
+
> only the blog is server-rendered — the rest of your site can stay static if
|
|
31
|
+
> you prefer `output: "hybrid"`.
|
|
32
|
+
|
|
33
|
+
## 2. Set the secrets on your host
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
BLOGKIT_CONTENT_URL = <your per-tenant content URL>
|
|
37
|
+
BLOGKIT_SITE_TOKEN = <your site token> # secret — never commit
|
|
38
|
+
BLOGKIT_REVALIDATE_SECRET = <optional> # enables instant publish updates
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
On Replit use the Secrets panel; on Vercel/Netlify use Environment Variables.
|
|
42
|
+
(`connect` wrote them to `.env` for local dev — your host needs its own copy.)
|
|
43
|
+
|
|
44
|
+
## 3. Deploy + verify
|
|
45
|
+
|
|
46
|
+
Deploy once. Visit `/blog` — your articles render, pulled live from our API.
|
|
47
|
+
Publish a new article in the High Jump Digital app and it appears within
|
|
48
|
+
`freshness.revalidate` seconds (or instantly if `BLOGKIT_REVALIDATE_SECRET` is
|
|
49
|
+
set). No redeploy, ever.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineConfig } from "@highjumpdigitalsoftware/blog-kit/astro";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* blog-kit configuration for __BRAND__ (Astro).
|
|
5
|
+
*
|
|
6
|
+
* SOURCE — where articles come from:
|
|
7
|
+
* "hjd-api" : pull from High Jump Digital's content API (managed, live updates).
|
|
8
|
+
* URL + token resolve from BLOGKIT_CONTENT_URL / BLOGKIT_SITE_TOKEN.
|
|
9
|
+
* "local" : read .mdx from content/posts/ in this repo (the EJECTED state).
|
|
10
|
+
*
|
|
11
|
+
* FRESHNESS — Astro has no ISR. Run this site in SSR mode
|
|
12
|
+
* (`output: 'server'` in astro.config) so the blog is always fresh with no
|
|
13
|
+
* redeploy. `freshness.revalidate` is the in-process cache TTL (seconds) the
|
|
14
|
+
* kit uses to avoid hitting our API on every request; the scaffolded
|
|
15
|
+
* /api/blogkit/revalidate endpoint busts it instantly on publish.
|
|
16
|
+
*
|
|
17
|
+
* To eject later, flip mode to "local" and run `npx @highjumpdigitalsoftware/blog-kit eject`
|
|
18
|
+
* (downloads posts + images to this repo). Nothing else changes.
|
|
19
|
+
*/
|
|
20
|
+
export default defineConfig({
|
|
21
|
+
source: { mode: "__MODE__" },
|
|
22
|
+
brand: { name: "__BRAND__" },
|
|
23
|
+
listing: {
|
|
24
|
+
listingBasePath: "/blog",
|
|
25
|
+
articleBasePath: "/blog",
|
|
26
|
+
pageSize: 12,
|
|
27
|
+
},
|
|
28
|
+
freshness: { revalidate: 60 },
|
|
29
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// blog-kit on-demand revalidation endpoint (Astro). Scaffolded by `npx @highjumpdigitalsoftware/blog-kit connect`.
|
|
2
|
+
// High Jump Digital POSTs here on publish to bust the kit's freshness cache
|
|
3
|
+
// instantly (otherwise the cache refreshes within `freshness.revalidate`
|
|
4
|
+
// seconds on the next request — Astro's ISR-equivalent).
|
|
5
|
+
//
|
|
6
|
+
// Astro has no `revalidatePath`; in SSR the "cache" is the kit's in-process
|
|
7
|
+
// freshness store, so revalidation = clearBlogkitCache(). After it clears, the
|
|
8
|
+
// very next request re-fetches from the content API.
|
|
9
|
+
//
|
|
10
|
+
// Auth: a shared secret in BLOGKIT_REVALIDATE_SECRET, sent as the
|
|
11
|
+
// `x-blogkit-secret` header. Without the secret set the endpoint refuses, so an
|
|
12
|
+
// un-provisioned site can't have its cache poked.
|
|
13
|
+
import type { APIRoute } from "astro";
|
|
14
|
+
import { clearBlogkitCache } from "@highjumpdigitalsoftware/blog-kit/astro";
|
|
15
|
+
|
|
16
|
+
export const prerender = false;
|
|
17
|
+
|
|
18
|
+
export const POST: APIRoute = async ({ request }) => {
|
|
19
|
+
const secret = import.meta.env.BLOGKIT_REVALIDATE_SECRET;
|
|
20
|
+
if (!secret) {
|
|
21
|
+
return new Response(
|
|
22
|
+
JSON.stringify({ ok: false, error: "not_configured" }),
|
|
23
|
+
{ status: 503, headers: { "content-type": "application/json" } },
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
if (request.headers.get("x-blogkit-secret") !== secret) {
|
|
27
|
+
return new Response(
|
|
28
|
+
JSON.stringify({ ok: false, error: "unauthorized" }),
|
|
29
|
+
{ status: 401, headers: { "content-type": "application/json" } },
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let body: { slug?: string } = {};
|
|
34
|
+
try {
|
|
35
|
+
body = await request.json();
|
|
36
|
+
} catch {
|
|
37
|
+
/* empty body = revalidate everything */
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
clearBlogkitCache();
|
|
41
|
+
|
|
42
|
+
return new Response(
|
|
43
|
+
JSON.stringify({ ok: true, revalidated: body.slug ?? "all" }),
|
|
44
|
+
{ status: 200, headers: { "content-type": "application/json" } },
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
// blog-kit article route (/blog/[slug]) — Astro SSR. Scaffolded by `npx @highjumpdigitalsoftware/blog-kit connect`.
|
|
3
|
+
//
|
|
4
|
+
// The MDX body is fetched from the content API and COMPILED AT REQUEST TIME
|
|
5
|
+
// (see @highjumpdigitalsoftware/blog-kit/astro -> renderMdxToHtml), so a freshly published
|
|
6
|
+
// post renders with no redeploy. SSR + dynamic [slug] means unknown slugs
|
|
7
|
+
// render on demand — no getStaticPaths needed.
|
|
8
|
+
import "@highjumpdigitalsoftware/blog-kit/styles.css";
|
|
9
|
+
import { resolveConfig, loadArticle } from "@highjumpdigitalsoftware/blog-kit/astro";
|
|
10
|
+
import Article from "@highjumpdigitalsoftware/blog-kit/astro/Article.astro";
|
|
11
|
+
import rawConfig from "../../blogkit.config";
|
|
12
|
+
|
|
13
|
+
export const prerender = false; // SSR — render the post at request time
|
|
14
|
+
|
|
15
|
+
const config = resolveConfig(rawConfig);
|
|
16
|
+
const { slug } = Astro.params;
|
|
17
|
+
const data = slug ? await loadArticle(config, slug) : null;
|
|
18
|
+
|
|
19
|
+
if (!data) {
|
|
20
|
+
return new Response("Not found", { status: 404 });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const { post } = data;
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<html lang="en">
|
|
27
|
+
<head>
|
|
28
|
+
<meta charset="utf-8" />
|
|
29
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
30
|
+
<title>{post.title} · {config.brand.name}</title>
|
|
31
|
+
<meta name="description" content={post.description} />
|
|
32
|
+
</head>
|
|
33
|
+
<body>
|
|
34
|
+
<main style="max-width:900px;margin:0 auto;padding:120px 20px 80px">
|
|
35
|
+
<h1 style="margin-bottom:24px">{post.title}</h1>
|
|
36
|
+
<Article data={data} config={config} />
|
|
37
|
+
</main>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
// blog-kit listing route (/blog) — Astro SSR. Scaffolded by `npx @highjumpdigitalsoftware/blog-kit connect`.
|
|
3
|
+
//
|
|
4
|
+
// SSR (output:'server') = always fresh: new posts appear with NO redeploy
|
|
5
|
+
// (the kit's freshness cache serves cached for `freshness.revalidate` seconds,
|
|
6
|
+
// and the /api/blogkit/revalidate endpoint busts it instantly on publish).
|
|
7
|
+
import "@highjumpdigitalsoftware/blog-kit/styles.css";
|
|
8
|
+
import { resolveConfig, loadIndex } from "@highjumpdigitalsoftware/blog-kit/astro";
|
|
9
|
+
import BlogIndex from "@highjumpdigitalsoftware/blog-kit/astro/BlogIndex.astro";
|
|
10
|
+
import rawConfig from "../../blogkit.config";
|
|
11
|
+
|
|
12
|
+
export const prerender = false; // SSR — pulls from the content API at request time
|
|
13
|
+
|
|
14
|
+
const config = resolveConfig(rawConfig);
|
|
15
|
+
const data = await loadIndex(config, 1);
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<html lang="en">
|
|
19
|
+
<head>
|
|
20
|
+
<meta charset="utf-8" />
|
|
21
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
22
|
+
<title>Blog · {config.brand.name}</title>
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<main style="max-width:1100px;margin:0 auto;padding:80px 20px">
|
|
26
|
+
<BlogIndex data={data} config={config} />
|
|
27
|
+
</main>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|