Skip to content

Commit 9ef49ea

Browse files
jamesmuddjimbaker
authored andcommitted
Initial website (#3)
* Add .gitignore for Jekyll project https://raw.githubusercontent.com/jekyll/jekyll/master/.gitignore * Add Gemfile Following the tutorial here https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/ * Add initial _config.yml * Add initial news.md file * Add initial navigation bar * Add favicon * Add initial navigation bar * Cleanup header * More navigation links and cleanup * Add dev-guide to navigation * Add Download page * Add some content to the README.md * Remove absolute path to index * Cleanup fonts used in navbar * Add Wiki to navigation * Add link to javadoc.io * Update dev guide link * Remove autogenerated maintained by footer * Tweak navbar * Refactor navbar to improve naming Add comments * Add website source link to development * Add links and Java example to home page * Convert to H2 titles * Add PSF to page footer * Add new links page * Rename README.md → index.md This makes it clearer that index is the home page of the site and allows a new README.md to be created containing infomation on how to develop the site. * Add new README.md * Add "Who uses Jython" section * Improve favicon support * Change to higher res logo * Add page titles * Add installation page The content was taken from: https://wiki.python.org/jython/InstallationInstructions * Improve download page * Reformat news.md * Add news item about new website * Cleanup typos and spelling * Update README * Fix typos * Add archive sites Currently points to existing jython.org this needs re-hosting somewhere else.
1 parent 4af090d commit 9ef49ea

16 files changed

+408
-2
lines changed

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Jekyll
2+
_site/
3+
.jekyll-cache
4+
.jekyll-metadata
5+
.sass-cache
6+
7+
# Ruby
8+
.bundle/
9+
.byebug_history
10+
.ruby-gemset
11+
.ruby-version
12+
*.gem
13+
Gemfile.lock
14+
15+
# Files
16+
.analysis
17+
.DS_Store
18+
*.swp
19+
*~
20+
21+
# Folders
22+
/vendor
23+
bbin/
24+
bin/
25+
coverage
26+
gh-pages/
27+
pkg/
28+
test/dest
29+
tmp/*

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source 'https://rubygems.org'
2+
gem 'github-pages', group: :jekyll_plugins

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1-
# jython.github.io
2-
Web site for Jython
1+
# Jython Website
2+
This is the source repository for the Jython website.
3+
4+
## To develop the website
5+
6+
A quick guide to developing the website locally
7+
8+
1. Clone this repository
9+
2. Run `bundle exec jekyll serve` in the repository. See [here](https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll) for more information on setting up Jekyll
10+
3. Browse to [http://127.0.0.1:4000](http://127.0.0.1:4000)
11+
4. View the website locally
12+
5. Make changes to the source
13+
6. Refresh the browser page and the changes should be visible
14+
7. Once your happy with the changes create a pull request

_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
title: Jython
2+
description: The Python runtime on the JVM
3+
4+
theme: jekyll-theme-slate

_data/navbar.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This file contains the contents of the navigation bar.
2+
# If subItems are defined the menu will contain a drop down containing the sub items
3+
navbar:
4+
- title: Home
5+
url: index
6+
- title: News
7+
url: news
8+
- title: Download
9+
url: download
10+
- title: Documentation
11+
subItems:
12+
- title: Installation
13+
url: installation
14+
- title: JavaDoc
15+
url: http://www.javadoc.io/doc/org.python/jython-standalone/2.7.1
16+
- title: Jython Book
17+
url: https://jython.readthedocs.io/en/latest/
18+
- title: Wiki
19+
url: https://wiki.python.org/jython/
20+
- title: Archived Sites
21+
url: archived_sites
22+
- title: Development
23+
subItems:
24+
- title: Bug tracker
25+
url: http://bugs.jython.org/
26+
- title: Github
27+
url: https://github.com/jythontools/jython
28+
- title: Mercurial
29+
url: https://hg.python.org/jython/
30+
- title: Mailing List
31+
url: https://sourceforge.net/p/jython/mailman/
32+
- title: Developer Guide
33+
url: https://jython-devguide.readthedocs.io/en/latest/
34+
- title: Website source
35+
url: https://github.com/jython/jython.github.io/
36+
- title: Links
37+
url: links

_includes/navigation.html

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<div class="navbar">
2+
{% for item in site.data.navbar.navbar %}
3+
{% if item.subItems == null %}
4+
<a href="{{ item.url }}">{{ item.title }}</a>
5+
{% else %}
6+
<div class="dropdown">
7+
<button class="dropbtn">{{ item.title }}
8+
<i class="fa fa-caret-down"></i>
9+
</button>
10+
<div class="dropdown-content">
11+
{% for entry in item.subItems %}
12+
<a href="{{ entry.url }}">{{ entry.title }}</a>
13+
{% endfor %}
14+
</div>
15+
</div>
16+
{% endif %}
17+
{% endfor %}
18+
</div>
19+
20+
<style type="text/css">
21+
/* Navbar container */
22+
.navbar {
23+
overflow: hidden;
24+
}
25+
26+
/* Links inside the navbar */
27+
.navbar a {
28+
float: left;
29+
font-size: 16px;
30+
color: white;
31+
padding: 13px 16px 15px 16px;
32+
text-decoration: none;
33+
}
34+
35+
/* The dropdown container */
36+
.dropdown {
37+
float: left;
38+
overflow: hidden;
39+
}
40+
41+
/* Dropdown button */
42+
.dropdown .dropbtn {
43+
font-size: 16px;
44+
border: none;
45+
outline: none;
46+
color: white;
47+
padding: 14px 16px;
48+
background-color: inherit;
49+
font-family: 'Myriad Pro', Calibri, Helvetica, Arial;
50+
line-height: 1.5;
51+
-webkit-font-smoothing: antialiased;;
52+
}
53+
54+
/* Add a blue background color to navbar links on hover */
55+
.navbar a:hover, .dropdown:hover .dropbtn {
56+
background-color: #0090ff;
57+
}
58+
59+
/* Dropdown content (hidden by default) */
60+
.dropdown-content {
61+
display: none;
62+
position: absolute;
63+
background-color: #f9f9f9;
64+
min-width: 160px;
65+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
66+
z-index: 1;
67+
68+
}
69+
70+
/* Links inside the dropdown */
71+
.dropdown-content a {
72+
float: none;
73+
color: black;
74+
padding: 12px 16px;
75+
text-decoration: none;
76+
display: block;
77+
text-align: left;
78+
}
79+
80+
/* Add a grey background color to dropdown links on hover */
81+
.dropdown-content a:hover {
82+
background-color: #ddd;
83+
}
84+
85+
/* Show the dropdown menu on hover */
86+
.dropdown:hover .dropdown-content {
87+
display: block;
88+
}
89+
</style>

_layouts/default.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ site.lang | default: "en-US" }}">
3+
4+
<head>
5+
<meta charset='utf-8'>
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width,maximum-scale=2">
8+
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/style.css?">
9+
<link rel="icon" type="image/png" href="assets/favicon32.png">
10+
11+
{% seo %}
12+
</head>
13+
14+
<body>
15+
16+
<!-- HEADER -->
17+
<div id="header_wrap" class="outer">
18+
<header class="inner">
19+
<a id="forkme_banner" href="https://github.com/jythontools/jython">View on Github</a>
20+
21+
<a id=logo href="index"><img id="logo" src="assets/jython.png" alt="Jython Logo" height="70" width="109"></a>
22+
23+
{% if site.show_downloads %}
24+
<section id="downloads">
25+
<a class="zip_download_link" href="{{ site.github.zip_url }}">Download this project as a .zip file</a>
26+
<a class="tar_download_link" href="{{ site.github.tar_url }}">Download this project as a tar.gz file</a>
27+
</section>
28+
{% endif %}
29+
{% include navigation.html %}
30+
</header>
31+
</div>
32+
33+
<!-- MAIN CONTENT -->
34+
<div id="main_content_wrap" class="outer">
35+
<section id="main_content" class="inner">
36+
{{ content }}
37+
</section>
38+
</div>
39+
40+
<!-- FOOTER -->
41+
<div id="footer_wrap" class="outer">
42+
<footer class="inner">
43+
<p>Jython is a member of the <a href="https://www.python.org/psf/">Python Software Foundation</a></p>
44+
<p>Published with <a href="https://pages.github.com">GitHub Pages</a></p>
45+
</footer>
46+
</div>
47+
48+
{% if site.google_analytics %}
49+
<script>
50+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
51+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
52+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
53+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
54+
ga('create', '{{ site.google_analytics }}', 'auto');
55+
ga('send', 'pageview');
56+
</script>
57+
{% endif %}
58+
</body>
59+
</html>

archived_sites.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Archived Sites
3+
---
4+
## Old Archived Jython Websites
5+
This is the place to access old versions of the Jython website.
6+
7+
### [Jython 2.5 - 2.7](http://www.jython.org/)
8+
9+
### [Jython 2.2.1](http://www.jython.org/archive/221/index.html)
10+
11+
### [Jython 2.2](http://www.jython.org/archive/22/index.html)
12+
13+
### [Jython 2.1](http://www.jython.org/archive/21/index.html)
14+

assets/css/style.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
---
3+
4+
@import "{{ site.theme }}";
5+
6+
#header_wrap .inner {
7+
padding: 0px 10px 0px 10px;
8+
}
9+
10+
#logo {
11+
box-shadow: none;
12+
border: none;
13+
webkit-box-shadow: none;
14+
padding: 2px;
15+
margin: 10px 0px 0px 0px;
16+
}

assets/favicon32.png

765 Bytes
Loading

assets/jython.png

11.8 KB
Loading

download.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Downloads
3+
---
4+
## Current Version
5+
The current version of Jython is 2.7.1
6+
It can be downloaded here:
7+
- [Jython Installer](http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar) - Use this to install Jython.
8+
- [Jython Standalone](http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/2.7.1/jython-standalone-2.7.1.jar) - Use this to run Jython without installing or to embed Jython in a Java application.
9+
10+
For information on installing see [Installation](installation).
11+
12+
This version is supported on Java 7 and 8.
13+
14+
## Previous Versions
15+
Previous versions of Jython are available from:
16+
- [Jython Installer](https://search.maven.org/search?q=g:org.python%20AND%20a:jython-installer&core=gav)
17+
- [Jython Standalone](https://mvnrepository.com/artifact/org.python/jython-standalone)

index.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Home
3+
---
4+
## What is Jython?
5+
Jython is a [Java](https://go.java/index.html) implementation of [Python](https://www.python.org/) that combines expressive power with clarity. Jython is freely available for both commercial and non-commercial use and is distributed with source code under the [PSF License v2](https://github.com/jythontools/jython/blob/master/LICENSE.txt). Jython is complementary to Java and is especially suited for the following tasks:
6+
7+
* Embedded scripting - Java programmers can add the Jython libraries to their system to allow end users to write simple or complicated scripts that add functionality to the application.
8+
* Interactive experimentation - Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This allows programmers to experiment and debug any Java system using Jython.
9+
* Rapid application development - Python programs are typically 2-10x shorter than the equivalent Java program. This translates directly to increased programmer productivity. The seamless interaction between Python and Java allows developers to freely mix the two languages both during development and in shipping products.
10+
11+
Here is an example of running Python code inside a simple Java application.
12+
```java
13+
import org.python.util.PythonInterpreter;
14+
15+
public class JythonHelloWorld {
16+
public static void main(String[] args) {
17+
try(PythonInterpreter pyInterp = new PythonInterpreter()) {
18+
pyInterp.exec("print 'Hello Python World!'");
19+
}
20+
}
21+
}
22+
```
23+
Ready to get started? Head over to [Downloads](download)
24+
25+
## Who uses Jython?
26+
Jython is embedded in lots of projects. See some from [MVNRepository](https://mvnrepository.com/artifact/org.python/jython-standalone/usages)
27+
28+
- [IBM Websphere](https://www.ibm.com/developerworks/websphere/library/techarticles/1004_gibson/1004_gibson.html) - Use Jython to provide administrative scripting capabilities.
29+
- [Apache PIG](https://pig.apache.org/) - Use Jython to support user defined functions.
30+
- [ImageJ](http://imagej.net) - Use Jython to provide scripted image processing.
31+
- [GDA](http://www.opengda.org/) - Use Jython to script scientific experiments.
32+
- [Robot Framework](http://robotframework.org/) - A generic test automation framework for acceptance testing and acceptance test-driven development (ATDD) which runs on Jython.

installation.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Installation
3+
---
4+
## Installer Jar
5+
Jython 2.7.1 is distributed via an executable jar file installer. After
6+
[downloading](download) it, either double click the `jython-installer-2.7.1.jar` or run java with the -jar option
7+
```
8+
$ java -jar jython-installer-2.7.1.jar
9+
```
10+
11+
This will start the regular GUI installer on most systems, or a console installer on headless systems. To force the installer to work in headless mode invoke the installer as:
12+
```
13+
$ java -jar jython-installer-2.7.1.jar --console
14+
```
15+
The installer will then walk through a similar set of steps in
16+
graphical or console mode: showing the license, selecting an install
17+
directory and JVM and actually copying Jython to the file system.
18+
After this completes, Jython is installed in the directory you
19+
selected. Executing a script in the install directory, `jython` on Unix-like systems or `jython.exe` on Windows, will start up the Jython
20+
console, which can be used to dynamically explore Jython and the Java
21+
runtime, or to run Jython scripts.
22+
23+
## Standalone Jar
24+
25+
The standalone option does no caching and so avoids the startup overhead (most likely at the cost of some speed in calling Java classes, but I have not profiled it)
26+
27+
You can try it out by running the installer:
28+
```
29+
$ java -jar jython-installer-2.7.1.jar
30+
```
31+
then when you come to the "Installation type" page, select "Standalone".
32+
33+
The installation will generate a `jython.jar` with the Python standard library (`/Lib`) files included, which can be run as:
34+
```
35+
$ java -jar jython.jar
36+
```
37+
Of course you can run scripts just by calling them as you might expect:
38+
```
39+
$ java -jar jython.jar script.py
40+
```
41+
Or, add this file to the classpath of your application.
42+
43+
## Installation options
44+
45+
You can get a list of installer options (to install Jython unattended, for example) by running:
46+
```
47+
$ java -jar jython-installer-2.7.1.jar --help
48+
```

links.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Links
3+
---
4+
## Jython related projects
5+
6+
### [JyNI](https://jyni.org/)
7+
Aims to CPython extension support to Jython. To allow extensions such as [NumPy](http://www.numpy.org/) or [SciPy](https://www.scipy.org/) to be used in Jython.
8+
9+
### [The Very Slow Jython Project](https://github.com/jeff5/very-slow-jython)
10+
The aim of the Very Slow Jython project is to re-think implementation choices in the Jython core, through the gradual, narrated evolution of a toy implementation, starting from zero code.

0 commit comments

Comments
 (0)