Skip to content

Commit 7d228c6

Browse files
committed
first commit from blogster
0 parents  commit 7d228c6

File tree

85 files changed

+28606
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+28606
-0
lines changed

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
21+
# yarn
22+
.pnp.*
23+
.yarn/*
24+
!.yarn/patches
25+
!.yarn/plugins
26+
!.yarn/releases
27+
!.yarn/sdks
28+
!.yarn/versions

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Blogster
2+
3+
Theme: **bubblegum**
4+
5+
Blogster is a collection of beautiful, accessible and performant blog templates built with [Astro](https://astro.build) and [Markdoc](https://markdoc.dev).
6+
7+
Check out the demo here - [Blogster bubblegum template](https://blogster-bubblegum.netlify.app).
8+
9+
## Bubblegum Template
10+
11+
A beautiful, performant and accessible theme built with [Tailwind](https://tailwindcss.com).
12+
13+
- **Fast**. Fast by default. Astro websites are engineered to be fast and load before you could blink, even when not cached.
14+
- **Dark mode**. All themes have light/dark mode built-in.
15+
- **Mobile first**. Responsive and loads fast in all devices.
16+
- **Accessible**. A well thought out semantic and accessible content.
17+
- **Perfect lighthouse score.** 100 across the board.
18+
- **Easy content authoring**. Author content using markdown (`.md`) from your code editor or directly in GitHub.
19+
- **Extended markdown with [Markdoc](https://markdoc.dev).** Type-safe custom components like YouTube embed, Twitter embed (or anything you want really) in your markdown (`.md`) files.
20+
- **RSS feed**. Your blog has an RSS feed setup that can be accessed at `/rss.xml`.
21+
- **SEO**. All pages are setup with all the SEO you might need.
22+
23+
## How do I add content?
24+
25+
All the content is written in markdown (.md) and grouped as `blog` or `projects` in the `content` directory. All the default markdown syntax will work. You also have a few example custom markdown elements like _YouTube embed_, _Twitter embed_, etc. You can create your own custom components too in two easy steps.
26+
27+
1. Add a markdoc config. Check out the markdoc config in [src/lib/markdoc/config.ts](src/lib/markdoc/config.ts) to learn how to add custom components.
28+
2. Add a component to render your custom component. Check out the Renderer in [src/components/Renderer.astro](src/components/Renderer.astro).
29+
30+
## How do I make it my blog?
31+
32+
Easy.
33+
34+
- All content is static and everything is straight forward. Change whatever you need to change.
35+
- Delete or update the content in `content/{content-group}`. `content-group` could be `blog`, `projects` or `anything`.
36+
- (Optional) If you need more content types like _Notes_, just create a new dir in `content` and add a new frontmatter validator like [src/lib/markdoc/blog/frontmatter](src/lib/markdoc/blog/frontmatter).
37+
38+
## How do I deploy?
39+
40+
`yarn build` will generate a static website in `dist` dir. You can host it with any static hosting. If you need a recommendation, check out [Netlify](netlify.com).
41+
42+
## Credit
43+
44+
Thanks to other templates that inspired this theme.
45+
46+
- [Official Astro Blog template](https://github.com/withastro/astro/tree/main/examples/blog)
47+
48+
## License
49+
50+
MIT © [Dinesh Pandiyan](https://github.com/flexdinesh)

astro.config.mjs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* eslint-disable turbo/no-undeclared-env-vars */
2+
import { defineConfig } from "astro/config";
3+
import sitemap from "@astrojs/sitemap";
4+
import tailwind from "@astrojs/tailwind";
5+
6+
/*
7+
We are doing some URL mumbo jumbo here to tell Astro what the URL of your website will be.
8+
In local development, your SEO meta tags will have localhost URL.
9+
In built production websites, your SEO meta tags should have your website URL.
10+
So we give our website URL here and the template will know what URL to use
11+
for meta tags during build.
12+
If you don't know your website URL yet, don't worry about this
13+
and leave it empty or use localhost URL. It won't break anything.
14+
*/
15+
16+
const SERVER_PORT = 3000;
17+
// the url to access your blog during local development
18+
const LOCALHOST_URL = `http://localhost:${SERVER_PORT}`;
19+
// the url to access your blog after deploying it somewhere (Eg. Netlify)
20+
const LIVE_URL = "https://yourwebsiteurl.com";
21+
// this is the astro command your npm script runs
22+
const SCRIPT = process.env.npm_lifecycle_script || "";
23+
const isBuild = SCRIPT.includes("astro build");
24+
let BASE_URL = LOCALHOST_URL;
25+
// When you're building your site in local or in CI, you could just set your URL manually
26+
if (isBuild) {
27+
BASE_URL = LIVE_URL;
28+
}
29+
30+
export default defineConfig({
31+
server: { port: SERVER_PORT },
32+
site: BASE_URL,
33+
integrations: [
34+
sitemap(),
35+
tailwind({
36+
config: { applyBaseStyles: false },
37+
}),
38+
],
39+
});
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
external: false
3+
title: "Basic markdown style guide"
4+
description: "You can author content using the familiar markdown syntax you already know. All basic markdown syntax is supported."
5+
date: 2022-11-02
6+
---
7+
8+
Markdown is powered by [Markdoc](https://markdoc.dev/). This is an example post to demonstrate all the basic markdown syntax. You can author content using the familiar markdown syntax you already know.
9+
10+
## Inline formatting
11+
12+
Bold: **This text is bold**.
13+
14+
Italics: _This text is italics_.
15+
16+
Strikethrough: You can ~~strikethrough~~ text.
17+
18+
Inline code: You can add inline code like this `const hello = "world"`.
19+
20+
## Headings
21+
22+
The following HTML `<h2>``<h6>` elements represent five levels of section headings. `<h1>` is also available but not recommended since the post title is already a `<h1>` element it is not a good practice to have more than one `<h1>` elements in a page.
23+
24+
## H2: Heading Two
25+
26+
### H3: Heading Three
27+
28+
#### H4: Heading Four
29+
30+
##### H5: Heading Five
31+
32+
###### H6: Heading Six
33+
34+
## Paragraph
35+
36+
A standalone single paragraph of text.
37+
38+
Paragraphs can be multiline too when they constitute words that make up more than one line, i.e they wrap to the next line. Wow! I am really smart to write two lines of text that makes zero sense.
39+
40+
## Blockquotes
41+
42+
> This is a blockquote. And it's pretty long too. Long enough to wrap to next line. Surely it will wrap.
43+
44+
> You can use other Markdown syntax like `inline code` within a blockquote.
45+
46+
## Tables
47+
48+
| Italics | Bold | Code |
49+
| --------- | -------- | ------ |
50+
| _italics_ | **bold** | `code` |
51+
52+
## List Types
53+
54+
### Ordered List
55+
56+
1. First item
57+
2. Second item
58+
3. Third item
59+
60+
### Unordered List
61+
62+
- List item
63+
- Another item
64+
- And another item
65+
66+
### Nested list
67+
68+
- Fruit
69+
- Apple
70+
- Orange
71+
- Banana
72+
- Dairy
73+
- Milk
74+
- Cheese
75+
76+
## Code Blocks
77+
78+
Syntax highlighting is done using [Prism.js](https://github.com/PrismJS/prism). You can customise to whichever theme you want from the [plenty available prism themes](https://github.com/PrismJS/prism-themes).
79+
80+
```html
81+
<!DOCTYPE html>
82+
<html lang="en">
83+
<head>
84+
<meta charset="utf-8" />
85+
<title>Example HTML5 Document</title>
86+
</head>
87+
<body>
88+
<p>Test</p>
89+
</body>
90+
</html>
91+
```
92+
93+
## Images
94+
95+
![Blogster](/images/blogster.png)

content/blog/draft-post.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
external: false
3+
draft: true
4+
title: Draft Post
5+
description: This post is a draft and won't be built.
6+
date: 2022-11-22
7+
---
8+
9+
It's a beautiful world out there.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
external: false
3+
title: "Extended markdown style guide"
4+
description: "In addition to supporting all basic Markdoc syntax, this template also supports extended markdown syntax to render custom components."
5+
date: 2022-11-01
6+
---
7+
8+
This blog's markdown is powered by [Markdoc](https://markdoc.dev/). In addition to supporting all basic markdown syntax, this blog also supports extended syntax to render custom components that are not conventionally available via basic markdown. This post is an example to showcase all available extended markdown syntax.
9+
10+
## YouTube Video
11+
12+
You can embed YouTube videos in your blog posts.
13+
14+
{% youtube url="https://www.youtube-nocookie.com/embed/StTqXEQ2l-Y" label="Everything is awesome - Lego movie song" /%}
15+
16+
## Tweet
17+
18+
You can embed tweets in your blog posts.
19+
20+
{% tweet url="https://twitter.com/flexdinesh/status/1605685194312122370" /%}
21+
22+
## CodePen
23+
24+
You can embed codepens in your blog posts.
25+
26+
{% codepen url="https://codepen.io/ruphaa/pen/eYJqjgq" title="Ecosystem - Pen in CSS by Ruphaa" /%}
27+
28+
## GitHub Gist
29+
30+
You can embed GitHub gists in your blog posts.
31+
32+
{% githubgist id="d96064c9c4ef2e8ef71c90a10ffcf3b2" /%}
33+
34+
## Lesser Known HTML Elements
35+
36+
### abbr
37+
38+
{% abbr title="Graphics Interchange Format" %}GIF{% /abbr %} is a bitmap image format.
39+
40+
### sub
41+
42+
H{% sub %}2{% /sub %}O
43+
44+
### sup
45+
46+
X{% sup %}n{% /sup %} + Y{% sup %}n{% /sup %} = Z{% sup %}n{% /sup %}
47+
48+
### kbd
49+
50+
Press {% kbd %}{% kbd %}CTRL{% /kbd %}+{% kbd %}ALT{% /kbd %}+{% kbd %}Delete{% /kbd %}{% /kbd %} to end the session.
51+
52+
### mark
53+
54+
Most {% mark %}salamanders{% /mark %} are nocturnal, and hunt for insects, worms, and other small creatures.

content/blog/external-link-example.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
external: true
3+
url: https://medium.com/the-thinkmill/progressive-rendering-the-key-to-faster-web-ebfbbece41a4
4+
title: You can also link to an external blog post
5+
description: Safely access nested objects in JavaScript in a super cool way.
6+
date: 2019-11-11
7+
---

content/blog/hello-world.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
external: false
3+
draft: true
4+
title: Hello World
5+
description: It's a beautiful world out there.
6+
date: 2022-11-05
7+
---
8+
9+
It's a beautiful world out there.

content/blog/syntax-highlighting.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
external: false
3+
title: "Prism.js syntax highlighting for code blocks"
4+
description: "Code blocks are syntax highlighted using Prism.js"
5+
date: 2022-10-30
6+
---
7+
8+
Syntax highlighting is done using [Prism.js](https://github.com/PrismJS/prism) with the default [nord theme](https://github.com/PrismJS/prism-themes/blob/master/themes/prism-nord.css). You can customise to whichever theme you want from the [plenty available prism themes](https://github.com/PrismJS/prism-themes).
9+
10+
## HTML Code Block
11+
12+
An example `HTML` code block.
13+
14+
```html
15+
<!DOCTYPE html>
16+
<html lang="en">
17+
<head>
18+
<meta charset="utf-8" />
19+
<title>Example HTML5 Document</title>
20+
</head>
21+
<body>
22+
<p>Test</p>
23+
</body>
24+
</html>
25+
```
26+
27+
## JSX Code Block
28+
29+
An example `jsx` code block.
30+
31+
```jsx
32+
const Greet = () => {
33+
const message = `Hello World!`;
34+
return <div>{message}</div>;
35+
};
36+
```
37+
38+
## CSS Code Block
39+
40+
An example `css` code block.
41+
42+
```css
43+
.layout {
44+
display: grid;
45+
grid-template-columns: 5rem minmax(0, 1fr) 4rem;
46+
}
47+
```
48+
49+
...and many more. [Explore all the languages supported by Prism.js](https://prismjs.com/#supported-languages).
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: A design system boilerplate with multiple themes
3+
description: It's a beautiful world out there.
4+
date: 2022-02-13
5+
url: https://design-system-boilerplate.netlify.app
6+
---

0 commit comments

Comments
 (0)