Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(astro): migrate the whole blog to astro.build #457

Draft
wants to merge 62 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
805e54b
🚀 init astro
jpoissonnet Oct 16, 2024
a907b9d
✨init authors and posts collections
jpoissonnet Oct 16, 2024
3eeb26f
🔧 remove image temporarly in author to allow build
jpoissonnet Oct 16, 2024
99207e5
🚚 move posts
jpoissonnet Oct 20, 2024
6a6bda2
🔧 replace image path
jpoissonnet Oct 20, 2024
e7591c6
🚚move folder into date related tree
jpoissonnet Oct 20, 2024
c4d9a61
🚚 move posts route
jpoissonnet Oct 20, 2024
c795091
🚚 move authors and their avatars
jpoissonnet Oct 20, 2024
0a11a1a
😅 make the site buildable
jpoissonnet Oct 20, 2024
90a1f74
🚚🗑️ move images to right place
jpoissonnet Oct 24, 2024
0cc75cd
🚚 images to right place to build
jpoissonnet Oct 21, 2024
7cc6bb5
🗑️ clean root files
jpoissonnet Oct 21, 2024
0531769
✨🚧 start front-end, index.astro
jpoissonnet Oct 23, 2024
33fbdf7
wip index
jpoissonnet Oct 25, 2024
ffcc3a6
✨🚧 better hero
jpoissonnet Oct 26, 2024
7b36533
♻️index and separate component
jpoissonnet Oct 26, 2024
e13e695
✨navbar beginning
jpoissonnet Oct 28, 2024
408dcdc
💄 add last color to variables
jpoissonnet Oct 28, 2024
682cee4
✨ fonts, index and posts wip
jpoissonnet Oct 29, 2024
9601afe
🚧 start lft page
jpoissonnet Oct 29, 2024
ade1fc0
🚚 move lfts to content
jpoissonnet Oct 29, 2024
c862884
♻️normalize author
jpoissonnet Oct 29, 2024
85eb219
♻️normalize author
jpoissonnet Oct 29, 2024
53b4b2b
✨ add things on page
jpoissonnet Oct 29, 2024
e54d7f4
✨ lft description
jpoissonnet Oct 31, 2024
89a5062
🚧 lft fallback image
jpoissonnet Oct 31, 2024
b340e01
✨individual post hero
jpoissonnet Oct 31, 2024
08063d3
✨navbar hover page-dependent line color
jpoissonnet Oct 31, 2024
09590f4
✨individual lft page
jpoissonnet Nov 5, 2024
9def5a5
💅 format the global.css
jpoissonnet Nov 5, 2024
a3cbe1c
💅 styles
jpoissonnet Nov 5, 2024
c9f49bd
💄padding and overflow
jpoissonnet Nov 5, 2024
11479a0
💄reset and more line-height
jpoissonnet Nov 5, 2024
c95e4a5
💄wip styles
jpoissonnet Nov 5, 2024
1df42f7
💄individual posts
jpoissonnet Nov 5, 2024
76fd5ef
💄individual lft
jpoissonnet Nov 5, 2024
032d878
💄paddings
jpoissonnet Nov 8, 2024
762e898
🍱logo without slogan
jpoissonnet Nov 8, 2024
dde8504
✨🤫pill
jpoissonnet Nov 8, 2024
8207345
🔧 fix build undefined image
jpoissonnet Nov 8, 2024
4b038c8
✨ meetups page
jpoissonnet Nov 9, 2024
237885c
♻️ put lft cards into component
jpoissonnet Nov 9, 2024
cb9735d
💄polish a bit meetups page
jpoissonnet Nov 9, 2024
fc6c01f
✨oss page
jpoissonnet Nov 9, 2024
40b730b
💄 fix size and padding
jpoissonnet Nov 15, 2024
5fbe331
🚧 search with pagefind
jpoissonnet Nov 15, 2024
eff210e
✨ pagefind search and viewtransitions
jpoissonnet Nov 15, 2024
815d794
🚫 remove viewtransitions
jpoissonnet Nov 16, 2024
a25c18c
♻️ make the header one component
jpoissonnet Nov 16, 2024
b454b50
💄header margins
jpoissonnet Nov 16, 2024
e51c285
🚧 mobile nav burger menu
jpoissonnet Nov 19, 2024
bb650e0
🚧 nav dropdown
jpoissonnet Nov 19, 2024
d38a3c0
🚧 nav dropdown body to the moon
jpoissonnet Nov 19, 2024
78ba905
💄 responsive of the nav
jpoissonnet Nov 22, 2024
9aaf759
✨meta tag
jpoissonnet Nov 22, 2024
2cbea4f
💄margin top
jpoissonnet Nov 22, 2024
307432e
🔧types
jpoissonnet Nov 22, 2024
b586ad4
💄border radius
jpoissonnet Nov 23, 2024
1690cdc
💄responsive
jpoissonnet Nov 23, 2024
e7c2367
✨ pagination
jpoissonnet Nov 23, 2024
2cbca05
🚚 move astro folder to root
jpoissonnet Nov 26, 2024
d730326
📦 remove @types/bun
jpoissonnet Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .bundle/config

This file was deleted.

23 changes: 0 additions & 23 deletions .devcontainer/devcontainer.json

This file was deleted.

9 changes: 0 additions & 9 deletions .dockerignore

This file was deleted.

28 changes: 14 additions & 14 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ on:

jobs:
build:
name: 'Build 📦 & Deploy 🚀'
name: 'Build 📦'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: '3'
- run: gem install bundler
- run: bundle install --jobs 4 --retry 3

- uses: actions/checkout@4
- name: 'Build 📦'
run: bundle exec jekyll build
uses: withastro/action@v3

- uses: JamesIves/[email protected]
name: 'Deploy 🚀'
with:
folder: _site
clean: true
deploy:
name: 'Deploy 🚀'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
11 changes: 4 additions & 7 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ jobs:
name: 'Build 📦'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: '3'
- run: gem install bundler
- run: bundle install --jobs 4 --retry 3
- run: bundle exec jekyll build
- uses: actions/checkout@4
- name: 'Build 📦'
run: npm run build

32 changes: 23 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
_site
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
*.sublime-project
*.sublime-workspace
codekit-config.json
node_modules
vagrant/.vagrant/
.jekyll-cache
.jekyll-metadata
.idea/*

# jetbrains setting folder
.idea/
8 changes: 0 additions & 8 deletions .vscode/extensions.json

This file was deleted.

14 changes: 0 additions & 14 deletions .vscode/tasks.json

This file was deleted.

193 changes: 56 additions & 137 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,180 +1,99 @@
# Contributing

## How to install the project?
## Prerequisites

### Using Visual Studio Code
- [Node.js](https://nodejs.org/en/download/)
- [pnpm](https://pnpm.io/installation)

1. Install Docker or Podman on your machine
2. Open the project in Visual Studio Code
3. Install the recommended [Remote Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension
4. When VS code prompts you, agree to "Reopen in Container"
5. The blog should be built, refreshed and opened in a preview tab automagically. ✨
- If not, you can run the "Jekyll Serve" VS Code task manually.

### With Ruby and Gem
## 🔧 How to install the project?

```shell
git clone https://github.com/BedrockStreaming/tech.bedrockstreaming.com.git
cd tech.bedrockstreaming.com
sudo gem install jekyll bundler
bundle install
pnpm install
```

Then run this command to run a dev server locally.
```shell
bundle exec jekyll serve
```

:warning: There are some issues to run this project on M1 archi for now.

### With docker

You can use docker to run the tech blog locally.

```shell
docker build -t tech-blog .
docker run -p 8080:8080 tech-blog
pnpm dev
```

## How to add an article to the blog?

All articles are listed in the `_posts` folder.
Each article is a Markdown file named like this `YYYY-MM-DD-article-slug.md` where date is the date of publication.
:information: If you put a future date of publication, your article won't be visible until this date is passed.
## 📝 How to add an article to the blog?

All articles are listed in the `src/content/posts/YYYY/MM/DD` folder structure where date is the date of publication.

Make sure to complete the _frontmatter_ part of your Markdown file in order to define at least those attributes:

```markdown
---
layout: post
layout: ../../../../../layouts/post.astro
title: Title of your article
description: Description of your article visible in search page results
author: author_of_your_article
tags: [example, of, tags]
color: rgb(251,87,66) # this is Bedrock color here
---
```

We are using a community theme for Jekyll for this blog, you may find some useful examples here:
- [How to add Table of content for your blog post ?](https://sylhare.github.io/Type-on-Strap/2014/11/28/markdown-and-html.html)
- [How to customize the color used on a post page ?](https://sylhare.github.io/Type-on-Strap/2019/05/18/color-post.html)
- [How to use images in your post ?](https://sylhare.github.io/Type-on-Strap/2018/10/29/feature-images.html)
You can store your images in _images/post_ folder of this repository.
Don't forget to compress them for performances with tools like [TinyPNG](https://tinypng.com/)
- [How to add code examples ?](https://sylhare.github.io/Type-on-Strap/2014/08/08/Markup-Syntax-Highlighting.html)
- [How to add simple Diagrams with _Mermaids_?](https://sylhare.github.io/Type-on-Strap/2019/11/02/Tech-stuff-example.html#mermaid)
Mermaid is a really powerful tool to generate Diagram dynamically with some text.
Check [Mermaid documentation](https://mermaid-js.github.io/mermaid/#/).
The _frontmatter_ is configured through a [Zod](https://zod.dev/) schema in `src/content/config.ts`.

In order to add a new article, you should open a Pull Request on this repository.
A preview will automatically be deployed on AWS thanks to AWS Amplify service.

Don't hesitate to share your new post of **#proj-blog-tech-bedrock** slack room to ask for reviews from Bedrockers.
When you have 2 approves and no change requested, you can merge your Pull Request.

## Add an author
## ✍️ Add an author

Edit `_data/authors.yml` to add an author (authors are sorted alphabetically).
Add a `<author_id>.json` file in `src/content/authors` folder. You can check the `src/content/authors/bedrock.json` file
as an example. You can add the avatar image in the same folder for it to be referenced like `./<images>.jpg` in the author json file.

Authors could have a `name`, a `url` and an `avatar` (which could be a distant file or an image hosted in the `images/avatar` directory).
Authors could have a `name`, a `url` and an `avatar` (which could be a distant file or an image hosted in the directory).

Then you will be able to use the author ID in the frontmatter post configuration key named `author`.

## Add a LFT replay

1. Create a file in the `__post` folder name matching this format `YYYY-MM-DD-slug-of-your-article.md`
Use the date the talk was first given in public.
2. Add the configuration of metadata at the beginning of this file
> :warning: **To make your videos appear in either `Last Friday Talks`page, tag your post with `lft`.**
```markdown
---
layout: video
# Unique ID of the Youtube video clip
youtubeId: $$$$$$$
# Title of the article
title: Title of your article
# Description (for SEO and context purpose)
description: Description of your article visible in search page results
# Authors of the article (can also be a list of authors such as: [first_author, second_author, third_author])
# The complete list of valid author IDs is in `_data/authors.yml`
author: author_of_your_article
# Use tags for grouping content in the blog
# Add `lft` to group with other LFT talks
tags: [lft, and, other, tags]
# Bedrock color
color: rgb(251,87,66)
---
```
3. Add content to the markdown file in order to add context to the video you are sharing.


## Add a conference

There are two ways to publish a conference where you were a speaker.
Please note that creating a post is more likely to help our external communication.

### Publish information about the conference

If you just want to add a conference presentation to the listed ones, you can add your presentation in `_data/conferences.yaml`.

List of the metadata allowed to add a new conference:
ℹ️ the site will keep you from building if you use an author ID that does not exist.

## ↩️ Add a LFT replay

Similar to adding an article, you can add a Last Friday Talk replay to the blog by adding a markdown file in the `src/content/lfts/YYYY/MM/DD` folder structure.
The most different parts are:
- that you should use the `lft.astro` layout instead of the `post.astro` layout.
- you should add a `youtubeId` key in the frontmatter to embed the video in the page and get the thumbnail.

Here is an example of an LFT frontmatter
```markdown
---
layout: ../../../../../layouts/video.astro
title: "Le LFT du LFT - PUB LFT #LFT 02/02/24"
description: ""
author: team_lft
tags: [lft, tech]
color: rgb(251,87,66)
youtubeId: UgOFZmOJOmo
```

## 🎤 Add a conference

Similar to adding an article, you can add a conference to the blog by adding a markdown file in the `src/content/conferences/YYYY/MM/DD` folder structure.
Here is an example of a conference frontmatter
```markdown
- title: "Title of the conference"
# Conference date
date: 1970-01-01
# from _data/authors.yaml
author: conference_speaker
# Public event name
eventName: ******
# Url to redirect to the event site (optional)
eventUrl: ******
# Youtube video id (optional)
youtubeId: ******
# Slideshare presentation key (from iframe integration) (optional)
slideshareKey: ******
# Bedrock sponsored the event? (default: false)
sponsored: true
# Bedrock hosted the event? (default: false)
hosted: true
---
title: "Projet XState"
author: m_blanc
description: "La gestion d'état applicative est une notion complexe et fondamentale (donc passionnante) des applications web modernes. Pour garder le contrôle de votre application, venez découvrir XState, un moteur d'états reposant sur le concept de machines à états finis."

eventName: LyonJS Meetup
eventUrl: https://www.meetup.com/fr-FR/lyonjs/events/290762638/
youtubeId: HWRQp2Y1rbw
sponsored: true
hosted: true

tags: [xstate, lyonjs, meetup, react, javascript, conference]
comments: true
color: rgb(251,87,66)
language: fr
---
```

That's all folks! Your conference will be displayed in "Meetups & Conferences" page.
If there is a `youtubeId` key, the video will also be added to the "Replay" section.


### Create a post to present the conference

1. Create a file in `__post` folder name matching this format `YYYY-MM-DD-slug-of-your-article.md`
Use the date the talk was first given in public.
2. Add the configuration of metadata at the beginning of this file:
```markdown
---
layout: conference

# Title of the conference
title: Title of your conference
# Description of the page (for SEO and context purpose)
description: Description of your article visible in search page results
# from _data/authors.yaml
author: conference_speaker
# Public event name
eventName: ******
# Url to redirect to the event site (optional)
eventUrl: ******
# Youtube video id (optional)
youtubeId: ******
# Slideshare presentation key (from iframe integration) (optional)
slideshareKey: ******
# Bedrock sponsored the event? (default: false)
sponsored: true
# Bedrock hosted the event? (default: false)
hosted: true

# Use tags for grouping content in the blog.
tags: [example, of, tags]
# this is Bedrock color here
color: rgb(251,87,66)
---
```
3. Add content to the markdown file in order to add context to the presentation you are sharing.
Your conference will be displayed in "Meetups & Conferences" page.
11 changes: 0 additions & 11 deletions Dockerfile

This file was deleted.

Loading