Skip to content
Merged
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
36 changes: 36 additions & 0 deletions .github/workflows/update-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update releases.json

on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Fetch latest releases.json
run: |
curl -sSfo /tmp/releases.json \
'https://fedora.gitlab.io/websites-apps/fedora-websites/fedora-websites-3.0/releases.json'

- name: Check for changes
id: diff
run: |
if ! cmp -s /tmp/releases.json assets/fedora-release.json; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi

- name: Commit update
if: steps.diff.outputs.changed == 'true'
run: |
cp /tmp/releases.json assets/fedora-release.json
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add assets/fedora-release.json
git commit -m "Update releases.json from fedora.gitlab.io"
git push
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?

gem "webrick", "~> 1.8"
gem "webrick", "~> 1.9"
gem "csv"
116 changes: 68 additions & 48 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,53 +1,65 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.3)
activesupport (8.1.3.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.8)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
base64 (0.3.0)
bigdecimal (4.1.2)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
colorator (1.1.0)
commonmarker (0.23.10)
concurrent-ruby (1.3.1)
connection_pool (2.4.1)
dnsruby (1.72.1)
commonmarker (0.23.12)
concurrent-ruby (1.3.8)
connection_pool (3.0.2)
csv (3.3.6)
dnsruby (1.74.0)
base64 (>= 0.2)
logger (~> 1.6)
simpleidn (~> 0.2.1)
drb (2.2.1)
drb (2.2.3)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ethon (0.18.0)
ffi (>= 1.15.0)
logger
eventmachine (1.2.7)
execjs (2.9.1)
faraday (2.14.1)
execjs (2.10.1)
faraday (2.14.3)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.2)
faraday-net_http (3.4.4)
net-http (~> 0.5)
ffi (1.16.3)
ffi (1.17.4-aarch64-linux-gnu)
ffi (1.17.4-arm-linux-gnu)
ffi (1.17.4-arm64-darwin)
ffi (1.17.4-x86-linux-gnu)
ffi (1.17.4-x86_64-darwin)
ffi (1.17.4-x86_64-linux-gnu)
forwardable-extended (2.6.0)
gemoji (4.1.0)
github-pages (231)
github-pages (232)
github-pages-health-check (= 1.18.2)
jekyll (= 3.9.5)
jekyll (= 3.10.0)
jekyll-avatar (= 0.8.0)
jekyll-coffeescript (= 1.2.2)
jekyll-commonmark-ghpages (= 0.4.0)
jekyll-commonmark-ghpages (= 0.5.1)
jekyll-default-layout (= 0.1.5)
jekyll-feed (= 0.17.0)
jekyll-gist (= 1.5.0)
Expand Down Expand Up @@ -84,9 +96,10 @@ GEM
liquid (= 4.0.4)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.13.6, < 2.0)
nokogiri (>= 1.16.2, < 2.0)
rouge (= 3.30.0)
terminal-table (~> 1.4)
webrick (~> 1.8)
github-pages-health-check (1.18.2)
addressable (~> 2.3)
dnsruby (~> 1.60)
Expand All @@ -96,12 +109,13 @@ GEM
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (1.14.5)
http_parser.rb (0.8.1)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
jekyll (3.9.5)
jekyll (3.10.0)
addressable (~> 2.4)
colorator (~> 1.0)
csv (~> 3.0)
em-websocket (~> 0.5)
i18n (>= 0.7, < 2)
jekyll-sass-converter (~> 1.0)
Expand All @@ -112,16 +126,17 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
webrick (>= 1.0)
jekyll-avatar (0.8.0)
jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.2.2)
coffee-script (~> 2.2)
coffee-script-source (~> 1.12)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
jekyll-commonmark-ghpages (0.4.0)
commonmarker (~> 0.23.7)
jekyll (~> 3.9.0)
jekyll-commonmark-ghpages (0.5.1)
commonmarker (>= 0.23.7, < 1.1.0)
jekyll (>= 3.9, < 4.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 5.0)
jekyll-default-layout (0.1.5)
Expand Down Expand Up @@ -207,13 +222,14 @@ GEM
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
json (2.18.1)
json (2.21.2)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
listen (3.10.0)
logger
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
Expand All @@ -223,55 +239,58 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.23.1)
mutex_m (0.2.0)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
net-http (0.9.1)
uri (>= 0.11.1)
nokogiri (1.19.1)
nokogiri (1.19.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.19.1-aarch64-linux-gnu)
nokogiri (1.19.4-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.1-arm-linux-gnu)
nokogiri (1.19.4-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.1-arm64-darwin)
nokogiri (1.19.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.19.1-x86_64-darwin)
nokogiri (1.19.4-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.19.1-x86_64-linux-gnu)
nokogiri (1.19.4-x86_64-linux-gnu)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.5)
prism (1.9.0)
public_suffix (5.1.1)
racc (1.8.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.4.2)
rexml (3.4.4)
rouge (3.30.0)
rubyzip (2.3.2)
rubyzip (2.4.1)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.9.2)
sawyer (0.9.3)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.4.1)
simpleidn (0.2.3)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
typhoeus (1.6.0)
ethon (>= 0.18.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (1.8.0)
uri (1.1.1)
webrick (1.8.2)
webrick (1.9.2)

PLATFORMS
aarch64-linux
Expand All @@ -282,14 +301,15 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
csv
github-pages
jekyll-feed (~> 0.6)
minima (~> 2.0)
tzinfo-data
webrick (~> 1.8)
webrick (~> 1.9)

RUBY VERSION
ruby 3.3.1p55
ruby 3.4.8p72

BUNDLED WITH
2.5.11
4.0.17
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ markdown: kramdown
theme: minima
plugins:
- jekyll-feed
show_excerpts: false
header_pages:
- about.md
exclude:
- Gemfile
- Gemfile.lock
6 changes: 4 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
<a class="site-logo" rel="author" href="{{ "/" | relative_url }}">
<img src="{{ site.logo | relative_url }}" alt="{{ site.title | escape }}" height="40">
</a>

{%- if page_paths -%}
<nav class="site-nav">
Expand All @@ -17,7 +19,7 @@
</label>

<div class="trigger">
<a class="page-link" href="/">首页</a><a class="page-link" href="/repo">软件源</a><a class="page-link" href="https://discussion.fedoraproject.org/tags/c/ask/non-english/85/chinese-simplified">问答</a>
<a class="page-link" href="/">首页</a>
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
Expand Down
60 changes: 60 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
layout: default
---

<div class="home">

<section class="hero">
<h1 class="hero-title">{{ site.title | escape }}</h1>
<p class="hero-tagline">{{ site.tagline | escape }}</p>
<p class="hero-meta">已有 {{ site.posts.size }} 篇文章 · 社区始于 2008 年</p>
</section>

<section class="quick-links">
<div class="card-grid">
{%- for link in page.quick_links -%}
{%- if link.url contains "://" -%}
{%- assign href = link.url -%}
{%- assign is_external = true -%}
{%- else -%}
{%- assign href = link.url | relative_url -%}
{%- assign is_external = false -%}
{%- endif -%}
<a class="card{% if link.highlight %} card--highlight{% endif %}"
href="{{ href }}"
{%- if is_external %} target="_blank" rel="noopener"{% endif %}>
{%- if link.icon -%}
<span class="card-icon">{{ link.icon }}</span>
{%- endif -%}
<h3 class="card-title">{{ link.title }}</h3>
<p class="card-desc">{{ link.description }}</p>
</a>
{%- endfor -%}
</div>
</section>

{%- if site.posts.size > 0 -%}
<section class="posts-section">
<div class="posts-header">
<h2 class="posts-heading">最新文章</h2>
<a class="rss-link" href="{{ '/feed.xml' | relative_url }}">RSS</a>
</div>
<div class="card-grid">
{%- assign date_format = site.minima.date_format | default: "%Y-%m-%d" -%}
{%- for post in site.posts limit:4 -%}
<a class="card" href="{{ post.url | relative_url }}">
<span class="card-meta">{{ post.date | date: date_format }}</span>
<h3 class="card-title">{{ post.title | escape }}</h3>
{%- if site.show_excerpts -%}
<p class="card-desc">{{ post.excerpt | strip_html | truncate: 80 }}</p>
{%- endif -%}
</a>
{%- endfor -%}
</div>
<p class="posts-more">
<a href="{{ '/posts/' | relative_url }}">查看全部 {{ site.posts.size }} 篇文章 →</a>
</p>
</section>
{%- endif -%}

</div>
Loading