Commit f31e669c authored by Alexis Degrugillier's avatar Alexis Degrugillier
Browse files

Merge pull request #12 from marienfressinaud/11-port_to_pelican

Port to pelican
parents b429ecce 3351d442
Source code of freshrss.org
# freshrss.org
Content files for [freshrss.org](http://freshrss.org) website.
freshrss.org uses [Pelican](http://getpelican.com/) as static site generator. It is a powerful Python software which generates HTML from Markdown or reStructuredText formats.
This repository only contains raw content (in Markdown) and does not host FreshRSS theme.
Actually, there is only one content file: `./pages/index.html`. Yes, it is HTML. It is the home page content of freshrss.org and is very specific.
The blog is not yet supported by FreshRSS Pelican theme so blog posts are not present yet. Blog posts will be written in Markdown under a `./blog` directory.
## Installation
We assume in this section you have Python 2.7+ installed on your system, with `pip` command and you work in a virtual environment (`virtualenv`, `pew` or similar).
First, install Pelican and the freshrss.org dependencies:
```bash
$ pip install pelican Markdown
```
Then, run `pelican-quickstart` command:
```bash
$ mkdir freshrss.org
$ cd freshrss.org
$ pelican-quickstart
```
Pelican will ask you some information. Here are what is suggested but you can adapt to your own case:
- Creation path: current path is ok
- Website title: FreshRSS, a free, self-hostable aggregator…
- Website author: Community
- Default language: en
- URL prefix: http://freshrss.org (or you can adapt)
- Articles per page (consider pagination is enabled): 10
- Generate Fabfile/Makefile: yes
- simpleHTTP script: yes
Finally, it will ask you which tools to use to upload your website: the choice is in your hands but SSH is recommended (it provides `scp` and `rsync` upload).
We have now to adapt configuration from the `./pelicanconf.py` file:
1. First, remove `LINKS` and `SOCIAL` information, we don't need of them
2. Next, you should add the following lines to the file:
```python
SITESUBTITLE = 'A free, self-hostable aggregator… probably the best! <small>(in our opinion)</small>'
THEME = 'Freshican'
EXTRA_PATH_METADATA = {
'extra/robots.txt': {'path': 'robots.txt'},
'extra/favicon.ico': {'path': 'favicon.ico'},
'extra/.htaccess': {'path': '.htaccess'},
}
STATIC_PATHS = (
'blog/images/',
'images/',
'extra/',
)
ARTICLE_PATHS = ['blog']
# Specific to FreshRSS theme
SITELOGO = 'http://freshrss.org/img/freshrss_logo.png'
SITEINFOS = '''
<p>Made by <a href="https://github.com/FreshRSS/FreshRSS/graphs/contributors">amazing contributors</a>.</p>
<p>Code licensed under <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL</a>.</p>
<p>Hosted by <a href="http://ovh.com">OVH</a>.</p>
<p>This site uses <a href="http://knacss.com/">KNACSS</a> and <a href="http://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme-symbolic/">GNOME icons</a>.</p>
'''
SOFTWARE = 'FreshRSS'
```
We have nearly finished! All we need now is the FreshRSS theme (Freshican) and... the content (this repository!).
```bash
$ git clone git@github.com:FreshRSS/Freshican.git
$ git clone git@github.com:FreshRSS/freshrss.org.git content
```
You should be able to start the development server and access the website (on http://localhost:8000) correctly:
```bash
$ ./develop_server.sh start
```
This diff is collapsed.
/* Votre Style */
@font-face {
font-family: "SourceSansPro";
src: url("SourceSansPro.ttf");
}
body {
font-family: "SourceSansPro", sans-serif;
font-size: 1.6em;
background: #ecf0f1;
}
a {
color: #0062BE;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.striped-vert tr > th:first-child {
background: none;
}
td {
background: #fafafa;
}
small {
font-size: 0.7em;
}
.header {
padding: 25px;
}
.logo {
max-width: 300px;
}
.tagline {
padding: 0 0 0 80px;
font-size: 1.1em;
font-style: italic;
}
.tagline a:hover {
text-decoration: none;
}
.support {
text-align: center;
}
.presentation {
padding: 25px 0;
}
.presentation .screenshot,
.presentation .download {
vertical-align: middle;
}
.presentation .screenshot img {
border: 1px solid #ddd;
border-radius: 5px;
}
.presentation .download {
text-align: center;
}
.overview {
margin: 25px 0;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
}
.overview .mod {
padding: 25px;
text-align: center;
}
.requirements {
margin: 25px 0;
}
.help {
margin: 25px 0;
padding: 25px 0;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
}
.help .mod {
padding: 0 25px;
text-align: center;
}
.help h2 {
font-size: 1.4em;
}
.btn {
display: inline-block;
min-height: 35px;
min-width: 15px;
padding: 10px 30px;
background: linear-gradient(to bottom, #fff 0%, #eee 100%);
border-radius: 5px;
color: #666;
border: 1px solid #ddd;
border-bottom: 1px solid #aaa;
border-right: 1px solid #aaa;
text-shadow: 0px -1px 0 #aaa;
line-height: 20px;
vertical-align: middle;
cursor: pointer;
}
.btn:hover {
background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
text-decoration: none;
}
.btn:active {
background: #eee;
box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa;
}
.btn.important {
background: linear-gradient(to bottom, #0084CC, #0045CC);
color: #fff;
border: 1px solid #0062B7;
}
.btn.important:hover {
background: linear-gradient(to bottom, #0066CC, #0045CC);
}
.btn.important:active {
background: #0044CB;
box-shadow: none;
}
.btn.important.icon:before {
color: #fff;
}
footer {
margin: 25px 0;
padding: 25px;
color: #666;
text-align: left;
font-size: 0.8em;
}
@media handheld {
body {
background: #fff;
}
#ribbon {
display: none;
}
}
#ribbon {
position: fixed;
top: 3em; left: -5em;
z-index: 1;
-webkit-transform: rotateZ(-45deg);
-ms-transform: rotateZ(-45deg);
-moz-transform: rotateZ(-45deg);
transform: rotateZ(-45deg);
background: #e67e22;
padding: 1px 0;
overflow: hidden;
box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
#ribbon p {
color: #fff;
border: 1px solid #fff;
margin: 0.05em 0;
padding: 0.5em 5.5em;
text-align: center;
font-size: 1em;
font-weight: bold;
}
#ribbon a {
color: #fff;
}
<?php
define('FRESHRSS_REPOSITORY', 'https://github.com/FreshRSS/FreshRSS');
define('FRESHRSS_FLATTR_REPOSITORY', 'https://github.com/marienfressinaud/FreshRSS');
?>
<!doctype html>
<!--[if lte IE 7]> <html class="no-js ie67 ie678" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 ie678" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]> <!--><html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<title>FreshRSS, a free, self-hostable aggregator…</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="css/knacss.css" media="all">
<link rel="stylesheet" href="css/styles.css" media="all">
<link rel="icon" href="./favicon.ico" />
<meta name="description" content="Official website of FreshRSS" />
</head>
<body class="mw960p center">
<header role="banner" class="header grid">
<div class="grid2-1">
<div class="mod title">
<h1><a href="/"><img class="logo" width="300" height="150" src="./img/freshrss_logo.png" alt="FreshRSS" /></a></h1>
<p class="tagline"><a href="/">A free, self-hostable aggregator… probably the best! <small>(in my opinion)</small></a></p>
</div>
<div class="mod support">
<p>You are awesome!</p>
<p><a class="FlattrButton" href="<?php echo FRESHRSS_FLATTR_REPOSITORY ?>">Flattr it!</a></p>
</div>
</div>
</header>
<?php
if (file_exists('version.txt')) {
$next_version = trim(file_get_contents('version.txt'));
?>
<div id="ribbon">
<p><a target="_blank" href="<?php echo FRESHRSS_REPOSITORY ?>/issues/327">Try the <?php echo $next_version; ?>!</a></p>
</div>
<?php
}
?>
<div id="main" role="main" class="grid pam">
<section class="presentation grid2-1">
<div class="mod screenshot">
<img width="600" height="400" src="./img/screenshot.png" alt="FreshRSS" />
</div>
<div class="mod download">
<p><a class="btn important icon icon-dl" href="<?php echo FRESHRSS_REPOSITORY ?>/archive/master.zip">Download</a><br /><small>(<a href="https://www.gnu.org/licenses/agpl-3.0.html">it's free and always will be</a>)</small></p>
<p>or</p>
<p><a class="btn demo" href="http://demo.freshrss.org">Give it a try</a></p>
<p>or</p>
<p><a href="http://doc.freshrss.org/doku.php?id=en:developers">Learn more about the source code</a></p>
<p><a href="<?php echo FRESHRSS_REPOSITORY ?>"><img width="32" height="32" src="img/github.png" alt="Icon of Github" /></a></p>
</div>
</section>
<section class="overview grid3">
<div class="mod">
<h2>Fast</h2>
<img width="150" height="150" src="img/fast.png" alt="FreshRSS is fast" />
<p>FreshRSS can manage +100k articles without complaining.</p>
</div>
<div class="mod">
<h2>Responsive</h2>
<img width="150" height="150" src="img/mobile.png" alt="FreshRSS works on mobile" />
<p>Read your RSS feeds on your mobile without requiring any third-party application.</p>
</div>
<div class="mod">
<h2>Self hostable</h2>
<img width="150" height="150" src="img/server.png" alt="FreshRSS is yours" />
<p>Your data is yours! Host your aggregator and do not depend on anyone.</p>
</div>
</section>
<div class="requirements-title row"><h1>Requirements</h1></div>
<div class="requirements line txtcenter">
<p class="left">You are convinced by FreshRSS but you do not know what you need? Keep calm and have a look at the following table:</p>
<table class="alternate striped-vert">
<caption>Software basis for FreshRSS</caption>
<thead>
<tr>
<th class="txtright" scope="col">Software</th>
<th scope="col">Recommended</th>
<th scope="col">Works also with</th>
</tr>
</thead>
<tbody>
<tr>
<td class="txtright">Web server</td>
<td><strong>Apache2</strong></td>
<td>Nginx, Lighttpd</td>
</tr>
<tr>
<td class="txtright">PHP</td>
<td><strong>PHP 5.3.7+</strong></td>
<td>PHP 5.2+</td>
</tr>
<tr>
<td class="txtright">PHP modules</td>
<td>
<p>Required: <a href="http://php.net/xml">libxml</a>, <a href="http://php.net/curl">cURL</a>, <a href="http://php.net/pdo-mysql">PDO_MySQL</a> or <a href="http://php.net/pdo-sqlite">PDO_SQLite</a>, <a href="http://php.net/gmp">GMP</a></p>
<p>Recommended: <a href="http://fr2.php.net/json">JSON</a>, <a href="http://php.net/zlib">Zlib</a>, <a href="http://php.net/mbstring">mbstring</a>, <a href="http://php.net/iconv">iconv</a>, <a href="http://php.net/zip">Zip</a></p>
</td>
<td>
</td>
</tr>
<tr>
<td class="txtright">Database</td>
<td><strong>MySQL 5.0.3+</strong></td>
<td>SQLite 3.7.4+</td>
</tr>
<tr>
<td class="txtright">Web browser</td>
<td><strong>Firefox</strong></td>
<td>Chrome, Opera, Safari or IE 9+</td>
</tr>
</tbody>
</table>
</div>
<div class="help-title row"><h1>Are you feeling a bit confused?</h1></div>
<section class="help grid3">
<div class="mod">
<h2><a href="http://doc.freshrss.org/doku.php?id=en:users">Read the documentation</a></h2>
<a href="http://doc.freshrss.org/doku.php?id=en:users"><img width="150" height="150" src="img/doc.png" alt="documentation" /></a>
<p>The documentation is your best friend. I guess the answer you are searching is already in!<br />(still under construction)</p>
</div>
<div class="mod">
<h2><a href="<?php echo FRESHRSS_REPOSITORY ?>/issues">Report a bug</a></h2>
<a href="<?php echo FRESHRSS_REPOSITORY ?>/issues"><img width="150" height="150" src="img/bug.png" alt="bug" /></a>
<p>Oh crap! FreshRSS has crashed? Maybe the bug is already known… or maybe not. Have a look at the bug tracker and do not hesitate to open a new issue.</p>
</div>
<div class="mod">
<h2><a href="mailto:dev@marienfressinaud.fr">Send me an email</a></h2>
<a href="mailto:dev@marienfressinaud.fr"><img width="150" height="150" src="img/mail.png" alt="contact me" /></a>
<p>You did not find any answer? Or you do not want to create an account on GitHub? Don't hesitate to contact me by email.</p>
</div>
</section>
</div>
<footer id="footer" role="contentinfo" class="grid">
<div class="grid2-1">
<div>
<p>Made by <a href="<?php echo FRESHRSS_REPOSITORY ?>/graphs/contributors">amazing contributors</a>.</p>
<p>Code licensed under <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL</a>.</p>
<p>Hosted by <a href="http://ovh.com">OVH</a>.</p>
<p>This site uses <a href="http://knacss.com/">KNACSS</a> and <a href="http://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme-symbolic/">GNOME icons</a>.</p>
</div>
<div>
<p>FreshRSS does not meet your expectations?<br />
<noscript><a href="http://alternativeto.net/software/freshrss/">Have a look at some alternatives</a></noscript>
<span id="a2itemwidget"></span></p>
</div>
</div>
</footer>
<script type="text/javascript" async="true" src="http://api.flattr.com/js/0.6/load.js?mode=auto"></script>
<script type="text/javascript" async="true" src="scripts/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
function init_widget() {
if (!window.$) {
if (window.console) {
console.log('Waiting for JS…');
}
window.setTimeout(init_widget, 100);
return;
}
$(function () {
$.getJSON('http://api.alternativeto.net/software/freshrss/widget/blue/?jsoncallback=?',
function (json) {
//doucment.write(json.Widget);
$('#a2itemwidget').html(json.Widget);
}
);
});
}
init_widget();
</script>
</body>
</html>
<html>
<head>
<title>FreshRSS index page</title>
<meta name="date" content="2015-02-11" />
<meta name="save_as" content="index.html" />
</head>
<body>
<section class="presentation grid2-1">
<div class="mod screenshot">
<img width="600" height="400" src="images/screenshot.png" alt="FreshRSS" />
</div>
<div class="mod download">
<p><a class="btn important icon icon-dl" href="https://github.com/FreshRSS/FreshRSS/archive/master.zip">Download</a><br /><small>(<a href="https://www.gnu.org/licenses/agpl-3.0.html">it's free and always will be</a>)</small></p>
<p>or</p>
<p><a class="btn demo" href="http://demo.freshrss.org">Give it a try</a></p>
<p>or</p>
<p><a href="http://doc.freshrss.org/doku.php?id=en:developers">Learn more about the source code</a></p>
<p><a href="https://github.com/FreshRSS/FreshRSS"><img width="32" height="32" src="images/github.png" alt="Icon of Github" /></a></p>
</div>
</section>
<section class="overview grid3">
<div class="mod">
<h2>Fast</h2>
<img width="150" height="150" src="images/fast.png" alt="FreshRSS is fast" />
<p>FreshRSS can manage +100k articles without complaining.</p>
</div>
<div class="mod">
<h2>Responsive</h2>
<img width="150" height="150" src="images/mobile.png" alt="FreshRSS works on mobile" />
<p>Read your RSS feeds on your mobile without requiring any third-party application.</p>
</div>
<div class="mod">
<h2>Self hostable</h2>
<img width="150" height="150" src="images/server.png" alt="FreshRSS is yours" />
<p>Your data is yours! Host your aggregator and do not depend on anyone.</p>
</div>
</section>
<div class="requirements-title row"><h1>Requirements</h1></div>
<div class="requirements line txtcenter">
<p class="left">You are convinced by FreshRSS but you do not know what you need? Keep calm and have a look at the following table:</p>
<table class="alternate striped-vert">
<caption>Software basis for FreshRSS</caption>
<thead>
<tr>
<th class="txtright" scope="col">Software</th>
<th scope="col">Recommended</th>
<th scope="col">Works also with</th>
</tr>
</thead>
<tbody>
<tr>
<td class="txtright">Web server</td>
<td><strong>Apache2</strong></td>
<td>Nginx, Lighttpd</td>
</tr>
<tr>
<td class="txtright">PHP</td>
<td><strong>PHP 5.3.7+</strong></td>
<td>PHP 5.2+</td>
</tr>
<tr>
<td class="txtright">PHP modules</td>
<td>
<p>Required: <a href="http://php.net/xml">libxml</a>, <a href="http://php.net/curl">cURL</a>, <a href="http://php.net/pdo-mysql">PDO_MySQL</a> or <a href="http://php.net/pdo-sqlite">PDO_SQLite</a>, <a href="http://php.net/gmp">GMP</a></p>
<p>Recommended: <a href="http://fr2.php.net/json">JSON</a>, <a href="http://php.net/zlib">Zlib</a>, <a href="http://php.net/mbstring">mbstring</a>, <a href="http://php.net/iconv">iconv</a>, <a href="http://php.net/zip">Zip</a></p>
</td>
<td>
</td>
</tr>
<tr>
<td class="txtright">Database</td>
<td><strong>MySQL 5.0.3+</strong></td>
<td>SQLite 3.7.4+</td>
</tr>
<tr>
<td class="txtright">Web browser</td>
<td><strong>Firefox</strong></td>
<td>Chrome, Opera, Safari or IE 9+</td>
</tr>
</tbody>
</table>
</div>
<div class="help-title row"><h1>Are you feeling a bit confused?</h1></div>
<section class="help grid3">
<div class="mod">
<h2><a href="http://doc.freshrss.org/doku.php?id=en:users">Read the documentation</a></h2>
<a href="http://doc.freshrss.org/doku.php?id=en:users"><img width="150" height="150" src="images/doc.png" alt="documentation" /></a>
<p>The documentation is your best friend. I guess the answer you are searching is already in!<br />(still under construction)</p>
</div>
<div class="mod">
<h2><a href="https://github.com/FreshRSS/FreshRSS/issues">Report a bug</a></h2>
<a href="https://github.com/FreshRSS/FreshRSS/issues"><img width="150" height="150" src="images/bug.png" alt="bug" /></a>
<p>Oh crap! FreshRSS has crashed? Maybe the bug is already known… or maybe not. Have a look at the bug tracker and do not hesitate to open a new issue.</p>
</div>
<div class="mod">
<h2><a href="https://freshrss.org/mailman/listinfo/mailing">Send us an email</a></h2>
<a href="https://freshrss.org/mailman/listinfo/mailing"><img width="150" height="150" src="images/mail.png" alt="contact us" /></a>
<p>You did not find any answer? Or you do not want to create an account on GitHub? Don't hesitate to subscribe to our mailing list.</p>
</div>
</section>
</body>
</html>
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment