feat: minor fixes
This commit is contained in:
parent
75d87f3afc
commit
ea4a453e25
|
@ -26,4 +26,4 @@ profile:
|
||||||
url: https://store.steampowered.com
|
url: https://store.steampowered.com
|
||||||
- name: GitHub
|
- name: GitHub
|
||||||
icon: fa6-brands:github
|
icon: fa6-brands:github
|
||||||
url: https://github.com
|
url: https://github.com/saicaca/fuwari
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "astro-vivia",
|
"name": "fuwari",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "",
|
"name": "fuwari",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -51,9 +51,9 @@ function formatDate(date: Date) {
|
||||||
return `${month}-${day}`;
|
return `${month}-${day}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatTag(tag: string[]) {
|
||||||
// console.log(groups)
|
return tag.map(t => `#${t}`).join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ function formatDate(date: Date) {
|
||||||
<div class="w-[15%] text-left text-sm transition
|
<div class="w-[15%] text-left text-sm transition
|
||||||
whitespace-nowrap overflow-ellipsis overflow-hidden
|
whitespace-nowrap overflow-ellipsis overflow-hidden
|
||||||
text-black/30 dark:text-white/30"
|
text-black/30 dark:text-white/30"
|
||||||
>#Test #Markdown</div>
|
>{formatTag(post.data.tags)}</div>
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -8,6 +8,6 @@ import {getConfig} from "../utils/config-utils";
|
||||||
<div class="text-black/50 dark:text-white/50 text-sm">
|
<div class="text-black/50 dark:text-white/50 text-sm">
|
||||||
© 2023 {getConfig().profile.author}. All Rights Reserved.
|
© 2023 {getConfig().profile.author}. All Rights Reserved.
|
||||||
<br>
|
<br>
|
||||||
Powered by Vivia
|
Powered by <a class="link text-[var(--primary)]" target="_blank" href="https://github.com/saicaca/fuwari">Fuwari</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -3,8 +3,13 @@ import { z, defineCollection } from "astro:content";
|
||||||
const blogCollection = defineCollection({
|
const blogCollection = defineCollection({
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
tags: z.array(z.string()),
|
published: z.date(),
|
||||||
cover: z.string().optional(),
|
description: z.string().optional(),
|
||||||
|
cover: z.object({
|
||||||
|
url: z.string(),
|
||||||
|
alt: z.string(),
|
||||||
|
}),
|
||||||
|
tags: z.array(z.string()).optional(),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
export const collections = {
|
export const collections = {
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
---
|
---
|
||||||
title: 'My Second Blog Post'
|
title: 'Cover Image Example'
|
||||||
published: 2021-07-01
|
published: 2022-09-09
|
||||||
description: 'This is the first post of my new Astro blog.'
|
description: 'How to set a cover image using the cover attribute.'
|
||||||
author: 'Astro Learner'
|
|
||||||
cover:
|
cover:
|
||||||
url: 'https://saicaca.github.io/vivia-preview/assets/79905307_p0.jpg'
|
url: 'https://saicaca.github.io/vivia-preview/assets/79905307_p0.jpg'
|
||||||
alt:
|
alt:
|
||||||
tags: ["astro", "blogging", "learning in public"]
|
tags: ["Fuwari", "Blogging", "Customization"]
|
||||||
---
|
---
|
||||||
# My First Blog Post
|
# My First Blog Post
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
---
|
|
||||||
title: 'My First Blog Post'
|
|
||||||
published: 2022-10-01
|
|
||||||
description: 'This is the first post of my new Astro blog.'
|
|
||||||
author: 'Astro Learner'
|
|
||||||
cover:
|
|
||||||
url:
|
|
||||||
alt:
|
|
||||||
tags: ["astro", "blogging", "learning in public"]
|
|
||||||
categories: ['Foo', 'Bar']
|
|
||||||
---
|
|
||||||
# My First Blog Post
|
|
||||||
|
|
||||||
Published on: 2022-07-01
|
|
||||||
|
|
||||||
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website.
|
|
||||||
|
|
||||||
## What I've accomplished
|
|
||||||
|
|
||||||
1. **Installing Astro**: First, I created a new Astro project and set up my online accounts.
|
|
||||||
|
|
||||||
2. **Making Pages**: I then learned how to make pages by creating new `.astro` files and placing them in the `src/pages/` folder.
|
|
||||||
|
|
||||||
3. **Making Blog Posts**: This is my first blog post! I now have Astro pages and Markdown posts!
|
|
||||||
|
|
||||||
## What's next
|
|
||||||
|
|
||||||
I will finish the Astro tutorial, and then keep adding more posts. Watch this space for more to come.
|
|
|
@ -1,27 +0,0 @@
|
||||||
---
|
|
||||||
title: 'My Third Blog Post'
|
|
||||||
published: 2020-07-01
|
|
||||||
description: 'This is the first post of my new Astro blog.'
|
|
||||||
author: 'Astro Learner'
|
|
||||||
cover:
|
|
||||||
url:
|
|
||||||
alt:
|
|
||||||
tags: ["astro", "blogging", "learning in public"]
|
|
||||||
---
|
|
||||||
# My First Blog Post
|
|
||||||
|
|
||||||
Published on: 2022-07-01
|
|
||||||
|
|
||||||
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website.
|
|
||||||
|
|
||||||
## What I've accomplished
|
|
||||||
|
|
||||||
1. **Installing Astro**: First, I created a new Astro project and set up my online accounts.
|
|
||||||
|
|
||||||
2. **Making Pages**: I then learned how to make pages by creating new `.astro` files and placing them in the `src/pages/` folder.
|
|
||||||
|
|
||||||
3. **Making Blog Posts**: This is my first blog post! I now have Astro pages and Markdown posts!
|
|
||||||
|
|
||||||
## What's next
|
|
||||||
|
|
||||||
I will finish the Astro tutorial, and then keep adding more posts. Watch this space for more to come.
|
|
|
@ -1,27 +0,0 @@
|
||||||
---
|
|
||||||
title: 'My Fourth Blog Post'
|
|
||||||
published: 2022-07-01
|
|
||||||
description: 'This is the first post of my new Astro blog.'
|
|
||||||
author: 'Astro Learner'
|
|
||||||
cover:
|
|
||||||
url:
|
|
||||||
alt:
|
|
||||||
tags: ["astro", "blogging", "learning in public"]
|
|
||||||
---
|
|
||||||
# My First Blog Post
|
|
||||||
|
|
||||||
Published on: 2022-07-01
|
|
||||||
|
|
||||||
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website.
|
|
||||||
|
|
||||||
## What I've accomplished
|
|
||||||
|
|
||||||
1. **Installing Astro**: First, I created a new Astro project and set up my online accounts.
|
|
||||||
|
|
||||||
2. **Making Pages**: I then learned how to make pages by creating new `.astro` files and placing them in the `src/pages/` folder.
|
|
||||||
|
|
||||||
3. **Making Blog Posts**: This is my first blog post! I now have Astro pages and Markdown posts!
|
|
||||||
|
|
||||||
## What's next
|
|
||||||
|
|
||||||
I will finish the Astro tutorial, and then keep adding more posts. Watch this space for more to come.
|
|
|
@ -0,0 +1,168 @@
|
||||||
|
---
|
||||||
|
title: Markdown Example
|
||||||
|
published: 2023-10-18
|
||||||
|
description: A simple example of a Markdown blog post.
|
||||||
|
cover:
|
||||||
|
url:
|
||||||
|
alt:
|
||||||
|
tags: [Markdown, Blogging, Demo]
|
||||||
|
categories: [Example]
|
||||||
|
---
|
||||||
|
|
||||||
|
An h1 header
|
||||||
|
============
|
||||||
|
|
||||||
|
Paragraphs are separated by a blank line.
|
||||||
|
|
||||||
|
2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
|
||||||
|
look like:
|
||||||
|
|
||||||
|
* this one
|
||||||
|
* that one
|
||||||
|
* the other one
|
||||||
|
|
||||||
|
Note that --- not considering the asterisk --- the actual text
|
||||||
|
content starts at 4-columns in.
|
||||||
|
|
||||||
|
> Block quotes are
|
||||||
|
> written like so.
|
||||||
|
>
|
||||||
|
> They can span multiple paragraphs,
|
||||||
|
> if you like.
|
||||||
|
|
||||||
|
Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
|
||||||
|
in chapters 12--14"). Three dots ... will be converted to an ellipsis.
|
||||||
|
Unicode is supported. ☺
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
An h2 header
|
||||||
|
------------
|
||||||
|
|
||||||
|
Here's a numbered list:
|
||||||
|
|
||||||
|
1. first item
|
||||||
|
2. second item
|
||||||
|
3. third item
|
||||||
|
|
||||||
|
Note again how the actual text starts at 4 columns in (4 characters
|
||||||
|
from the left side). Here's a code sample:
|
||||||
|
|
||||||
|
# Let me re-iterate ...
|
||||||
|
for i in 1 .. 10 { do-something(i) }
|
||||||
|
|
||||||
|
As you probably guessed, indented 4 spaces. By the way, instead of
|
||||||
|
indenting the block, you can use delimited blocks, if you like:
|
||||||
|
|
||||||
|
~~~
|
||||||
|
define foobar() {
|
||||||
|
print "Welcome to flavor country!";
|
||||||
|
}
|
||||||
|
~~~
|
||||||
|
|
||||||
|
(which makes copying & pasting easier). You can optionally mark the
|
||||||
|
delimited block for Pandoc to syntax highlight it:
|
||||||
|
|
||||||
|
~~~python
|
||||||
|
import time
|
||||||
|
# Quick, count to ten!
|
||||||
|
for i in range(10):
|
||||||
|
# (but not *too* quick)
|
||||||
|
time.sleep(0.5)
|
||||||
|
print i
|
||||||
|
~~~
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### An h3 header ###
|
||||||
|
|
||||||
|
Now a nested list:
|
||||||
|
|
||||||
|
1. First, get these ingredients:
|
||||||
|
|
||||||
|
* carrots
|
||||||
|
* celery
|
||||||
|
* lentils
|
||||||
|
|
||||||
|
2. Boil some water.
|
||||||
|
|
||||||
|
3. Dump everything in the pot and follow
|
||||||
|
this algorithm:
|
||||||
|
|
||||||
|
find wooden spoon
|
||||||
|
uncover pot
|
||||||
|
stir
|
||||||
|
cover pot
|
||||||
|
balance wooden spoon precariously on pot handle
|
||||||
|
wait 10 minutes
|
||||||
|
goto first step (or shut off burner when done)
|
||||||
|
|
||||||
|
Do not bump wooden spoon or it will fall.
|
||||||
|
|
||||||
|
Notice again how text always lines up on 4-space indents (including
|
||||||
|
that last line which continues item 3 above).
|
||||||
|
|
||||||
|
Here's a link to [a website](http://foo.bar), to a [local
|
||||||
|
doc](local-doc.html), and to a [section heading in the current
|
||||||
|
doc](#an-h2-header). Here's a footnote [^1].
|
||||||
|
|
||||||
|
[^1]: Footnote text goes here.
|
||||||
|
|
||||||
|
Tables can look like this:
|
||||||
|
|
||||||
|
size material color
|
||||||
|
---- ------------ ------------
|
||||||
|
9 leather brown
|
||||||
|
10 hemp canvas natural
|
||||||
|
11 glass transparent
|
||||||
|
|
||||||
|
Table: Shoes, their sizes, and what they're made of
|
||||||
|
|
||||||
|
(The above is the caption for the table.) Pandoc also supports
|
||||||
|
multi-line tables:
|
||||||
|
|
||||||
|
-------- -----------------------
|
||||||
|
keyword text
|
||||||
|
-------- -----------------------
|
||||||
|
red Sunsets, apples, and
|
||||||
|
other red or reddish
|
||||||
|
things.
|
||||||
|
|
||||||
|
green Leaves, grass, frogs
|
||||||
|
and other things it's
|
||||||
|
not easy being.
|
||||||
|
-------- -----------------------
|
||||||
|
|
||||||
|
A horizontal rule follows.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
Here's a definition list:
|
||||||
|
|
||||||
|
apples
|
||||||
|
: Good for making applesauce.
|
||||||
|
oranges
|
||||||
|
: Citrus!
|
||||||
|
tomatoes
|
||||||
|
: There's no "e" in tomatoe.
|
||||||
|
|
||||||
|
Again, text is indented 4 spaces. (Put a blank line between each
|
||||||
|
term/definition pair to spread things out more.)
|
||||||
|
|
||||||
|
Here's a "line block":
|
||||||
|
|
||||||
|
| Line one
|
||||||
|
| Line too
|
||||||
|
| Line tree
|
||||||
|
|
||||||
|
and images can be specified like so:
|
||||||
|
|
||||||
|
![example image](/images/demo-banner.jpg "An exemplary image")
|
||||||
|
|
||||||
|
Inline math equations go in like so: $\omega = d\phi / dt$. Display
|
||||||
|
math should get its own line and be put in in double-dollarsigns:
|
||||||
|
|
||||||
|
$$I = \int \rho R^{2} dV$$
|
||||||
|
|
||||||
|
And note that you can backslash-escape any punctuation characters
|
||||||
|
which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.
|
|
@ -0,0 +1,2 @@
|
||||||
|
## About
|
||||||
|
This is the about page.
|
|
@ -104,10 +104,6 @@ const { remarkPluginFrontmatter } = await entry.render();
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CommentLayout>
|
|
||||||
|
|
||||||
</CommentLayout>
|
|
||||||
|
|
||||||
</MainGridLayout>
|
</MainGridLayout>
|
||||||
|
|
||||||
<style lang="stylus" is:global>
|
<style lang="stylus" is:global>
|
||||||
|
@ -169,6 +165,7 @@ const { remarkPluginFrontmatter } = await entry.render();
|
||||||
content: none
|
content: none
|
||||||
&:after
|
&:after
|
||||||
content: none
|
content: none
|
||||||
|
img
|
||||||
|
border-radius: 8px
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -1,7 +1,7 @@
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import _config from '../../fuwari.config.yml';
|
import _config from '../../fuwari.config.yml';
|
||||||
|
|
||||||
interface ViviaConfig {
|
interface FuwariConfig {
|
||||||
title: string;
|
title: string;
|
||||||
menu: {
|
menu: {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
|
@ -35,6 +35,6 @@ interface ViviaConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const config: ViviaConfig = _config;
|
const config: FuwariConfig = _config;
|
||||||
|
|
||||||
export const getConfig = () => config;
|
export const getConfig = () => config;
|
Loading…
Reference in New Issue