Merge pull request #7 from 0xdevant/feat/skip-empty-news

feat: add empty checking to filter out empty weekly news md file
This commit is contained in:
ant 2024-09-22 20:21:25 +08:00 committed by GitHub
commit 1fabd11670
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 101 additions and 88 deletions

View file

@ -1,5 +1,6 @@
--- ---
curator: Coinmandeer curator: Coinmandeer
skip: true
--- ---
<!-- <!--
@ -18,20 +19,20 @@ curator: Coinmandeer
### Other ### Other
--> -->
--- ---
### Upcoming events ### Upcoming events
*(new/changes in **bold**)*
* Apr 10, [zkSummit](https://www.zksummit.com/) (Athens) conference _(new/changes in **bold**)_
* Apr 12-14, [ETHDam](https://www.ethdam.com/) hackathon
* **Apr 24, [Privacy Reunion 2](https://twitter.com/privacyguardia/status/1762532962875121786) (Barcelona) conference** - Apr 10, [zkSummit](https://www.zksummit.com/) (Athens) conference
* May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon - Apr 12-14, [ETHDam](https://www.ethdam.com/) hackathon
* May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference - **Apr 24, [Privacy Reunion 2](https://twitter.com/privacyguardia/status/1762532962875121786) (Barcelona) conference**
* Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon - May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon
* Jun 19-26, [Web3Privacy Now Hackathon](https://web3privacy.info/events/) (Bled) - May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference - Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon
* Oct 4-6, [ETHRome](https://ethrome.org/) hackathon - Jun 19-26, [Web3Privacy Now Hackathon](https://web3privacy.info/events/) (Bled)
* Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference - Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference
* Oct, [ETHBrno](https://ethbrno.cz/) hackathon - Oct 4-6, [ETHRome](https://ethrome.org/) hackathon
- Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference
- Oct, [ETHBrno](https://ethbrno.cz/) hackathon

View file

@ -1,5 +1,6 @@
--- ---
curator: mykola curator: mykola
skip: true
--- ---
<!-- <!--
@ -17,5 +18,3 @@ curator: mykola
### Other ### Other
--> -->

View file

@ -1,5 +1,6 @@
--- ---
curator: mykola curator: mykola
skip: true
--- ---
<!-- <!--
@ -17,5 +18,3 @@ curator: mykola
### Other ### Other
--> -->

View file

@ -1,5 +1,6 @@
--- ---
curator: mykola curator: mykola
skip: true
--- ---
<!-- <!--

View file

@ -1,5 +1,6 @@
--- ---
curator: mykola curator: mykola
skip: true
--- ---
<!-- <!--

View file

@ -1,5 +1,6 @@
--- ---
curator: radek curator: radek
skip: true
--- ---
<!-- <!--
@ -25,7 +26,7 @@ curator: radek
--- ---
### Releases ### Releases
--- ---
### Ecosystem ### Ecosystem
@ -37,7 +38,7 @@ curator: radek
--- ---
### Governments ### Governments
--- ---
### Other ### Other
@ -45,14 +46,15 @@ curator: radek
--- ---
### Upcoming events ### Upcoming events
*(new/changes in **bold**)*
* May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon _(new/changes in **bold**)_
* May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon - May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon
* Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel) - May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)** - Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon
* Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference - Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel)
* Oct 4-6, [ETHRome](https://ethrome.org/) hackathon - **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)**
* Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference - Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference
* Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon - Oct 4-6, [ETHRome](https://ethrome.org/) hackathon
- Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference
- Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon

View file

@ -1,5 +1,6 @@
--- ---
curator: radek curator: radek
skip: true
--- ---
<!-- <!--
@ -25,7 +26,7 @@ curator: radek
--- ---
### Releases ### Releases
--- ---
### Ecosystem ### Ecosystem
@ -37,7 +38,7 @@ curator: radek
--- ---
### Governments ### Governments
--- ---
### Other ### Other
@ -45,14 +46,15 @@ curator: radek
--- ---
### Upcoming events ### Upcoming events
*(new/changes in **bold**)*
* May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon _(new/changes in **bold**)_
* May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon - May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon
* Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel) - May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)** - Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon
* Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference - Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel)
* Oct 4-6, [ETHRome](https://ethrome.org/) hackathon - **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)**
* Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference - Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference
* Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon - Oct 4-6, [ETHRome](https://ethrome.org/) hackathon
- Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference
- Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon

View file

@ -1,5 +1,6 @@
--- ---
curator: radek curator: radek
skip: true
--- ---
<!-- <!--
@ -25,7 +26,7 @@ curator: radek
--- ---
### Releases ### Releases
--- ---
### Ecosystem ### Ecosystem
@ -37,7 +38,7 @@ curator: radek
--- ---
### Governments ### Governments
--- ---
### Other ### Other
@ -45,14 +46,15 @@ curator: radek
--- ---
### Upcoming events ### Upcoming events
*(new/changes in **bold**)*
* May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon _(new/changes in **bold**)_
* May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon - May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon
* Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel) - May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)** - Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon
* Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference - Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel)
* Oct 4-6, [ETHRome](https://ethrome.org/) hackathon - **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)**
* Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference - Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference
* Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon - Oct 4-6, [ETHRome](https://ethrome.org/) hackathon
- Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference
- Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon

View file

@ -1,5 +1,6 @@
--- ---
curator: radek curator: radek
skip: true
--- ---
<!-- <!--
@ -25,7 +26,7 @@ curator: radek
--- ---
### Releases ### Releases
--- ---
### Ecosystem ### Ecosystem
@ -37,7 +38,7 @@ curator: radek
--- ---
### Governments ### Governments
--- ---
### Other ### Other
@ -45,14 +46,15 @@ curator: radek
--- ---
### Upcoming events ### Upcoming events
*(new/changes in **bold**)*
* May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon _(new/changes in **bold**)_
* May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon - May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon
* Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel) - May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)** - Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon
* Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference - Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel)
* Oct 4-6, [ETHRome](https://ethrome.org/) hackathon - **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)**
* Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference - Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference
* Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon - Oct 4-6, [ETHRome](https://ethrome.org/) hackathon
- Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference
- Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon

View file

@ -1,5 +1,6 @@
--- ---
curator: radek curator: radek
skip: true
--- ---
<!-- <!--
@ -25,7 +26,7 @@ curator: radek
--- ---
### Releases ### Releases
--- ---
### Ecosystem ### Ecosystem
@ -37,7 +38,7 @@ curator: radek
--- ---
### Governments ### Governments
--- ---
### Other ### Other
@ -45,14 +46,15 @@ curator: radek
--- ---
### Upcoming events ### Upcoming events
*(new/changes in **bold**)*
* May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon _(new/changes in **bold**)_
* May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon - May 24-26, [ETHBerlin](https://ethberlin.org/) hackathon
* Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel) - May 30, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Prague) conference
* **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)** - Jun 7-9, [MoneroKon](https://monerokon.org/) (Prague) conference & hackathon
* Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference - Jun 27, [Privacy Reunion #3](https://lu.ma/privacyreunion3) (Neuchâtel)
* Oct 4-6, [ETHRome](https://ethrome.org/) hackathon - **Jul 12, [Web3Privacy Now "Occupy meetup"](https://lu.ma/w3pn-meetup-bru1)**
* Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference - Oct 4-6, [Hackers Congress Paralelní Polis (HCPP)](https://hcpp.cz/) (Prague) conference
* Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon - Oct 4-6, [ETHRome](https://ethrome.org/) hackathon
- Oct, [Web3Privacy Now Summit](https://web3privacy.info/events/) (Brno) conference
- Oct, [ETHBrno](https://ethbrno.cz/) privacy hackathon

View file

@ -2,6 +2,7 @@
import { setWeek, nextMonday, format, addDays } from 'date-fns'; import { setWeek, nextMonday, format, addDays } from 'date-fns';
const { issue, isFull } = Astro.props; const { issue, isFull } = Astro.props;
import config from '../config.yaml'; import config from '../config.yaml';
// import { Debug } from 'astro:components';
const [ year, week ] = issue.week.split('-'); const [ year, week ] = issue.week.split('-');
const current = false; const current = false;
@ -12,9 +13,8 @@ function capitalizeFirstLetter(string) {
--- ---
<div class=`mb-8 border border-white/20`> <div class=`mb-8 border border-white/20`>
<!-- <Debug answer={issue} /> -->
<div class=`sm:flex w-full p-4 sm:p-6 bg-white/10`> <div class=`sm:flex w-full p-4 sm:p-6 bg-white/10`>
<div class="grid gap-2 sm:gap-6 sm:flex items-center"> <div class="grid gap-2 sm:gap-6 sm:flex items-center">
<h1 class="text-2xl"><a href=`/${issue.week}`>Week {issue.week.split('-').reverse().join('/')}</a></h1> <h1 class="text-2xl"><a href=`/${issue.week}`>Week {issue.week.split('-').reverse().join('/')}</a></h1>

View file

@ -1,13 +1,15 @@
--- ---
import BaseLayout from "../layouts/base.astro";
import BaseLayout from '../layouts/base.astro'; import WeekNews from "../components/WeekNews.astro";
import WeekNews from '../components/WeekNews.astro'; import issues from "../issues.json";
import issues from '../issues.json';
--- ---
<BaseLayout> <BaseLayout>
{issues.sort((x, y) => x.period[0] < y.period[0] ? 1 : -1).filter(i => i.newsHtml !== "").map((issue) => ( {
<WeekNews {issue} /> issues
))} .sort((x, y) => (x.period[0] < y.period[0] ? 1 : -1))
</BaseLayout> // use skip flag to filter out any editions that should be skipped instead of relying on regex match on empty content
.filter((i) => i.newsHtml !== "" && !i.skip)
.map((issue) => <WeekNews {issue} />)
}
</BaseLayout>