Compare commits
7 Commits
102d4716e0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a8d5ca5196 | |||
| 7af4c821c9 | |||
| 597b49d5a6 | |||
| 5e13636094 | |||
| 9eb7dda047 | |||
| b2d21088cb | |||
| 15601e7bd4 |
@@ -1,54 +1,7 @@
|
|||||||
# Astro Starter Kit: Basics
|
# The Clog
|
||||||
|
|
||||||
```sh
|
Add blog content to `src/content`.
|
||||||
npm create astro@latest -- --template basics
|
|
||||||
```
|
|
||||||
|
|
||||||
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
|
Preview locally with `pnpm dev`.
|
||||||
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
|
|
||||||
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
|
|
||||||
|
|
||||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
To deploy, run `pnpm run build` then `wrangler pages deploy`.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 🚀 Project Structure
|
|
||||||
|
|
||||||
Inside of your Astro project, you'll see the following folders and files:
|
|
||||||
|
|
||||||
```text
|
|
||||||
/
|
|
||||||
├── public/
|
|
||||||
│ └── favicon.svg
|
|
||||||
├── src/
|
|
||||||
│ ├── components/
|
|
||||||
│ │ └── Card.astro
|
|
||||||
│ ├── layouts/
|
|
||||||
│ │ └── Layout.astro
|
|
||||||
│ └── pages/
|
|
||||||
│ └── index.astro
|
|
||||||
└── package.json
|
|
||||||
```
|
|
||||||
|
|
||||||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
|
|
||||||
|
|
||||||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
|
|
||||||
|
|
||||||
Any static assets, like images, can be placed in the `public/` directory.
|
|
||||||
|
|
||||||
## 🧞 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?
|
|
||||||
|
|
||||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ const { title } = Astro.props;
|
|||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="text-brand-1">
|
<body class="text-brand-1 p-0 m-0">
|
||||||
<LeftRightSplit class="px-8">
|
<LeftRightSplit class="px-8 bg-brand-12 border-b-groove border-width-1 border-brand-10 mb-4">
|
||||||
<Heading slot="left"><a href="/" class="text-brand-3 decoration-none">The Clog</a></Heading>
|
<Heading slot="left"><a href="/" class="text-brand-3 decoration-none">The Clog</a></Heading>
|
||||||
<Row slot="right" >
|
<Row slot="right" >
|
||||||
<NavLink href="/journal">Journal</NavLink>
|
<NavLink href="/journal">Journal</NavLink>
|
||||||
|
|||||||
+18
-3
@@ -1,11 +1,26 @@
|
|||||||
---
|
---
|
||||||
import Layout from '../layouts/Layout.astro';
|
import Layout from '../layouts/Layout.astro';
|
||||||
import Hero from 'fulldev-ui/blocks/Hero.astro';
|
import LeftRightSplit from '../structure/LeftRightSplit.astro';
|
||||||
|
import NavLink from '../widgets/NavLink.astro';
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="The Clog">
|
<Layout title="The Clog">
|
||||||
<main>
|
<main>
|
||||||
<Hero
|
<LeftRightSplit class="px-4 align-center">
|
||||||
|
<div slot="left" class="text-center w-full my-auto">
|
||||||
|
<p>The Coding Blog</p>
|
||||||
|
<h1 class="text-4xl font-bold text-brand-3">Welcome to The Clog</h1>
|
||||||
|
<p>A practical coding blog in the form of journal entries and articles.</p>
|
||||||
|
<div>
|
||||||
|
<NavLink href="/journal">Journal</NavLink>
|
||||||
|
<NavLink href="/articles">Articles</NavLink>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div slot="right" class="h-auto max-h-dvh max-w-full w-full my-auto">
|
||||||
|
<img src="/hero.png" class="object-contain" />
|
||||||
|
</div>
|
||||||
|
</LeftRightSplit>
|
||||||
|
<!-- <Hero
|
||||||
badge="The Coding Blog"
|
badge="The Coding Blog"
|
||||||
heading="Welcome to The Clog"
|
heading="Welcome to The Clog"
|
||||||
text="A practical coding blog in the form of journal entries and articles."
|
text="A practical coding blog in the form of journal entries and articles."
|
||||||
@@ -16,6 +31,6 @@ import Hero from 'fulldev-ui/blocks/Hero.astro';
|
|||||||
structure="split"
|
structure="split"
|
||||||
image="/hero.png"
|
image="/hero.png"
|
||||||
class:list={["p-space-6"]}
|
class:list={["p-space-6"]}
|
||||||
/>
|
/> -->
|
||||||
</main>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
import { getCollection } from 'astro:content';
|
import { getCollection } from 'astro:content';
|
||||||
import Layout from '../../layouts/Layout.astro';
|
import Layout from '../../layouts/Layout.astro';
|
||||||
import Section from 'fulldev-ui/components/Section.astro';
|
|
||||||
import Text from 'fulldev-ui/components/Text.astro';
|
|
||||||
|
|
||||||
|
|
||||||
const journalEntries = await getCollection('journal-entries');
|
const journalEntries = await getCollection('journal-entries');
|
||||||
@@ -11,7 +9,16 @@ export const prerender = true;
|
|||||||
---
|
---
|
||||||
<Layout title="Journal Entries">
|
<Layout title="Journal Entries">
|
||||||
<main>
|
<main>
|
||||||
<Section
|
<div class="flex gap-4 flex-wrap">
|
||||||
|
{journalEntries.map((journalEntry)=>(
|
||||||
|
<div class="w-64 border-solid border-brand-3 border-width-1 rounded-2 px-2 py-1 bg-brand-12 opacity-80">
|
||||||
|
<p>{journalEntry.data.date.toISOString().substring(0,10)} <span class="border-solid border-brand-3 border-width-1 rounded-100 px-2 py-1">{journalEntry.data.category}</span></p>
|
||||||
|
<h3><a class="text-brand-3 decoration-none" href={`/journal/${journalEntry.slug}`}>{journalEntry.data.title}</a></h3>
|
||||||
|
<p>{journalEntry.data.description}</p>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<!-- <Section
|
||||||
title="Journal Entries"
|
title="Journal Entries"
|
||||||
cards={journalEntries.map((journalEntry)=>({
|
cards={journalEntries.map((journalEntry)=>({
|
||||||
frame:"panel",
|
frame:"panel",
|
||||||
@@ -30,6 +37,6 @@ export const prerender = true;
|
|||||||
structure="grid"
|
structure="grid"
|
||||||
size="md"
|
size="md"
|
||||||
>
|
>
|
||||||
</Section>
|
</Section> -->
|
||||||
</main>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
||||||
Reference in New Issue
Block a user