Skip to content

Commit

Permalink
Merge pull request #3941 from carlopi/random_selection_ce
Browse files Browse the repository at this point in the history
[Community Extensions] Random selection of extension (decided by jekyll sample) on the bar
  • Loading branch information
szarnyasg authored Nov 6, 2024
2 parents 2087435 + 318f25e commit da80085
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
27 changes: 26 additions & 1 deletion _data/menu_ce.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,30 @@
"page": "List of Community Extensions",
"url": "/community_extensions/list_of_extensions"
}
],
"extensions": [
"bigquery",
"crypto",
"evalexpr_rhai",
"flockmtl",
"h3",
"httpserver",
"magic",
"pivot_table",
"psql",
"scrooge",
"shellfs",
"ulid",
"chsql",
"duckpgq",
"faiss",
"fuzzycomplete",
"http_client",
"lindel",
"open_prompt",
"prql",
"quack",
"sheetreader",
"tarfs"
]
}
}
19 changes: 19 additions & 0 deletions _includes/menu_sidebar_ce.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,25 @@
</ul>
{% endif %}
{% endfor %}

{% assign urlContains = true %}
{% assign base_slash = '' %}
<li class="item-menu active opened">
{% if item.mainfolderitems[0] %} <span class="show"></span> {% endif %} {% if item.mainfolderitems[0] %} <span class="show"></span> {% endif %} {{ item.page }}
</li>
<ul style="display: {% if urlContains %}block;{% else %}none{% endif %}">
{% assign mylist = site.data[menudocfile].extensions | sample: 5 %}
{% for entry in mylist %}
<li class="mainentry-menu
{%- if urlParts[2] == mainentry.url %} active{% endif -%}
{%- if mainentry.url %} {{ mainentry.url }}{% endif -%}
{%- if urlParts[2] %} {{ urlParts[2]}}{% endif -%}
opened
">
<a href="/community_extensions/extensions/{{ entry }}">{{ entry }}</a>
</li>
{% endfor %}
</ul>
{% endif %}


Expand Down

0 comments on commit da80085

Please sign in to comment.