Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1760 Skeleton sites #3792

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
17 changes: 17 additions & 0 deletions nikola/data/sampleblog/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
This folder contains the source used to generate a static site using Nikola.

Installation and documentation at https://getnikola.com/

Configuration file for the site is ``conf.py``.

To build the site::

nikola build

To see it::

nikola serve -b

To check all available commands::

nikola help
Binary file added nikola/data/sampleblog/files/favicon.ico
Binary file not shown.
Binary file added nikola/data/sampleblog/files/images/nikola.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions nikola/data/sampleblog/galleries/demo/exclude.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tesla2_lg.jpg
4 changes: 4 additions & 0 deletions nikola/data/sampleblog/galleries/demo/index.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. title: Nikola Tesla

Some public domain pictures of Nikola Tesla
(copied from `here <https://kerryr.net/pioneers/gallery/tesla.htm>`_)
13 changes: 13 additions & 0 deletions nikola/data/sampleblog/galleries/demo/metadata.sample.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: tesla_tower1_lg.jpg
caption: Wardenclyffe Tower
built_in: 1904
order: 2
---
name: tesla4_lg.jpg
order: 0
---
name: tesla_conducts_lg.webp
caption: Nikola Tesla conducts electricity
order: 1
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nikola/data/sampleblog/images/frontispiece.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added nikola/data/sampleblog/images/illus_001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions nikola/data/sampleblog/listings/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/python

import sys


def hello(name='world'):
greeting = "hello " + name
print(greeting)


if __name__ == "__main__":
hello(*sys.argv[1:])
11 changes: 11 additions & 0 deletions nikola/data/sampleblog/pages/1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. title: Nikola: it generates static
.. slug: about-nikola
.. date: 2012-03-30 23:00:00 UTC-03:00
.. tags:
.. link:
.. description:

Hope you enjoy this software!

* Home page at https://getnikola.com/
* Author's blog (and reason why Nikola exists): https://ralsina.me/
1,047 changes: 1,047 additions & 0 deletions nikola/data/sampleblog/pages/bootstrap-demo.rst

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions nikola/data/sampleblog/pages/charts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. link:
.. description:
.. tags:
.. date: 2013-08-27 18:20:55 UTC-03:00
.. title: Charts
.. slug: charts

If you are using reStructuredText and install pygal, Nikola has support for rather nice charts
with little effort, and i's even semi-interactive (hover your pointer over the legend!):

.. code:: rest

.. chart:: StackedLine
:title: 'Browser usage evolution (in %)'
:fill: True
:x_labels: ['2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012']
:width: 600
:height: 400
:explicit_size: True
:style: BlueStyle

('Others', [14.2, 15.4, 15.3, 8.9, 9, 10.4, 8.9, 5.8, 6.7, 6.8, 7.5])
('IE', [85.8, 84.6, 84.7, 74.5, 66, 58.6, 54.7, 44.8, 36.2, 26.6, 20.1])
('Firefox', [None, None, None, 16.6, 25, 31, 36.4, 45.5, 46.3, 42.8, 37.1])
('Chrome', [None, None, None, None, None, None, 0, 3.9, 10.8, 23.8, 35.3])

.. raw:: html

<div style="text-align: center;">

.. chart:: StackedLine
:title: 'Browser usage evolution (in %)'
:fill: True
:x_labels: ['2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012']
:width: 600
:height: 400
:explicit_size: True
:style: BlueStyle

('Others', [14.2, 15.4, 15.3, 8.9, 9, 10.4, 8.9, 5.8, 6.7, 6.8, 7.5])
('IE', [85.8, 84.6, 84.7, 74.5, 66, 58.6, 54.7, 44.8, 36.2, 26.6, 20.1])
('Firefox', [None, None, None, 16.6, 25, 31, 36.4, 45.5, 46.3, 42.8, 37.1])
('Chrome', [None, None, None, None, None, None, 0, 3.9, 10.8, 23.8, 35.3])

.. raw:: html

</div>


Here's how it works:

* Next to the directive, use the `chart type you want <http://pygal.org/chart_types/>`_
* Any option you can set in a chart? Use it like ``:title:`` in this example. Syntax on
the value is just like in the pygal examples.
* For each data series do it like the line that says ``Firefox`` in this example. The first element
is the label, then comes the data.

Easy, right? Please explore `the pygal site <http://pygal.org>`_ for more information, and just
take this example and tweak stuff.
1 change: 1 addition & 0 deletions nikola/data/sampleblog/pages/creating-a-theme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../../../docs/creating-a-theme.rst
Loading