{frontmatter.title}
46 | {frontmatter.pubDate && } 47 | {frontmatter.updatedDate &&49 |
├── .gitattributes
├── .gitignore
├── .tina
├── __generated__
│ ├── .gitignore
│ ├── _graphql.json
│ ├── _lookup.json
│ └── _schema.json
└── config.ts
├── README.md
├── astro.config.mjs
├── package-lock.json
├── package.json
├── public
├── admin
│ └── .gitignore
├── favicon.svg
├── mdx-component.png
├── placeholder-about.jpg
├── placeholder-hero.jpg
├── placeholder-social.jpg
└── robots.txt
├── src
├── components
│ ├── BaseHead.astro
│ ├── Counter.astro
│ ├── Footer.astro
│ ├── Header.astro
│ ├── HeaderLink.astro
│ └── VueCounter.vue
├── config.ts
├── content
│ ├── first-post.mdx
│ ├── markdown-style-guide.mdx
│ ├── second-post.mdx
│ ├── third-post.mdx
│ └── using-mdx.mdx
├── env.d.ts
├── layouts
│ └── BlogPost.astro
├── pages
│ ├── [slug].astro
│ ├── about.md
│ ├── blog.astro
│ ├── index.astro
│ └── rss.xml.js
└── styles
│ └── global.css
└── tsconfig.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist/
3 |
4 | # dependencies
5 | node_modules/
6 |
7 | # logs
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 | pnpm-debug.log*
12 |
13 |
14 | # environment variables
15 | .env
16 | .env.production
17 |
18 | # macOS-specific files
19 | .DS_Store
20 |
--------------------------------------------------------------------------------
/.tina/__generated__/.gitignore:
--------------------------------------------------------------------------------
1 | app
2 | db
3 | prebuild
4 | client.ts
5 | client.js
6 | types.ts
7 | types.js
8 | types.d.ts
9 | frags.gql
10 | queries.gql
11 | schema.gql
12 | out.jsx
13 |
--------------------------------------------------------------------------------
/.tina/__generated__/_graphql.json:
--------------------------------------------------------------------------------
1 | {"kind":"Document","definitions":[{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"Reference"},"description":{"kind":"StringValue","value":"References another document, used as a foreign key"},"directives":[]},{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"JSON"},"description":{"kind":"StringValue","value":""},"directives":[]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"SystemInfo"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"filename"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"title"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"basename"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"breadcrumbs"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"excludeExtension"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"path"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"relativePath"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"extension"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"template"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"collection"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Collection"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"PageInfo"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"hasPreviousPage"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"hasNextPage"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"startCursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"endCursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"InterfaceTypeDefinition","description":{"kind":"StringValue","value":""},"name":{"kind":"Name","value":"Node"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}]},{"kind":"InterfaceTypeDefinition","description":{"kind":"StringValue","value":""},"name":{"kind":"Name","value":"Document"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_sys"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"SystemInfo"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_values"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}}]},{"kind":"InterfaceTypeDefinition","description":{"kind":"StringValue","value":"A relay-compliant pagination connection"},"name":{"kind":"Name","value":"Connection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"totalCount"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PageInfo"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"Query"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"getOptimizedQuery"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"queryString"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"collection"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Collection"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"collections"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Collection"}}}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"node"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"id"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Node"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"document"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"post"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Post"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"postConnection"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"before"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"first"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"last"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"sort"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"filter"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostFilter"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostConnection"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DocumentFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"post"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostFilter"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"DocumentConnectionEdges"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Connection"}}],"directives":[],"name":{"kind":"Name","value":"DocumentConnection"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PageInfo"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"totalCount"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentConnectionEdges"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"Collection"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"slug"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"label"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"path"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"format"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"matches"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"templates"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"fields"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"documents"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"before"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"first"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"last"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"sort"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"filter"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentFilter"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentConnection"}}}}]},{"kind":"UnionTypeDefinition","name":{"kind":"Name","value":"DocumentNode"},"directives":[],"types":[{"kind":"NamedType","name":{"kind":"Name","value":"Post"}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Node"}},{"kind":"NamedType","name":{"kind":"Name","value":"Document"}}],"directives":[],"name":{"kind":"Name","value":"Post"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"title"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"description"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"heroImage"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"pubDate"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"body"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_sys"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SystemInfo"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"_values"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"StringFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"startsWith"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"eq"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"exists"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"in"},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"ImageFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"startsWith"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"eq"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"exists"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"in"},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DatetimeFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"before"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"eq"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"exists"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"in"},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostBodyCounterFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"variableExample"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostBodyFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"Counter"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostBodyCounterFilter"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostFilter"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"title"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"description"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StringFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"heroImage"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ImageFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"pubDate"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DatetimeFilter"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"body"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostBodyFilter"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"PostConnectionEdges"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"Post"}}}]},{"kind":"ObjectTypeDefinition","interfaces":[{"kind":"NamedType","name":{"kind":"Name","value":"Connection"}}],"directives":[],"name":{"kind":"Name","value":"PostConnection"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PageInfo"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"totalCount"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostConnectionEdges"}}}}]},{"kind":"ObjectTypeDefinition","interfaces":[],"directives":[],"name":{"kind":"Name","value":"Mutation"},"fields":[{"kind":"FieldDefinition","name":{"kind":"Name","value":"addPendingDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"template"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"updateDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"deleteDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"createDocument"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"collection"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DocumentNode"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"updatePost"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Post"}}}},{"kind":"FieldDefinition","name":{"kind":"Name","value":"createPost"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"relativePath"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"params"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PostMutation"}}}}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Post"}}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"DocumentMutation"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"post"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PostMutation"}}}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"PostMutation"},"fields":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"title"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"description"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"heroImage"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"pubDate"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"InputValueDefinition","name":{"kind":"Name","value":"body"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"JSON"}}}]}]}
--------------------------------------------------------------------------------
/.tina/__generated__/_lookup.json:
--------------------------------------------------------------------------------
1 | {"DocumentConnection":{"type":"DocumentConnection","resolveType":"multiCollectionDocumentList","collections":["post"]},"Node":{"type":"Node","resolveType":"nodeDocument"},"DocumentNode":{"type":"DocumentNode","resolveType":"multiCollectionDocument","createDocument":"create","updateDocument":"update"},"Post":{"type":"Post","resolveType":"collectionDocument","collection":"post","createPost":"create","updatePost":"update"},"PostConnection":{"type":"PostConnection","resolveType":"collectionDocumentList","collection":"post"}}
--------------------------------------------------------------------------------
/.tina/__generated__/_schema.json:
--------------------------------------------------------------------------------
1 | {"version":{"fullVersion":"0.63.15","major":"0","minor":"63","patch":"15"},"meta":{"flags":["experimentalData","isomorphicGitBridge"]},"collections":[{"name":"post","label":"Posts","path":"src/content","format":"mdx","fields":[{"type":"string","name":"title","label":"Title","isTitle":true,"namespace":["post","title"]},{"type":"string","name":"description","label":"Description","namespace":["post","description"]},{"type":"image","name":"heroImage","label":"Hero Image","namespace":["post","heroImage"]},{"type":"datetime","name":"pubDate","label":"Publish Date","ui":{"dateFormat":"DD MMMM YYYY"},"namespace":["post","pubDate"]},{"type":"rich-text","name":"body","label":"Body","isBody":true,"templates":[{"name":"Counter","label":"Counter","fields":[{"name":"variableExample","label":"Variable Example","type":"string","namespace":["post","body","Counter","variableExample"]}],"namespace":["post","body","Counter"]}],"namespace":["post","body"]}],"namespace":["post"]}],"config":{"media":{"tina":{"publicFolder":"public","mediaRoot":"uploads"}}}}
--------------------------------------------------------------------------------
/.tina/config.ts:
--------------------------------------------------------------------------------
1 |
2 | import { defineStaticConfig } from "tinacms";
3 |
4 | // Your hosting provider likely exposes this as an environment variable
5 | const branch = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "main";
6 |
7 | export default defineStaticConfig({
8 | branch,
9 | clientId: null, // Get this from tina.io
10 | token: null, // Get this from tina.io
11 | build: {
12 | outputFolder: "admin",
13 | publicFolder: "public",
14 | },
15 | media: {
16 | tina: {
17 | mediaRoot: "uploads",
18 | publicFolder: "public",
19 | },
20 | },
21 | schema: {
22 | collections: [
23 | {
24 | name: "post",
25 | label: "Posts",
26 | path: "src/content",
27 | format: 'mdx',
28 | fields: [
29 | {
30 | type: "string",
31 | name: "title",
32 | label: "Title",
33 | isTitle: true,
34 | required: true,
35 | },{
36 | type: "string",
37 | name: "description",
38 | label: "Description",
39 | },{
40 | type: "image",
41 | name: "heroImage",
42 | label: "Hero Image",
43 | },{
44 | type: "datetime",
45 | name: "pubDate",
46 | label: "Publish Date",
47 | ui: {
48 | dateFormat: "DD MMMM YYYY"
49 | },
50 | },{
51 | type: "rich-text",
52 | name: "body",
53 | label: "Body",
54 | isBody: true,
55 | templates: [
56 | {
57 | name: "Counter",
58 | label: "Counter",
59 | fields: [
60 | {
61 | name: "variableExample",
62 | label: "Variable Example",
63 | type: "string",
64 | }
65 | ],
66 | },
67 | ],
68 | }
69 | ],
70 | },
71 | ],
72 | },
73 | });
74 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Astro Blog + TinaCMS Starter Kit ❤️
2 |
3 | This template is based on Astro's official [Blog Example](https://github.com/withastro/astro/tree/latest/examples/blog), a lightweight, minimally-styled starting point for creating a fast and SEO-friendly blog with [Astro](https://astro.build).
4 |
5 | It incorporates a few small changes to accommodate [Tina](https://tina.io/), an open-source, Git-backed headless CMS which supports [MDX components](https://mdxjs.com/).
6 |
7 | 
8 |
9 | Features:
10 |
11 | - ✅ Minimal styling (make it your own!)
12 | - ✅ 100/100 Lighthouse performance
13 | - ✅ SEO-friendly with canonical URLs and OpenGraph data
14 | - ✅ Sitemap & RSS feed support
15 | - ✅ Markdown & MDX support
16 | - ✅ A modern headless CMS for editing rich content
17 |
18 | ## 🚀 Project Structure
19 |
20 | Inside of your Astro project, you'll see the following folders and files:
21 |
22 | ```
23 | ├── public/
24 | ├── src/
25 | │ ├── components/
26 | │ ├── content/
27 | │ ├── layouts/
28 | │ └── pages/
29 | ├── astro.config.mjs
30 | ├── README.md
31 | ├── package.json
32 | └── tsconfig.json
33 | ```
34 |
35 | Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
36 |
37 | The `[slug].astro` file is a [dynamic route](https://docs.astro.build/en/core-concepts/routing/#dynamic-routes). This generates a page based on each `*.{md,mdx}` blog post in the `src/content` directory and exposes it on the root (e.g. `localhost:3000/using-mdx`). **This is the content which is managed as a collection in Tina**.
38 |
39 | If you require the ability to edit *all* content in Tina (e.g. the About page, or a second collection), this is easy. Simply define [a new collection](https://tina.io/docs/schema/) in `.tina/config.ts`.
40 |
41 | There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
42 |
43 | Any static assets, like images, can be placed in the `public/` directory.
44 |
45 | ## 😎 MDX Components
46 |
47 | This template includes one example of an [MDX custom component](https://docs.astro.build/en/guides/integrations-guide/mdx/#custom-components): a simple counter built with Vue 3. This demonstrates how you can add rich interactive components to your markdown content - including components with input parameters - *and* edit them via the CMS!
48 |
49 | 
50 |
51 | Creating new components for use in Tina is easy. First define your component using React, Vue, or any of the [UI frameworks](https://docs.astro.build/en/guides/integrations-guide/) supported by Astro, then `import` it and add it to the `components` prop in the blog post template (`[slug].astro`). Next add it to your Tina schema in `.tina/config.ts` [as a template](https://tina.io/docs/editing/markdown/#defining-a-template-in-a-collection) in your `body` field.
52 |
53 | This will make it available to content editors under the 'Embed' menu in Tina CMS.
54 |
55 | ## ✍️ Tina CMS
56 |
57 | Tina offers a fantastic editing experience which includes support for MDX components, setting it apart from many competitors. Thanks to the simple and accessible UI (and the ability to edit without a Git account thanks to [Tina Cloud](https://tina.io/docs/product-tour/#tina-cloud), rich interactivity can be added to pages by non-technical users.
58 |
59 | However, because Astro isn't NextJS-based, we do lose the ability to do full contextual editing and to see previews (for the time being...). You can read more about the non-React mode of Tina [in their documentation](https://tina.io/guides/tinacms/non-react-based-ssg/guide/).
60 |
61 | ## 🧞 Commands
62 |
63 | All commands are run from the root of the project, from a terminal:
64 |
65 | | Command | Action |
66 | | :--------------------- | :---------------------------------------------------- |
67 | | `npm install` | Installs dependencies |
68 | | `npm run dev` | Starts Astro's local dev server at `localhost:3000` |
69 | | `npm run build` | Build your production site to `./dist/` |
70 | | `npm run preview` | Preview your build locally, before deploying |
71 | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
72 | | `npm run astro --help` | Get help using the Astro CLI |
73 | | `npm run tina` | Initialises Tina at `localhost:3000/admin/index.html` |
74 |
75 | ## 👀 Want to learn more?
76 |
77 | Check out [Astro's documentation](https://docs.astro.build) or jump into their [Discord server](https://astro.build/chat).
78 |
79 | To learn more about Tina, the next-gen version of Forestry CMS, check out the [Tina docs](https://tina.io/docs/) or join their [Discord server](https://discord.com/invite/zumN63Ybpf).
80 |
81 | If you found this template useful, please consider **submitting a PR**.
82 |
83 | ## Credit
84 |
85 | This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).
86 |
--------------------------------------------------------------------------------
/astro.config.mjs:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'astro/config';
2 | import mdx from '@astrojs/mdx';
3 | import sitemap from '@astrojs/sitemap';
4 | import vue from "@astrojs/vue";
5 |
6 | // https://astro.build/config
7 | export default defineConfig({
8 | site: 'https://example.com',
9 | integrations: [mdx(), sitemap(), vue()]
10 | });
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "astro-tina-starter",
3 | "type": "module",
4 | "version": "0.0.1",
5 | "scripts": {
6 | "dev": "astro dev",
7 | "start": "astro dev",
8 | "build": "astro build",
9 | "preview": "astro preview",
10 | "astro": "astro",
11 | "tina": "tinacms dev -c \"astro dev\""
12 | },
13 | "dependencies": {
14 | "@astrojs/mdx": "^0.11.4",
15 | "@astrojs/rss": "^1.0.2",
16 | "@astrojs/sitemap": "^1.0.0",
17 | "@astrojs/vue": "^1.2.0",
18 | "@tinacms/cli": "^0.61.24",
19 | "astro": "^1.5.1",
20 | "tinacms": "^0.69.18",
21 | "vue": "^3.2.41"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/public/admin/.gitignore:
--------------------------------------------------------------------------------
1 | index.html
2 | assets/
--------------------------------------------------------------------------------
/public/favicon.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/public/mdx-component.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tombennet/astro-tina-starter/82454aebfc7c8aef45f68cc39e96568506869aac/public/mdx-component.png
--------------------------------------------------------------------------------
/public/placeholder-about.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tombennet/astro-tina-starter/82454aebfc7c8aef45f68cc39e96568506869aac/public/placeholder-about.jpg
--------------------------------------------------------------------------------
/public/placeholder-hero.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tombennet/astro-tina-starter/82454aebfc7c8aef45f68cc39e96568506869aac/public/placeholder-hero.jpg
--------------------------------------------------------------------------------
/public/placeholder-social.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tombennet/astro-tina-starter/82454aebfc7c8aef45f68cc39e96568506869aac/public/placeholder-social.jpg
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tombennet/astro-tina-starter/82454aebfc7c8aef45f68cc39e96568506869aac/public/robots.txt
--------------------------------------------------------------------------------
/src/components/BaseHead.astro:
--------------------------------------------------------------------------------
1 | ---
2 | // Import the global.css file here so that it is included on
3 | // all pages through the use of the
Test
70 | 71 | 72 | ``` 73 | 74 | ## List Types 75 | 76 | #### Ordered List 77 | 78 | 1. First item 79 | 2. Second item 80 | 3. Third item 81 | 82 | #### Unordered List 83 | 84 | * List item 85 | * Another item 86 | * And another item 87 | 88 | #### Nested list 89 | 90 | * Fruit 91 | * Apple 92 | * Orange 93 | * Banana 94 | * Dairy 95 | * Milk 96 | * Cheese 97 | 98 | -------------------------------------------------------------------------------- /src/content/second-post.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Second post 3 | description: Lorem ipsum dolor sit amet 4 | heroImage: /placeholder-hero.jpg 5 | pubDate: '2022-07-21T23:00:00.000Z' 6 | --- 7 | 8 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet. 9 | 10 | Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi. 11 | 12 | Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed risus pretium quam vulputate. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Fringilla urna porttitor rhoncus dolor purus non. Amet dictum sit amet justo donec enim. 13 | 14 | Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi. 15 | 16 | Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna. 17 | -------------------------------------------------------------------------------- /src/content/third-post.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Third post 3 | description: Lorem ipsum dolor sit amet 4 | heroImage: /placeholder-hero.jpg 5 | pubDate: '2022-07-14T23:00:00.000Z' 6 | --- 7 | 8 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet. 9 | 10 | Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa ultricies mi. 11 | 12 | Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed risus pretium quam vulputate. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Fringilla urna porttitor rhoncus dolor purus non. Amet dictum sit amet justo donec enim. 13 | 14 | Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi. 15 | 16 | Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique magna. 17 | -------------------------------------------------------------------------------- /src/content/using-mdx.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Using MDX 3 | description: Lorem ipsum dolor sit amet 4 | heroImage: /placeholder-hero.jpg 5 | pubDate: '2022-07-01T23:00:00.000Z' 6 | --- 7 | 8 | This theme comes with the [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/ "") integration installed and configured in your `astro.config.mjs` config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file. 9 | 10 | ## Why MDX? 11 | 12 | MDX is a special flavor of Markdown that supports embedded JavaScript & JSX syntax. This unlocks the ability to [mix JavaScript and UI Components into your Markdown content](https://docs.astro.build/en/guides/markdown-content/#mdx-features "") for things like interactive charts or alerts. 13 | 14 | If you have existing content authored in MDX, this integration will hopefully make migrating to Astro a breeze. 15 | 16 | ## Example 17 | 18 | Here is how you import and use a UI component inside of MDX. 19 | 20 | When you open this page in the browser, you should see the clickable buttons below. 21 | 22 |18 | Welcome to your Astro blog starter template, modified 19 | to support Tina CMS. This template serves as a lightweight, 20 | minimally-styled starting point for anyone looking to build a personal website or blog with Astro. 21 |
22 |
23 | This template comes with a few integrations already configured in your
24 | astro.config.mjs
file. You can customize your setup with
25 | Astro Integrations to add tools like Tailwind,
26 | React, or Vue to your project.
27 |
Here are a few ideas on how to get started with the template:
29 |npm run tina
then head to /admin/index.htmlsrc/pages/index.astro
src/components/Header.astro
src/components/Footer.astro
src/content/
src/layouts/BlogPost.astro
38 | If you get stuck, remember to read the Astro docs 40 | or join them on Discord to ask questions. 41 | For help with the CMS, check out the Tina documentation 42 | or join their Discord server. 43 |
44 |Have fun! I'm Tom Bennet - if you would like to suggest 45 | improvements to this template, please consider 46 | submitting a PR. 47 |
48 |