only thing left is to write :)

This commit is contained in:
Filipe Medeiros 2024-04-19 18:33:07 +02:00
parent e754291fd5
commit f8a7cc77b2
Signed by: filipe
GPG key ID: 9533BD5467CC1E78
62 changed files with 303 additions and 188 deletions

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"workbench.colorTheme": "Halcyon"
}

View file

@ -1,21 +1,16 @@
import { defineConfig } from 'astro/config'; import { defineConfig } from 'astro/config';
import react from '@astrojs/react'; import react from '@astrojs/react';
import keystatic from '@keystatic/astro'; import keystatic from '@keystatic/astro';
import tailwind from '@astrojs/tailwind'; import tailwind from '@astrojs/tailwind';
import flattenListItems from 'mdast-flatten-listitem-paragraphs'; import flattenListItems from 'mdast-flatten-listitem-paragraphs';
import markdoc from '@astrojs/markdoc'; import markdoc from '@astrojs/markdoc';
import mdx from '@astrojs/mdx';
const prod = process.env.NODE_ENV === 'production'; const prod = process.env.NODE_ENV === 'production';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: import.meta.env.PROD ? 'https://filipesm.eu' : 'http://localhost:1234', site: import.meta.env.PROD ? 'https://filipesm.eu' : 'http://localhost:1234',
integrations: [ integrations: [tailwind(), ...(!prod ? [keystatic(), react()] : []), mdx()],
tailwind(),
markdoc(),
...(!prod ? [keystatic(), react()] : []),
],
markdown: { markdown: {
remarkPlugins: [flattenListItems], remarkPlugins: [flattenListItems],
}, },

BIN
bun.lockb

Binary file not shown.

View file

@ -1,7 +1,15 @@
import { config, fields, collection } from '@keystatic/core'; import { config, fields, collection } from '@keystatic/core';
import ShowableFigureIcon from './keystatic/content-components/ShowableFigureIcon'; import ShowableFigureIcon from './keystatic/content-components/ShowableFigureIcon';
import { block, wrapper } from '@keystatic/core/content-components'; import {
block,
inline,
mark,
wrapper,
} from '@keystatic/core/content-components';
import ShowableFigure from './keystatic/content-components/ShowableFigure'; import ShowableFigure from './keystatic/content-components/ShowableFigure';
import Footnote from 'keystatic/content-components/Footnote';
import FootnoteIcon from 'keystatic/content-components/FootnoteIcon';
import type { subtle } from 'crypto';
export default config({ export default config({
ui: { ui: {
@ -22,11 +30,14 @@ export default config({
validation: { isRequired: true }, validation: { isRequired: true },
}, },
}), }),
subtitle: fields.text({ label: 'Subtitle' }),
checkedOut: fields.checkbox({ label: 'Checked out?' }), checkedOut: fields.checkbox({ label: 'Checked out?' }),
link: fields.url({ label: 'Link', validation: { isRequired: true } }), link: fields.url({ label: 'Link', validation: { isRequired: true } }),
description: fields.text({ label: 'Description', multiline: true }), description: fields.text({ label: 'Description', multiline: true }),
date: fields.date({ label: 'Date', validation: { isRequired: true } }), date: fields.date({ label: 'Date', validation: { isRequired: true } }),
mainAuthor: fields.text({ label: 'Main author(s)' }), mainAuthors: fields.array(fields.text({ label: 'Author' }), {
label: 'Main author(s)',
}),
}, },
}), }),
posts: collection({ posts: collection({
@ -57,7 +68,7 @@ export default config({
label: 'Title', label: 'Title',
validation: { isRequired: true }, validation: { isRequired: true },
}), }),
body: fields.markdoc({ body: fields.mdx({
label: 'Body', label: 'Body',
components: { components: {
ShowableFigure: wrapper({ ShowableFigure: wrapper({
@ -76,6 +87,12 @@ export default config({
}), }),
}, },
}), }),
Footnote: mark({
label: 'Footnote',
icon: FootnoteIcon(),
style: { verticalAlign: 'super', fontSize: 'smaller' },
schema: {},
}),
}, },
}), }),
subtitle: fields.text({ label: 'Subtitle' }), subtitle: fields.text({ label: 'Subtitle' }),

View file

@ -0,0 +1,13 @@
export interface Props {
value: {
footnote: string;
};
}
export default function Footnote({ value: { footnote } }: Props) {
return (
<sup title={footnote} style={{ cursor: 'pointer' }}>
footnote
</sup>
);
}

View file

@ -0,0 +1,30 @@
export default function FootnoteIcon() {
return (
<>
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g
id="SVGRepo_tracerCarrier"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="0"
></g>
<g id="SVGRepo_iconCarrier">
<path
stroke-width="0"
fill="currentColor"
d="M20.5 7.26348C20.3072 7.43773 20.1033 7.5974 19.8927 7.73783C19.548 7.9676 19.0824 7.87447 18.8526 7.52982C18.6228 7.18517 18.716 6.71952 19.0606 6.48976C19.825 5.98018 20.3901 5.1686 20.5167 4.58989C20.597 4.22259 20.9339 3.97754 21.298 4.00163C21.6898 4.02637 22 4.35202 22 4.75012V11.2501C22 11.6643 21.6642 12.0001 21.25 12.0001C20.8358 12.0001 20.5 11.6643 20.5 11.2501V7.26348Z"
></path>
<path
stroke-width="0"
fill="currentColor"
d="M12.2219 17.7558C12.0685 17.5885 12 17.3779 12 17.1467V7.91037C12 7.66413 12.0737 7.44165 12.2367 7.26514L12.2401 7.26139C12.4083 7.08646 12.6239 7.00012 12.8676 7.00012C13.1106 7.00012 13.3253 7.0861 13.4898 7.26326C13.6579 7.43907 13.7353 7.66213 13.7353 7.91037V10.7508C13.9176 10.5594 14.1259 10.3947 14.3599 10.2576L14.361 10.2569C14.8183 9.99191 15.3282 9.86118 15.8849 9.86118C16.889 9.86118 17.7135 10.2402 18.3355 10.9959C18.9544 11.7477 19.2515 12.7345 19.2515 13.9306C19.2515 15.1313 18.9545 16.1205 18.3355 16.8725C17.7124 17.6243 16.8799 18.0001 15.8636 18.0001C15.2941 18.0001 14.7767 17.87 14.3184 17.6044L14.3173 17.6037C14.0786 17.4638 13.8656 17.2942 13.6785 17.0957V17.1467C13.6785 17.3815 13.5998 17.5916 13.4349 17.7565C13.27 17.9214 13.0599 18.0001 12.8251 18.0001C12.5938 18.0001 12.3846 17.9259 12.2255 17.7596L12.2219 17.7558ZM16.972 15.7798C17.3067 15.3446 17.4878 14.7372 17.4878 13.9306C17.4878 13.129 17.3067 12.5236 16.9717 12.0881C16.6432 11.6611 16.2024 11.4474 15.6222 11.4474C15.0714 11.4474 14.6267 11.6639 14.2703 12.1125C13.9164 12.5592 13.7282 13.1575 13.7282 13.9306C13.7282 14.7087 13.9165 15.3091 14.27 15.7555C14.626 16.1992 15.0707 16.4139 15.6222 16.4139C16.2031 16.4139 16.6439 16.202 16.972 15.7798Z"
></path>{' '}
<path
stroke-width="0"
fill="currentColor"
d="M2 17.1862C2 17.4211 2.09349 17.6243 2.26916 17.7801L2.27702 17.7868C2.45701 17.9336 2.67599 18.0001 2.91624 18.0001C3.11952 18.0001 3.30806 17.9464 3.46676 17.8264C3.62332 17.708 3.73178 17.5391 3.80285 17.3424L4.68223 14.9522H8.56084L9.44715 17.3424L9.44756 17.3436C9.51862 17.5401 9.62678 17.7081 9.78324 17.8264C9.94194 17.9464 10.1305 18.0001 10.3338 18.0001C10.5737 18.0001 10.793 17.9333 10.9698 17.7833C11.1511 17.6286 11.25 17.4247 11.25 17.1862C11.25 17.0479 11.2113 16.8958 11.152 16.7397L7.70955 7.77399C7.61797 7.53666 7.4837 7.3393 7.29665 7.20204C7.10789 7.06352 6.88428 7.00012 6.63981 7.00012C6.38569 7.00012 6.15364 7.06271 5.95825 7.20162C5.76377 7.33988 5.62502 7.54014 5.5327 7.78203L2.09775 16.7405C2.0384 16.8965 2 17.0479 2 17.1862ZM6.625 9.58303L8.00016 13.3601H5.24984L6.625 9.58303Z"
></path>{' '}
</g>
</>
);
}

View file

@ -1,46 +0,0 @@
import { component, defineMarkdocConfig } from '@astrojs/markdoc/config';
function mdocComponent(name: string) {
return component(`./src/components/mdoc/${name}.astro`);
}
export default defineMarkdocConfig({
nodes: {
paragraph: {
render: mdocComponent('Paragraph'),
},
heading: {
render: mdocComponent('Heading'),
attributes: { level: { type: Number } },
},
list: {
render: mdocComponent('List'),
attributes: {
ordered: { type: Boolean },
marker: {
type: String,
},
},
},
link: {
render: mdocComponent('InlineLink'),
attributes: { href: { type: String } },
},
item: {
render: mdocComponent('BulletListItem'),
attributes: {},
},
hr: {
render: mdocComponent('HorizontalBreak'),
},
},
tags: {
ShowableFigure: {
render: mdocComponent('ShowableFigure'),
attributes: {
image: { type: String, required: true },
altText: { type: String, required: true },
},
},
},
});

View file

@ -13,13 +13,12 @@
"format:check": "prettier . --check --config ./.prettierrc" "format:check": "prettier . --check --config ./.prettierrc"
}, },
"dependencies": { "dependencies": {
"@astrojs/markdoc": "^0.10.0", "@astrojs/mdx": "^2.3.1",
"@astrojs/react": "^3.3.0", "@astrojs/react": "^3.3.0",
"@astrojs/rss": "^4.0.5", "@astrojs/rss": "^4.0.5",
"@astrojs/tailwind": "^5.0.3", "@astrojs/tailwind": "^5.0.3",
"@keystatic/astro": "^5.0.0", "@keystatic/astro": "^5.0.0",
"@keystatic/core": "^0.5.11", "@keystatic/core": "^0.5.11",
"@markdoc/markdoc": "^0.4.0",
"astro": "^4.0.6", "astro": "^4.0.6",
"mdast-flatten-listitem-paragraphs": "^1.0.0", "mdast-flatten-listitem-paragraphs": "^1.0.0",
"react": "^18.2.0", "react": "^18.2.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 KiB

View file

@ -1,3 +0,0 @@
<code class="bg-stone-800 p-0.5 px-1 text-white">
<slot />
</code>

View file

@ -1,3 +0,0 @@
<li class="mb-1">
<slot />
</li>

View file

@ -17,5 +17,5 @@ const footnoteCount = globalThis.footnoteCounts[Astro.params.slug!].footnotes;
--- ---
<li id={`${footnoteString}-${footnoteCount}`}> <li id={`${footnoteString}-${footnoteCount}`}>
<slot name="footnote" /> <slot />
</li> </li>

View file

@ -0,0 +1,7 @@
---
export interface Props {
content: string;
}
---
<code class="bg-stone-800 p-0.5 px-1 text-white">{Astro.props.content}</code>

View file

@ -29,7 +29,7 @@ const footnoteCount = globalThis.footnoteCounts[Astro.params.slug!].content;
const english = Astro.url.toString().includes('blog/'); const english = Astro.url.toString().includes('blog/');
--- ---
<slot /><sup> <sup>
<InlineLink <InlineLink
class="text-sm" class="text-sm"
href={`#${footnoteString}-${footnoteCount}`} href={`#${footnoteString}-${footnoteCount}`}

View file

@ -0,0 +1,3 @@
<li class="[&>p]:mb-0 [&>ol]:mb-0 [&>ul]:mb-0">
<slot />
</li>

View file

@ -0,0 +1,40 @@
import ShowableFigureComponent from './ShowableFigure.astro';
import NumberListItem from './NumberListItem.astro';
import InlineLink from './InlineLink.astro';
import InlineCode from './InlineCode.astro';
import BulletList from './BulletList.astro';
import NumberList from './NumberList.astro';
import BulletListItem from './BulletListItem.astro';
import Heading1 from './Heading1.astro';
import Heading2 from './Heading2.astro';
import Heading3 from './Heading3.astro';
import Heading4 from './Heading4.astro';
import Heading5 from './Heading5.astro';
import Heading6 from './Heading6.astro';
import Paragraph from './Paragraph.astro';
import LinkToFootnote from './LinkToFootnote.astro';
import Null from './Null.astro';
import ListItem from './ListItem.astro';
import HorizontalBreak from './HorizontalBreak.astro';
const components = {
hr: HorizontalBreak,
img: ShowableFigureComponent,
h1: Heading1,
h2: Heading2,
h3: Heading3,
h4: Heading4,
h5: Heading5,
h6: Heading6,
p: Paragraph,
li: ListItem,
code: InlineCode,
a: InlineLink,
ul: BulletList,
ol: NumberList,
Footnote: LinkToFootnote,
ShowableFigure: ShowableFigureComponent,
InlineLink: Null,
};
export default components;

View file

@ -0,0 +1,27 @@
import InlineLink from './InlineLink.astro';
import Footnote from './Footnote.astro';
import Null from './Null.astro';
import FootnoteParagraph from './FootnoteParagraph.astro';
import ListItem from './ListItem.astro';
const components = {
img: Null,
hr: Null,
h1: Null,
h2: Null,
h3: Null,
h4: Null,
h5: Null,
h6: Null,
p: FootnoteParagraph,
code: Null,
li: ListItem,
a: Null,
ul: Null,
ol: Null,
ShowableFigure: Null,
Footnote: Footnote,
InlineLink: InlineLink,
};
export default components;

View file

@ -1,33 +0,0 @@
---
language: pt
slug: teste
title: Teste
summary: Um sumário
publishDate: 2024-04-19
linkPreview:
image:
image: '@assets/images/blog/pt/teste/linkPreview/image/image.jpeg'
altText: Eu num café
---
# Teste, meu caro!
- wakda
- wnpa
- wjapdj
- iwajdj
1. awojd
1. awd
1. ojawopdj
[hey!](https://filipesm.eu)
{% ShowableFigure
image="/src/assets/images/blog/pt/teste/me 2.jpeg"
altText="test alt" %}
Caption
{% /ShowableFigure %}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 MiB

View file

@ -4,11 +4,12 @@ const libraryCollection = defineCollection({
type: 'data', type: 'data',
schema: z.object({ schema: z.object({
title: z.string(), title: z.string(),
subtitle: z.ostring(),
checkedOut: z.boolean(), checkedOut: z.boolean(),
link: z.string().url(), link: z.string().url(),
description: z.ostring(), description: z.ostring(),
date: z.date(), date: z.date(),
mainAuthor: z.ostring(), mainAuthors: z.array(z.string()),
}), }),
}); });

View file

@ -2,6 +2,7 @@ title: Adults in the room
checkedOut: false checkedOut: false
link: 'https://openlibrary.org/works/OL19721980W/Adults_in_the_room?edition=key%3A/books/OL26935103M' link: 'https://openlibrary.org/works/OL19721980W/Adults_in_the_room?edition=key%3A/books/OL26935103M'
date: 2024-04-07 date: 2024-04-07
mainAuthor: Yanis Varoufakis mainAuthors:
- Yanis Varoufakis
description: > description: >
Reading :) Loving it, although a bit saddening at times. Reading :) Loving it, although a bit saddening at times.

View file

@ -2,7 +2,8 @@ title: Blindness
checkedOut: true checkedOut: true
link: 'https://openlibrary.org/works/OL27420W/Ensaio_Sobre_a_Cegueira?edition=key%3A/books/OL352517M' link: 'https://openlibrary.org/works/OL27420W/Ensaio_Sobre_a_Cegueira?edition=key%3A/books/OL352517M'
date: 2024-03-13 date: 2024-03-13
mainAuthor: José Saramago mainAuthors:
- José Saramago
description: > description: >
Weren't it for the demanding and at times confusing form Weren't it for the demanding and at times confusing form
Saramago uses in his writing, and I wouldn't have noticed Saramago uses in his writing, and I wouldn't have noticed

View file

@ -1,9 +1,11 @@
title: 'Doughnut Economics: Seven Ways to Think Like a 21st-Century Economist' title: Doughnut Economics
subtitle: Seven Ways to Think Like a 21st-Century Economist
checkedOut: true checkedOut: true
link: 'https://www.kobo.com/ie/en/ebook/doughnut-economics' link: https://www.kobo.com/ie/en/ebook/doughnut-economics
date: 2024-03-03
mainAuthor: Kate Raworth
description: > description: >
I loved it and highly recommend it! It's a book about economics, but a very unorthodox one. I loved it and highly recommend it! It's a book about economics, but a very
It has a degrowth side to it, but it's a great read for any person that wants a breath of unorthodox one. It has a degrowth side to it, but it's a great read for any
fresh air in the field of economics. person that wants a breath of fresh air in the field of economics.
date: 2024-03-03
mainAuthors:
- Kate Raworth

View file

@ -1,13 +1,17 @@
title: 'Limits to Growth: The 30-Year Update' title: Limits to Growth
subtitle: The 30-Year Update
checkedOut: true checkedOut: true
link: 'https://www.kobo.com/ie/en/ebook/limits-to-growth-1' link: https://www.kobo.com/ie/en/ebook/limits-to-growth-1
date: 2024-03-03
mainAuthor: D. Meadows, J Randers, D. Meadows
description: > description: >
This book completely solidified my urge to study political economics and This book completely solidified my urge to study political economics and
system dynamics. It takes on a realistic but duly urgent approach about the problems system dynamics. It takes on a realistic but duly urgent approach about the
that haunted the world at the beginning of the 21st century and that, unfortunately, problems that haunted the world at the beginning of the 21st century and that,
still do. The authors present clear solutions but, above all, a new way of thinking unfortunately, still do. The authors present clear solutions but, above all, a
about what it means to live in a society and the potential the human being has to build new way of thinking about what it means to live in a society and the potential
a new global community with well-being and Nature preservation at the core, based the human being has to build a new global community with well-being and Nature
on empirical data when possible. preservation at the core, based on empirical data when possible.
date: 2024-03-03
mainAuthors:
- D. Meadows
- J Randers
- D. Meadows

View file

@ -1,4 +1,5 @@
title: 'Mission Economy: A Moonshot Guide to Changing Capitalism' title: Mission Economy
subtitle: A Moonshot Guide to Changing Capitalism
checkedOut: true checkedOut: true
link: https://www.kobo.com/us/en/ebook/mission-economy-1 link: https://www.kobo.com/us/en/ebook/mission-economy-1
description: > description: >
@ -10,4 +11,5 @@ description: >
not being able to make a clear connection to its more general implications. I not being able to make a clear connection to its more general implications. I
still haven't finished the book. One day I'll try again. still haven't finished the book. One day I'll try again.
date: 2024-03-03 date: 2024-03-03
mainAuthor: Mariana Mazzucato mainAuthors:
- Mariana Mazzucato

View file

@ -2,7 +2,8 @@ title: One hundred years of solitude
checkedOut: false checkedOut: false
link: 'https://openlibrary.org/works/OL274505W/Cien_a%C3%B1os_de_soledad?edition=key%3A/books/OL30448691M' link: 'https://openlibrary.org/works/OL274505W/Cien_a%C3%B1os_de_soledad?edition=key%3A/books/OL30448691M'
date: 2024-03-14 date: 2024-03-14
mainAuthor: Gabriel García Márquez mainAuthors:
- Gabriel García Márquez
description: > description: >
I gave this one back to the library. I think reading it in spanish I gave this one back to the library. I think reading it in spanish
doesn't allow me to enjoy the book. I definitely want to get back to doesn't allow me to enjoy the book. I definitely want to get back to

View file

@ -2,7 +2,8 @@ title: Sputnik sweetheart
checkedOut: true checkedOut: true
link: 'https://openlibrary.org/works/OL2625443W/%E3%82%B9%E3%83%97%E3%83%BC%E3%83%88%E3%83%8B%E3%82%AF%E3%81%AE%E6%81%8B%E4%BA%BA?edition=key%3A/books/OL7426986M' link: 'https://openlibrary.org/works/OL2625443W/%E3%82%B9%E3%83%97%E3%83%BC%E3%83%88%E3%83%8B%E3%82%AF%E3%81%AE%E6%81%8B%E4%BA%BA?edition=key%3A/books/OL7426986M'
date: 2024-03-13 date: 2024-03-13
mainAuthor: Haruki Murakami mainAuthors:
- Haruki Murakami
description: > description: >
In some random ranking I saw online, this book wasn't even in In some random ranking I saw online, this book wasn't even in
the top 10 Murakami works. Even so, I decided to give it a the top 10 Murakami works. Even so, I decided to give it a

View file

@ -2,7 +2,8 @@ title: The Strange Library
checkedOut: true checkedOut: true
link: https://www.kobo.com/us/en/ebook/the-strange-library-1 link: https://www.kobo.com/us/en/ebook/the-strange-library-1
date: 2024-03-04 date: 2024-03-04
mainAuthor: Haruki Murakami mainAuthors:
- Haruki Murakami
description: > description: >
This is a Murakami book that's very different from his other works. This is a Murakami book that's very different from his other works.
It's tiny and it's as much visual as verbal, with beautiful illustrations It's tiny and it's as much visual as verbal, with beautiful illustrations

View file

@ -0,0 +1,10 @@
title: Trolling ourselves to death
subtitle: Democracy in the Age of Social Media
checkedOut: false
link: https://academic.oup.com/book/55929
description: >
I started reading this one while reading the other one! It's short, I'm almost
done :)
date: 2024-04-19
mainAuthors:
- Jason Hannan

View file

@ -2,6 +2,7 @@ title: Adults in the room
checkedOut: false checkedOut: false
link: 'https://openlibrary.org/works/OL19721980W/Adults_in_the_room?edition=key%3A/books/OL26935103M' link: 'https://openlibrary.org/works/OL19721980W/Adults_in_the_room?edition=key%3A/books/OL26935103M'
date: 2024-04-07 date: 2024-04-07
mainAuthor: Yanis Varoufakis mainAuthors:
- Yanis Varoufakis
description: > description: >
A ler :) Estou a adorar, apesar de me deixar um pouco triste de vez em quando. A ler :) Estou a adorar, apesar de me deixar um pouco triste de vez em quando.

View file

@ -2,7 +2,8 @@ title: Ensaio sobre a cegueira
checkedOut: true checkedOut: true
link: 'https://openlibrary.org/books/OL9162940M/Ensaio_Sobre_a_Cegueira' link: 'https://openlibrary.org/books/OL9162940M/Ensaio_Sobre_a_Cegueira'
date: 2024-03-13 date: 2024-03-13
mainAuthor: José Saramago mainAuthors:
- José Saramago
description: > description: >
Não fosse a forma exigente e por vezes confusa que Saramago Não fosse a forma exigente e por vezes confusa que Saramago
usa na sua escrita, não me teria dado conta que estava a ler um usa na sua escrita, não me teria dado conta que estava a ler um

View file

@ -1,9 +1,11 @@
title: 'Economia Donut: Sete Formas de Pensar Como um Economista no Século XXI' title: Economia Donut
subtitle: Sete Formas de Pensar Como um Economista no Século XXI
checkedOut: true checkedOut: true
link: 'https://www.wook.pt/ebook/economia-donut-kate-raworth/21400895' link: https://www.wook.pt/ebook/economia-donut-kate-raworth/21400895
mainAuthor: Kate Raworth
date: 2024-03-03
description: > description: >
'Adorei e recomendo vivamente! É um livro sobre economia, mas muito pouco ortodoxo. 'Adorei e recomendo vivamente! É um livro sobre economia, mas muito pouco
Tem uma faceta decrescentista, mas é uma ótima leitura para qualquer pessoa que queira ortodoxo. Tem uma faceta decrescentista, mas é uma ótima leitura para qualquer
uma lufada de ar fresco no tópico de economia.' pessoa que queira uma lufada de ar fresco no tópico de economia.'
date: 2024-03-03
mainAuthors:
- Kate Raworth

View file

@ -1,14 +1,20 @@
title: 'Limites do Crescimento: A Atualização de 30 Anos' title: Limites do Crescimento
subtitle: A Atualização de 30 Anos
checkedOut: true checkedOut: true
link: 'https://www.scribd.com/document/422266661/Limites-Do-Crescimento-A-Atualizacao-de-30-Anos' link: >-
date: 2024-03-03 https://www.scribd.com/document/422266661/Limites-Do-Crescimento-A-Atualizacao-de-30-Anos
mainAuthor: D. Meadows, J Randers, D. Meadows
description: > description: >
Este livro solidificou por completo a minha vontade de estudar economia política Este livro solidificou por completo a minha vontade de estudar economia
e dinâmica de sistemas. É uma abordagem realista mas devidamente urgente sobre os política e dinâmica de sistemas. É uma abordagem realista mas devidamente
problemas que assolavam o mundo no início do século XXI e que, muito infelizmente, urgente sobre os problemas que assolavam o mundo no início do século XXI e
ainda continuam presentes. As autoras apresentam soluções claras, mas, acima de tudo, que, muito infelizmente, ainda continuam presentes. As autoras apresentam
uma nova maneira de pensar sobre o que é viver em sociedade e o potencial que o ser humano soluções claras, mas, acima de tudo, uma nova maneira de pensar sobre o que é
tem para construir uma comunidade global com o bem-estar e a preservação da Natureza em viver em sociedade e o potencial que o ser humano tem para construir uma
primeiro lugar, baseadas em dados empíricos sempre que possível. PS: Não consegui encontrar comunidade global com o bem-estar e a preservação da Natureza em primeiro
um link melhor para a versão portuguesa do livro, desculpem! lugar, baseadas em dados empíricos sempre que possível. PS: Não consegui
encontrar um link melhor para a versão portuguesa do livro, desculpem!
date: 2024-03-03
mainAuthors:
- D. Meadows
- J Randers
- D. Meadows

View file

@ -1,13 +1,15 @@
title: 'Economia de Missão: Um guia ousado e inovador para mudar o capitalismo' title: Economia de Missão
subtitle: Um guia ousado e inovador para mudar o capitalismo
checkedOut: true checkedOut: true
link: 'https://www.wook.pt/ebook/economia-de-missao-mariana-mazzucato/25383261' link: https://www.wook.pt/ebook/economia-de-missao-mariana-mazzucato/25383261
date: 2024-03-03
mainAuthor: Mariana Mazzucato
description: > description: >
Já li cerca de metade do livro (talvez mais, se excluir referências, etc). Já li cerca de metade do livro (talvez mais, se excluir referências, etc). Não
Não posso dizer que fiquei impressionado. O livro tenta usar o caso do projeto Apolo XIII posso dizer que fiquei impressionado. O livro tenta usar o caso do projeto
da NASA para explorar como o Estado pode e deve ser um líder na sociedade, guiando Apolo XIII da NASA para explorar como o Estado pode e deve ser um líder na
investimentos, escolhendo áreas estratégicas, tomando riscos pelo bem comum, etc. sociedade, guiando investimentos, escolhendo áreas estratégicas, tomando
No entanto, sinto que fiquei perdido no meio da analogia, sem conseguir fazer uma riscos pelo bem comum, etc. No entanto, sinto que fiquei perdido no meio da
ligação clara às suas implicações mais gerais. Ainda não acabei o livro. analogia, sem conseguir fazer uma ligação clara às suas implicações mais
Um dia terei de voltar. gerais. Ainda não acabei o livro. Um dia terei de voltar.
date: 2024-03-03
mainAuthors:
- Mariana Mazzucato

View file

@ -2,7 +2,8 @@ title: Cem anos de solidão
checkedOut: false checkedOut: false
link: 'https://openlibrary.org/works/OL26414960W/Cem_Anos_De_Solid%C3%A3o?edition=key%3A/books/OL35663961M' link: 'https://openlibrary.org/works/OL26414960W/Cem_Anos_De_Solid%C3%A3o?edition=key%3A/books/OL35663961M'
date: 2024-03-14 date: 2024-03-14
mainAuthor: Gabriel García Márquez mainAuthors:
- Gabriel García Márquez
description: > description: >
Devolvi à biblioteca, penso que ler esta obra em espanhol não Devolvi à biblioteca, penso que ler esta obra em espanhol não
me permite aproveitar a leitura. Quero definitivamente ler um dia! me permite aproveitar a leitura. Quero definitivamente ler um dia!

View file

@ -2,7 +2,8 @@ title: Sputnik, Meu Amor
checkedOut: true checkedOut: true
link: 'https://search.worldcat.org/title/864808899?oclcNum=864808899' link: 'https://search.worldcat.org/title/864808899?oclcNum=864808899'
date: 2024-03-13 date: 2024-03-13
mainAuthor: Haruki Murakami mainAuthors:
- Haruki Murakami
description: > description: >
Num ranking qualquer que vi online, este livro nem estava nos Num ranking qualquer que vi online, este livro nem estava nos
10 melhores de Murakami. Decidi, mesmo assim, dar-lhe uma 10 melhores de Murakami. Decidi, mesmo assim, dar-lhe uma

View file

@ -1,7 +1,8 @@
title: The Strange Library title: The Strange Library
checkedOut: true checkedOut: true
link: https://www.fnac.pt/The-Strange-Library-Haruki-Murakami/a807074?NUMERICAL=Y#bl=FA_ebook link: https://www.fnac.pt/The-Strange-Library-Haruki-Murakami/a807074?NUMERICAL=Y#bl=FA_ebook
mainAuthor: Haruki Murakami mainAuthors:
- Haruki Murakami
date: 2024-03-04 date: 2024-03-04
description: > description: >
Este é um livro de Murakami que é muito diferente das suas outras obras. Este é um livro de Murakami que é muito diferente das suas outras obras.

View file

@ -0,0 +1,8 @@
title: Trolling ourselves to death
subtitle: Democracy in the Age of Social Media
checkedOut: false
link: https://academic.oup.com/book/55929
description: Comecei a ler ao mesmo tempo que o outro! É curtinho, estou quase a acabar :)
date: 2024-04-19
mainAuthors:
- Jason Hannan

View file

@ -28,17 +28,26 @@ const libraryItems = (
<ol class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4 items-start"> <ol class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4 items-start">
{ {
libraryItems.map( libraryItems.map(
({ data: { title, description, link, checkedOut, mainAuthor } }) => ( ({
data: { title, subtitle, description, link, checkedOut, mainAuthors },
}) => (
<CardLink link={link} isExternal> <CardLink link={link} isExternal>
<article> <article>
<div class="flex gap-2"> <div class="flex gap-2 justify-between">
<h2 class="text-lg sm:text-xl font-medium break-words text-primary-700 block"> <h2 class="text-lg sm:text-xl font-medium break-words text-primary-700 block">
{title} {title}
</h2> </h2>
{checkedOut && <span class="text-primary-700 text-3xl">✓</span>} {checkedOut && <span class="text-primary-700 text-3xl">✓</span>}
</div> </div>
{mainAuthor && ( {subtitle && (
<h3 class="mb-3 sm:text-lg text-end">{mainAuthor}</h3> <h3 class="text-sm sm:text-base break-words text-primary-800 block">
{subtitle}
</h3>
)}
{mainAuthors.length > 0 && (
<h3 class="mb-3 sm:text-lg text-end">
{mainAuthors.join(', ')}
</h3>
)} )}
<p class="mb-5">{description}</p> <p class="mb-5">{description}</p>
</article> </article>

View file

@ -1,14 +1,14 @@
--- ---
import BlogPostSubtitle from '../../../components/BlogPostSubtitle.astro'; import BlogPostSubtitle from '@components/BlogPostSubtitle.astro';
import ButtonLink from '../../../components/ButtonLink.astro'; import ButtonLink from '@components/ButtonLink.astro';
import PageTitle from '../../../components/PageTitle.astro'; import PageTitle from '@components/PageTitle.astro';
import Layout from '../../../layouts/Layout.astro'; import Layout from '../../../layouts/Layout.astro';
import Metadata from '../../../components/Metadata.astro'; import Metadata from '@components/Metadata.astro';
import { getCollection } from 'astro:content'; import { getCollection } from 'astro:content';
import type { CollectionEntry } from 'astro:content'; import type { CollectionEntry } from 'astro:content';
import blogPostComponents from '../../../components/mdx/blogPostComponents'; import NumberList from '@components/mdx/NumberList.astro';
import blogPostFootnotesComponents from '../../../components/mdx/blogPostFootnotesComponents'; import components from '@components/mdx/blogPostComponents';
import NumberList from '../../../components/mdx/components/NumberList.astro'; import footnoteComponents from '@components/mdx/blogPostFootnotesComponents';
export interface Props { export interface Props {
blogPost: CollectionEntry<'blog'>; blogPost: CollectionEntry<'blog'>;
@ -65,21 +65,21 @@ const formattedPublishDate = publishDate.toLocaleDateString('pt', {
<PageTitle class="mb-2 break-words text-start text-balance"> <PageTitle class="mb-2 break-words text-start text-balance">
{title} {title}
</PageTitle> </PageTitle>
<BlogPostSubtitle content={subtitle} /> <BlogPostSubtitle>{subtitle}</BlogPostSubtitle>
<span class="text-lg sm:text-xl"> <span class="text-lg sm:text-xl">
<time datetime={formattedPublishDate}>{formattedPublishDate}</time> <time datetime={formattedPublishDate}>{formattedPublishDate}</time>
&bull; &bull;
{readTime} {readTime} min
</span> </span>
</header> </header>
<div class="text-justify"> <div class="text-justify">
<Content components={blogPostComponents} /> <Content components={components} />
</div> </div>
<hr class="my-5 border-t border-primary-700" /> <hr class="my-5 border-t border-primary-700" />
{ {
contentString.includes('<Footnote>') && ( contentString.includes('<Footnote') && (
<NumberList> <NumberList>
<Content components={blogPostFootnotesComponents} /> <Content components={footnoteComponents} />
</NumberList> </NumberList>
) )
} }
@ -101,4 +101,3 @@ const formattedPublishDate = publishDate.toLocaleDateString('pt', {
</nav> </nav>
</Fragment> </Fragment>
</Layout> </Layout>
../../../components/mdoc/blogPostComponents../../../components/mdoc/blogPostFootnotesComponents../../../components/mdoc/components/NumberList.astro

View file

@ -1,12 +1,14 @@
--- ---
import BlogPostSubtitle from '../../../components/BlogPostSubtitle.astro'; import BlogPostSubtitle from '@components/BlogPostSubtitle.astro';
import ButtonLink from '../../../components/ButtonLink.astro'; import ButtonLink from '@components/ButtonLink.astro';
import PageTitle from '../../../components/PageTitle.astro'; import PageTitle from '@components/PageTitle.astro';
import Layout from '../../../layouts/Layout.astro'; import Layout from '../../../layouts/Layout.astro';
import Metadata from '../../../components/Metadata.astro'; import Metadata from '@components/Metadata.astro';
import { getCollection } from 'astro:content'; import { getCollection } from 'astro:content';
import type { CollectionEntry } from 'astro:content'; import type { CollectionEntry } from 'astro:content';
import NumberList from '../../../components/mdoc/NumberList.astro'; import NumberList from '@components/mdx/NumberList.astro';
import components from '@components/mdx/blogPostComponents';
import footnoteComponents from '@components/mdx/blogPostFootnotesComponents';
export interface Props { export interface Props {
blogPost: CollectionEntry<'blog'>; blogPost: CollectionEntry<'blog'>;
@ -71,13 +73,13 @@ const formattedPublishDate = publishDate.toLocaleDateString('pt', {
</span> </span>
</header> </header>
<div class="text-justify"> <div class="text-justify">
<Content /> <Content components={components} />
</div> </div>
<hr class="my-5 border-t border-primary-700" /> <hr class="my-5 border-t border-primary-700" />
{ {
contentString.includes('<Footnote>') && ( contentString.includes('<Footnote') && (
<NumberList> <NumberList>
<Content /> <Content components={footnoteComponents} />
</NumberList> </NumberList>
) )
} }

View file

@ -29,17 +29,26 @@ const libraryItems = (
<ol class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4 items-start"> <ol class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4 items-start">
{ {
libraryItems.map( libraryItems.map(
({ data: { title, description, link, checkedOut, mainAuthor } }) => ( ({
data: { title, subtitle, description, link, checkedOut, mainAuthors },
}) => (
<CardLink link={link} isExternal> <CardLink link={link} isExternal>
<article> <article>
<div class="flex gap-2"> <div class="flex gap-2 justify-between">
<h2 class="text-lg sm:text-xl font-medium break-words text-primary-700 block"> <h2 class="text-lg sm:text-xl font-medium break-words text-primary-700 block">
{title} {title}
</h2> </h2>
{checkedOut && <span class="text-primary-700 text-3xl">✓</span>} {checkedOut && <span class="text-primary-700 text-3xl">✓</span>}
</div> </div>
{mainAuthor && ( {subtitle && (
<h3 class="mb-3 sm:text-lg text-end">{mainAuthor}</h3> <h3 class="text-sm sm:text-base break-words text-primary-800 block">
{subtitle}
</h3>
)}
{mainAuthors.length > 0 && (
<h3 class="mb-3 sm:text-lg text-end">
{mainAuthors.join(', ')}
</h3>
)} )}
<p class="mb-5">{description}</p> <p class="mb-5">{description}</p>
</article> </article>