Skip to content

Commit

Permalink
move from news-o-o
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe committed Apr 5, 2020
1 parent b03d837 commit 59588cb
Show file tree
Hide file tree
Showing 39 changed files with 507 additions and 391 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Jekyll site CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build the site in the jekyll/builder container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future"
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
_site
.sass-cache
.bundle/
.jekyll-cache/
.jekyll-metadata
.sass-cache/
_site/
vendor/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
source "https://rubygems.org"
gem "jekyll", "~> 3.6.3"
source 'https://rubygems.org'
gem 'jekyll'
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem 'jekyll-paginate'
gem 'jekyll-archives'
end
7 changes: 2 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ GEM
safe_yaml (~> 1.0)
jekyll-archives (2.1.1)
jekyll (>= 2.4)
jekyll-feed (0.9.3)
jekyll (~> 3.3)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
Expand Down Expand Up @@ -50,10 +48,9 @@ PLATFORMS
ruby

DEPENDENCIES
jekyll (~> 3.6.3)
jekyll
jekyll-archives
jekyll-feed (~> 0.6)
jekyll-paginate

BUNDLED WITH
1.16.1
1.17.2
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# openSUSE-jekyll-news-theme
# openSUSE Jekyll Theme

Simple and readable openSUSE jekyll theme

## Installation

## Development

### How to build?

```bash
bundle install --path vendor/bundle
bundle exec jekyll build
```

Resulting site will be in `_site` directory.

### How to serve locally?

```bash
bundle install --path vendor/bundle
bundle exec jekyll serve
```

Visit <http://127.0.0.1:4000/> in your browser.
16 changes: 10 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
title: openSUSE News
email: your-email@opensuse.org
email: admin@opensuse.org
description: >-
openSUSE News site providing newest news from openSUSE Project
openSUSE News site providing newest news from the openSUSE Project
baseurl: ""
url: ""
url: "https://news.opensuse.org"
sourcecode: "https://github.com/openSUSE/news-o-o"

excerpt_separator: <!--more-->

markdown: kramdown
plugins:
- jekyll-feed
- jekyll-paginate
- jekyll-archives
paginate: 6
paginate_path: '/page:num/'
paginate: 10
paginate_path: '/page/:num/'
permalink: /:year/:month/:day/:title/

jekyll-archives:
Expand All @@ -29,3 +31,5 @@ jekyll-archives:
day: day-archive
tag: cattag-archive
category: cattag-archive

exclude: [README.md, Gemfile, Gemfile.lock, vendor]
34 changes: 0 additions & 34 deletions _includes/footer-ads.html

This file was deleted.

53 changes: 6 additions & 47 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,12 @@
<footer class="global-footer">
<div class="container">
<div class="row">
<div class="col-6 col-md-3">
<h6>Developers</h6>
<ul class="list-unstyled">
<li><a href="https://en.opensuse.org/Portal:Development">Documentation</a></li>
<li><a href="https://build.opensuse.org/">Build service</a></li>
<li><a href="https://bugzilla.opensuse.org/">Bugzilla</a></li>
<li><a href="https://github.com/openSUSE">Github</a></li>
<li><a href="https://features.opensuse.org/">openFATE</a></li>
</ul>
</div>
<div class="col-6 col-md-3">
<h6>Information</h6>
<ul class="list-unstyled">
<li><a href="https://news.opensuse.org/">News</a></li>
<li><a href="https://doc.opensuse.org/release-notes/">Release notes</a></li>
<li><a href="https://events.opensuse.org/">Events</a></li>
<li><a href="http://planet.opensuse.org/">Planet</a></li>
<li><a href="https://shop.opensuse.org/">Shop</a></li>
</ul>
</div>
<div class="col-6 col-md-3">
<h6>Community</h6>
<ul class="list-unstyled">
<li><a href="https://forums.opensuse.org/">Forums</a></li>
<li><a href="https://connect.opensuse.org/">Connect</a></li>
<li><a href="https://www.facebook.com/groups/opensuseproject/">Facebook group</a></li>
<li><a href="https://plus.google.com/communities/115444043324891769569">Google+ group</a></li>
<li><a href="https://en.opensuse.org/openSUSE:Mailing_lists_subscription">Mail lists</a></li>
<li><a href="https://en.opensuse.org/openSUSE:IRC_list">IRC channels</a></li>
</ul>
</div>
<div class="col-6 col-md-3">
<h6>Social Media</h6>
<ul class="list-unstyled">
<li><a href="https://www.facebook.com/en.openSUSE">Facebook</a></li>
<li><a href="https://plus.google.com/+openSUSE">Google+</a></li>
<li><a href="https://twitter.com/opensuse">Twitter</a></li>
<li><a href="https://www.youtube.com/user/opensusetv">YouTube</a></li>
<li><a href="https://t.me/opensusenews">Telegram</a></li>
</ul>
</div>
</div>

<div class="footer-copyright-language-row">
<div class="d-flex justify-content-between">
<div class="footer-copyright">
© 2011–2017 openSUSE contributors
© 2011–{{ site.time | date: '%Y' }} openSUSE contributors
</div>
<a href="{{ site.sourcecode }}">
Source code
</a>
</div>
</div><!-- /.container -->
</div>
</footer>
86 changes: 77 additions & 9 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,80 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://opensuse-zh.github.io/chameleon/js/app.js" type="text/javascript" charset="utf-8"></script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<meta name="description"
content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}" />

<link rel="stylesheet" href="{{ "/assets/chameleon/dist/css/chameleon.css" | relative_url }}">
<link rel="stylesheet" href="{{ "/assets/css/app.css" | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
</head>
<link rel="stylesheet" href="https://static.opensuse.org/chameleon/dist/css/chameleon.css" />
<link rel="stylesheet" href="{{ '/assets/css/app.css' | relative_url }}" />

<link rel='shortcut icon' type='image/x-icon'
href='https://static.opensuse.org/chameleon/dist/images/favicons/favicon.ico' />
<link color="#73ba25" href="https://static.opensuse.org/chameleon/dist/images/favicons/mask-icon.svg" rel="mask-icon">
<link href="{{ '/manifest.json' | absolute_url }}" rel="manifest">

<meta name="mobile-web-app-capable" content="yes" />

<meta property="og:site_name" content="{{ site.title | escape }}" />
<meta property="og:title"
content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}" />
<meta property="og:type" content="article" />
{% if page.layout == 'post' %}
<meta property="og:description" content="{{ page.content | strip_html | truncatewords: 50 }}" />
<meta property="og:article:author" content="{{ page.author }}" />
<meta property="og:article:published_time" content="{{ page.date | date_to_xmlschema }}" />
{% for tag in page.tags %}
<meta property="og:article:tag" content="{{ tag }}" />
{% endfor %}
{% endif %}
{% if page.image %}
<meta property="og:image"
content="{% if page.image contains '//' %}{{ page.image }}{% else %}{{ page.image | absolute_url }}{% endif %}" />
{% else %}
<meta property="og:image" content="https://static.opensuse.org/chameleon/dist/images/favicons/favicon.png" />
{% endif %}
<meta property="og:url" content="{{ page.path | replace:'index.html','' | absolute_url }}" />

<meta name="twitter:card" content="summary" />
<meta name="twitter:title"
content="{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}" />
{% if page.layout == 'post' %}
<meta name="twitter:description" content="{{ page.content | strip_html | truncate: 190 }}" />
{% endif %}
<meta name="twitter:url" content="{{ page.url | replace:'index.html','' | absolute_url }}" />
{% if page.image %}
<meta name="twitter:image"
content="{% if page.image contains '//' %}{{ page.image }}{% else %}{{ page.image | absolute_url }}{% endif %}" />
{% else %}
<meta name="twitter:image" content="https://static.opensuse.org/chameleon/dist/images/favicons/favicon.png" />
{% endif %}

<meta name="theme-color" content="#73ba25" />

<script defer src="https://static.opensuse.org/chameleon/dist/js/chameleon.js" type="text/javascript"
charset="utf-8"></script>

<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function () {
var u = (("https:" == document.location.protocol) ? "https" : "http") + "://" + "beans.opensuse.org/matomo/";
_paq.push(["setTrackerUrl", u + "matomo.php"]);
_paq.push(["setSiteId", "13"]);
var d = document, g = d.createElement("script"), s = d.getElementsByTagName("script")[0];
g.type = "text/javascript";
g.defer = true;
g.async = true;
g.src = u + "piwik.js";
s.parentNode.insertBefore(g, s);
})();
</script>
<!-- End Piwik Code -->

<link rel="alternate" type="application/rss+xml" title="openSUSE News RSS" href="/feed.xml">

<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}" />
</head>
Loading

0 comments on commit 59588cb

Please sign in to comment.