Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions assets/js/search-filter-sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
const featured = this.container.parentElement?.querySelector('[data-featured]');
if (featured) featured.classList.add('hidden');
}
this._updateSourceAnnouncement();
if (this.state.showFilters || this._hasActiveFilters()) this._showControls();
this._updateShowBtnLabel();
this._bindControls();
Expand Down Expand Up @@ -936,6 +937,7 @@
this._updateCount(filtered.length);
this._updateEmpty(filtered.length === 0);
this._updateResetBtn();
this._updateSourceAnnouncement();
this._updateURL();

if (this._interactive && this.controlsEl) {
Expand Down Expand Up @@ -1028,6 +1030,27 @@
if (emptyEl) emptyEl.classList.toggle('hidden', !isEmpty);
}

_updateSourceAnnouncement() {
const parent = this.container.parentElement;
if (!parent) return;
const announcements = parent.querySelectorAll('[data-source-announcement]');
if (!announcements.length) return;

// Extract source value from search query (e.g. "source:quarto" → "quarto")
const match = this.state.search.match(/\bsource:(\S+)/i);
const source = match ? match[1].toLowerCase().replace(/^"(.*)"$/, '$1') : '';

announcements.forEach(el => {
el.classList.toggle('hidden', el.dataset.sourceAnnouncement !== source);
});

// Also hide featured when a source announcement is visible
const featured = parent.querySelector('[data-featured]');
if (featured && source) {
featured.classList.add('hidden');
}
}

_updateURL() {
const params = new URLSearchParams();
const defaultSortKey = this._defaultSortCfg ? this._defaultSortCfg.key : '';
Expand Down
4 changes: 4 additions & 0 deletions content/blog/q/ai/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: AI
---

### The AI blog has a new home

The AI blog has moved to the [Posit Open Source blog](/blog/). All past and future AI posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/education/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Education
---

### The Education blog has a new home

The Education blog has moved to the [Posit Open Source blog](/blog/). All past and future Education posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/great-tables/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
title: Great Tables
query: "great-tables"
---

### The Great Tables blog has a new home

The Great Tables blog has moved to the [Posit Open Source blog](/blog/). All past and future Great Tables posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/plotnine/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Plotnine
---

### The Plotnine blog has a new home

The Plotnine blog has moved to the [Posit Open Source blog](/blog/). All past and future Plotnine posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/pointblank/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Pointblank
---

### The Pointblank blog has a new home

The Pointblank blog has moved to the [Posit Open Source blog](/blog/). All past and future Pointblank posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/positron/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Positron
---

### The Positron blog has a new home

The Positron blog has moved to the [Posit Open Source blog](/blog/). All past and future Positron posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/quarto/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Quarto
---

### The Quarto blog has a new home

The Quarto blog has moved to the [Posit Open Source blog](/blog/). All past and future Quarto posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/rstudio/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: RStudio
---

### The RStudio blog has a new home

The RStudio blog has moved to the [Posit Open Source blog](/blog/). All past and future RStudio posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/shiny/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Shiny
---

### The Shiny blog has a new home

The Shiny blog has moved to the [Posit Open Source blog](/blog/). All past and future Shiny posts now live here alongside posts from our other open-source projects.
4 changes: 4 additions & 0 deletions content/blog/q/tidyverse/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Tidyverse
---

### The Tidyverse blog has a new home

The Tidyverse blog has moved to the [Posit Open Source blog](/blog/). All past and future Tidyverse posts now live here alongside posts from our other open-source projects.
6 changes: 6 additions & 0 deletions layouts/blog/blog-query.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

<h1 class="text-4xl font-medium text-gray-500 mb-2">{{ .Title }} blog posts</h1>

{{ with .Content }}
<div class="prose max-w-none my-4 p-4 bg-blue-50 border border-blue-200 rounded-lg">
{{ . }}
</div>
{{ end }}

<div class="prose my-4">
{{ partial "button.html" (dict "url" "/blog/" "text" "All blog posts" "icon-left" "boxicons--chevron-left" "size" "small") }}
</div>
Expand Down
9 changes: 9 additions & 0 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
{{ . }}
</div>
{{ end }}

{{ range (site.GetPage "/blog/q").Sections }}
{{ $source := .Params.query | default .File.ContentBaseName }}
{{ with .Content }}
<div data-source-announcement="{{ $source }}" class="hidden prose max-w-none mb-8 p-4 bg-blue-50 border border-blue-200 rounded-lg">
{{ . }}
</div>
{{ end }}
{{ end }}
{{ end }}

{{ $baseCfg := site.Data.filters.blog }}
Expand Down
Loading