Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mdx support and several changes #5

Merged
merged 4 commits into from
Feb 12, 2024
Merged

Mdx support and several changes #5

merged 4 commits into from
Feb 12, 2024

Conversation

IsTheMartin
Copy link
Owner

Mdx files supported

  • Mdx plugin was added to Astro. The project can render mdx and md files.
  • Latest post is displayed on index.astro as main page.
  • Content collection API is used to query posts pages. env.d.ts and tsconfig.json were modified.
  • A template page was created to host markdown contents [...slug].astro.

Other changes

  • Poppins font was added to project.
  • global.css was modified to include new font a some UI changes.
  • Aliases were added to reduce import path in pages, components and layouts.
  • Navigation was added to list all posts, it is on Footer component
  • Post's title redirect to home.

Fixes

These aliases help to reduce paths in imports.
From `../../layouts/Layout.astro` to
`@layouts/Layout.astro`.

tsconfig.json was modified to register aliases.
Gonna start with easy things. A new custom font was
added: Poppins.

Then I added a Mdx plugin, so package json files
were modified. Index content "Take off" was moved
to mdx file.

Latest post was displayed into index.astro file by
using content collection API. I had to modified
env.d.ts file and tsconfig.json.

To display dynamically the posts (mdx files), a
template file was created ([...slug].astro). And a
layout was created for posts.
Updated navigation to display all posts sorted by date.
Footer contains the navigation.

Clicking post's title, site will redirect to home.

And styles were updated.
A new alias was added for styles folder `@styles/*`,
some pages were changed to use this new alias.
@IsTheMartin IsTheMartin added bug Something isn't working enhancement New feature or request labels Feb 12, 2024
@IsTheMartin IsTheMartin self-assigned this Feb 12, 2024
@IsTheMartin IsTheMartin merged commit 76b1d9b into dev Feb 12, 2024
@IsTheMartin IsTheMartin deleted the mdx branch February 12, 2024 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant