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

Update: blog template #4283

Merged
merged 6 commits into from Aug 13, 2022
Merged

Update: blog template #4283

merged 6 commits into from Aug 13, 2022

Conversation

FredKSchott
Copy link
Member

@FredKSchott FredKSchott commented Aug 12, 2022

Changes

  • New blog template!
  • Intentionally minimally styled.
  • Starter content added.
  • Image and MDX integrations added by default.
  • Based off of Bear Blog theme CSS (MIT Licensed, credited in the readme and attributed in global.css).

Screenshots

Screen Shot 2022-08-11 at 10 58 32 PM

Screen Shot 2022-08-11 at 10 59 46 PM

Screen Shot 2022-08-11 at 10 59 53 PM

Testing

  • N/A

Docs

  • N/A

@changeset-bot
Copy link

changeset-bot bot commented Aug 12, 2022

⚠️ No Changeset found

Latest commit: b2bb473

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: example Related to an example package (scope) label Aug 12, 2022
examples/blog/README.md Outdated Show resolved Hide resolved
examples/blog/src/components/Header.astro Outdated Show resolved Hide resolved
examples/blog/src/pages/index.astro Outdated Show resolved Hide resolved
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Wow"

This is great, @FredKSchott! A few comments sprinkled throughout. (Namely, let's make sure we remove all references to building a HUGO blog...) but I love it!

examples/blog/src/pages/blog/markdown-style-guide.md Outdated Show resolved Hide resolved
Comment on lines +41 to +46
#### Blockquote with attribution

> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>

[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update this to something relevant to us? Fred, do you have a favourite moment from a talk?

examples/blog/src/pages/blog/second-post.md Outdated Show resolved Hide resolved
examples/blog/src/pages/blog/markdown-style-guide.md Outdated Show resolved Hide resolved
examples/blog/src/pages/blog/first-post.md Outdated Show resolved Hide resolved
examples/blog/src/pages/blog/third-post.md Outdated Show resolved Hide resolved
examples/blog/src/pages/blog/using-mdx.mdx Outdated Show resolved Hide resolved
examples/blog/src/pages/blog/using-mdx.mdx Outdated Show resolved Hide resolved
examples/blog/src/pages/blog/using-mdx.mdx Outdated Show resolved Hide resolved
examples/blog/src/pages/index.astro Outdated Show resolved Hide resolved
@Princesseuh
Copy link
Member

Make sure to run astro check on this when it's done, I don't think it passes it at the moment!

@@ -0,0 +1,25 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand we want to keep config minimal, but adding an MDX example that doesn't show any MDX features feels a little wrong. If we don't want to add a component integration, that's fair! But at least importing and using .astro component, or accessing frontmatter via JSX expressions, would be helpful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I had the same thought. I would also add another heading under Usage with a similar very short explanation re: importing and using a component.

We do have the MDX starter already (though not as visible), so this can be just a Markdown starter if we want to go that route. (Is there value in having one?) I do think our "add MDX" path is straightfoward and well-documented enough that I don't worry about people adding it if they want. Just depends what you want people to get by default, using create-astro.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had originally put an .astro component with a https://www.npmjs.com/package/canvas-confetti button, but then realized that our Astro.glob() on the blog page was pulling that script into the blog page itself. This is a known side-effect of Astro.glob(), but it felt too problematic to bring into a starter template (at least until we fix it).

I'll do it with one of the existing header links for now.

Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Agree with the feedback here.

I pushed some updates to the default images to align them with our brand better. Also I have some very small tweaks (adding one media query) to the stylesheet that would enable a dark mode if you're up for it? Didn't want to push that without asking.

Feel free to cherry-pick 3044fec if you want

Light Dark
CleanShot 2022-08-12 at 10 12 19@2x CleanShot 2022-08-12 at 10 12 10@2x

@FredKSchott
Copy link
Member Author

re dark mode: If the user doesn't see this for themselves, we run the risk of this surprising the developer / not realizing it was supported. I think I'd be +1 if we also added a dark mode toggle to the page UI, but then we'd want to do that without a framework since some of the feedback we got was about this feeling like a "preact template" since it had a preact component in it originally.

@FredKSchott
Copy link
Member Author

Thanks for the feedback everyone! I hate that our current blog template is broken on MDX, so I'm going to merge this so that it's not still broken over the weekend.

@FredKSchott FredKSchott merged commit d54588c into main Aug 13, 2022
@FredKSchott FredKSchott deleted the new-blog-template branch August 13, 2022 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants