Compare commits

...

7 commits

Author SHA1 Message Date
array-in-a-matrix b9967c6ae9 remove unused css 2024-01-11 21:09:00 -05:00
array-in-a-matrix 1656ce4e53 comment 2024-01-11 21:08:44 -05:00
array-in-a-matrix fad49a03cd README 2024-01-11 20:29:54 -05:00
array-in-a-matrix 989a81295b README 2024-01-11 20:29:15 -05:00
array-in-a-matrix eaf30ffc48 vscode extensions 2024-01-11 19:53:48 -05:00
array-in-a-matrix bc60b3a8ba enable IntelliSense and type checking 2024-01-11 19:43:23 -05:00
array-in-a-matrix 9ec321cb6c cleaning off filth 2024-01-11 19:40:02 -05:00
5 changed files with 37 additions and 62 deletions

View file

@ -1,4 +1,12 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"recommendations": [
"astro-build.astro-vscode",
"unifiedjs.vscode-mdx",
"formulahendry.auto-rename-tag",
"aaron-bond.better-comments",
"oderwat.indent-rainbow",
"ms-vscode.vscode-typescript-next",
"davidanson.vscode-markdownlint"
],
"unwantedRecommendations": []
}

View file

@ -1,68 +1,37 @@
# Astro Starter Kit: Blog
# Blog in a Matrix
New blog site using [Astro](https://astro.build/).
## Workflow
Articles are written in markdown or MDX (I am using [Joplin](https://github.com/laurent22/joplin/)) then exported to `/src/content/blog`. The site can render [$\KaTeX$](https://katex.org/) and [Mermaid](https://mermaid.js.org/) content.
## Development
### Setup
Install dependencies:
```sh
npm create astro@latest -- --template blog
pnpm import
```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/blog)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/blog/devcontainer.json)
### Dev Server
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
Start a development server using the following command:
![blog](https://github.com/withastro/astro/assets/2244813/ff10799f-a816-4703-b967-c78997e8323d)
Features:
- ✅ Minimal styling (make it your own!)
- ✅ 100/100 Lighthouse performance
- ✅ SEO-friendly with canonical URLs and OpenGraph data
- ✅ Sitemap support
- ✅ RSS Feed support
- ✅ Markdown & MDX support
## 🚀 Project Structure
Inside of your Astro project, you'll see the following folders and files:
```text
├── public/
├── src/
│   ├── components/
│   ├── content/
│   ├── layouts/
│   └── pages/
├── astro.config.mjs
├── README.md
├── package.json
└── tsconfig.json
```sh
pnpm dev --open --host
```
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
The site should be now accessible at [http://localhost:4321/](http://localhost:4321/). A specific port can be specified using `--port` flag.
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
### Build
The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more.
Build deployable site:
Any static assets, like images, can be placed in the `public/` directory.
```sh
pnpm astro build
```
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## 👀 Want to learn more?
Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
## Credit
This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).
Built site can now be found at `/dist`.

View file

@ -46,4 +46,5 @@ const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.url)} />
<!-- KaTeX Stylesheet -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">

View file

@ -44,10 +44,6 @@ import { SITE_TITLE } from '../consts';
text-decoration: none;
border-bottom-color: var(--accent);
}
.social-links,
.social-links a {
display: flex;
}
@media (max-width: 720px) {
.social-links {
display: none;

View file

@ -1,6 +1,7 @@
{
"extends": "astro/tsconfigs/base",
"compilerOptions": {
"strictNullChecks": true
"strictNullChecks": true,
"allowJs": true
}
}