Personal blog. https://scottgallant.me
This is the Smashing Magazine template, and this template has zero styling or media implementation.
Install the project's dependencies:
yarn install
Run the project locally:
yarn dev
.tina
folder:
__generated__
: This contains all the Tina generated types, queries, fragments and schema.components
: This contains the TinaProvider.jsx
and TinaDynamicProvider.jsx
. The TinaDynamicProvider
is used to wrap the whole _app.tsx
with Tina but will only be used when in edit mode.models
: This contains all of the collections for the Tina schema. If you change any of the content files, frontmatter names, update them here.queries
: This file holds all the graphQL queries that retrieve article data, article data by category, or author.schema.ts
: This file defines Tina's configuration and where you define the schema. The schema is made up of all the models in the models
folder.utils.ts
: This holds filenameToLabel
function that turns the filename into a label for use in the Tina CMS UI.components
folder:
mdx-components
: This contains all of the MDX components used for Smashing Magazine articles. For example CaptionedImage
.layout
: This is a basic layout file that Smashing Magazine can remove at any point, the Tina Team used it to create the navigation elements at the top of the page for the demo.pages
folder:
articles/
: This contains an index.tsx
and [slug].tsx
.
index.tsx
will display all of the articles.[slug].tsx
is a dynamic route that will show the article selected.authors/
: This contains an index.tsx
and [author].tsx
.
index.tsx
displays all of the authors[author].tsx
displays all articles written by the author selected.categories/
: This contains an index.tsx
and [category].tsx
.
index.tsx
displays all of the categories[category].tsx
displays all articles for the selected category._app.tsx
: This page is where Next.js handles pages for the application. This is also wrapped in <DynamicTina>
which allows the editing experience.admin.tsx
: This route allows a user to log in to Tina to create or edit content.index.tsx
: The index page shows both featured articles and any other ones that aren't featured.The content
folder can be found at the root of the project and is based upon the original smashing magazine content folder:
The content folder has two sub folders content
and data
:
content
folder has the following sub folders:
articles
: Contains all the article MDX articlescommunity-highlights
: Currently emptyguides
: Currently emptythe-smashing-newsletter
: Currently emptydata
folder has the following sub folders:
authors
: Contains all the authors markdown files.categories
: Contains all the categories markdown filesMDX components are the equivalent of Hugo shortcodes.
2 sample components have been created for demonstration: pullQuote
& captionedImage
To add a new MDX component:
components/mdx-components