Skip to content

Initial website #3

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

Merged
merged 39 commits into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9e76ca0
Add .gitignore for Jekyll project
jamesmudd Sep 8, 2018
f8544c3
Add Gemfile
jamesmudd Sep 8, 2018
2ec67ef
Add initial _config.yml
jamesmudd Sep 8, 2018
faf6f0d
Add initial news.md file
jamesmudd Sep 8, 2018
50a47dc
Add initial navigation bar
jamesmudd Sep 10, 2018
e8d25c1
Add favicon
jamesmudd Sep 10, 2018
fbb17f4
Add initial navigation bar
jamesmudd Sep 10, 2018
0b22fd3
Cleanup header
jamesmudd Sep 11, 2018
91cd9b7
More navigation links and cleanup
jamesmudd Sep 11, 2018
443c0f7
Add dev-guide to navigation
jamesmudd Sep 11, 2018
92427ed
Add Download page
jamesmudd Sep 11, 2018
d9e01dd
Add some content to the README.md
jamesmudd Sep 11, 2018
d1b5cb1
Remove absolute path to index
jamesmudd Sep 11, 2018
055f771
Cleanup fonts used in navbar
jamesmudd Sep 11, 2018
7ee7a69
Add Wiki to navigation
jamesmudd Sep 11, 2018
1f62254
Add link to javadoc.io
jamesmudd Sep 12, 2018
962aae7
Update dev guide link
jamesmudd Sep 12, 2018
6e66df1
Remove autogenerated maintained by footer
jamesmudd Sep 12, 2018
8eb3eb8
Tweak navbar
jamesmudd Sep 12, 2018
60735be
Refactor navbar to improve naming
jamesmudd Oct 3, 2018
df7ca49
Add website source link to development
jamesmudd Oct 3, 2018
1926b20
Add links and Java example to home page
jamesmudd Oct 3, 2018
e8c9bc8
Convert to H2 titles
jamesmudd Oct 3, 2018
d4c2a29
Add PSF to page footer
jamesmudd Oct 3, 2018
6cdad77
Add new links page
jamesmudd Oct 5, 2018
45331a7
Rename README.md → index.md
jamesmudd Oct 5, 2018
1b300fd
Add new README.md
jamesmudd Oct 5, 2018
a0e7e20
Add "Who uses Jython" section
jamesmudd Oct 5, 2018
e63eb1c
Improve favicon support
jamesmudd Oct 9, 2018
324baca
Change to higher res logo
jamesmudd Oct 9, 2018
15bae43
Add page titles
jamesmudd Oct 10, 2018
2c3d058
Add installation page
jamesmudd Oct 10, 2018
9d9a076
Improve download page
jamesmudd Oct 10, 2018
1c59a8f
Reformat news.md
jamesmudd Oct 10, 2018
7c7d8f1
Add news item about new website
jamesmudd Oct 10, 2018
5fa0d3e
Cleanup typos and spelling
jamesmudd Oct 10, 2018
94dc309
Update README
jamesmudd Oct 10, 2018
a0127da
Fix typos
jamesmudd Oct 10, 2018
fca37dc
Add archive sites
jamesmudd Oct 10, 2018
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
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Jekyll
_site/
.jekyll-cache
.jekyll-metadata
.sass-cache

# Ruby
.bundle/
.byebug_history
.ruby-gemset
.ruby-version
*.gem
Gemfile.lock

# Files
.analysis
.DS_Store
*.swp
*~

# Folders
/vendor
bbin/
bin/
coverage
gh-pages/
pkg/
test/dest
tmp/*
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# jython.github.io
Web site for Jython
# Jython Website
This is the source repository for the Jython website.

## To develop the website

A quick guide to developing the website locally

1. Clone this repository
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
3. Browse to [http://127.0.0.1:4000](http://127.0.0.1:4000)
4. View the website locally
5. Make changes to the source
6. Refresh the browser page and the changes should be visible
7. Once your happy with the changes create a pull request
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: Jython
description: The Python runtime on the JVM

theme: jekyll-theme-slate
37 changes: 37 additions & 0 deletions _data/navbar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file contains the contents of the navigation bar.
# If subItems are defined the menu will contain a drop down containing the sub items
navbar:
- title: Home
url: index
- title: News
url: news
- title: Download
url: download
- title: Documentation
subItems:
- title: Installation
url: installation
- title: JavaDoc
url: http://www.javadoc.io/doc/org.python/jython-standalone/2.7.1
- title: Jython Book
url: https://jython.readthedocs.io/en/latest/
- title: Wiki
url: https://wiki.python.org/jython/
- title: Archived Sites
url: archived_sites
- title: Development
subItems:
- title: Bug tracker
url: http://bugs.jython.org/
- title: Github
url: https://github.com/jythontools/jython
- title: Mercurial
url: https://hg.python.org/jython/
- title: Mailing List
url: https://sourceforge.net/p/jython/mailman/
- title: Developer Guide
url: https://jython-devguide.readthedocs.io/en/latest/
- title: Website source
url: https://github.com/jython/jython.github.io/
- title: Links
url: links
89 changes: 89 additions & 0 deletions _includes/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<div class="navbar">
{% for item in site.data.navbar.navbar %}
{% if item.subItems == null %}
<a href="{{ item.url }}">{{ item.title }}</a>
{% else %}
<div class="dropdown">
<button class="dropbtn">{{ item.title }}
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
{% for entry in item.subItems %}
<a href="{{ entry.url }}">{{ entry.title }}</a>
{% endfor %}
</div>
</div>
{% endif %}
{% endfor %}
</div>

<style type="text/css">
/* Navbar container */
.navbar {
overflow: hidden;
}

/* Links inside the navbar */
.navbar a {
float: left;
font-size: 16px;
color: white;
padding: 13px 16px 15px 16px;
text-decoration: none;
}

/* The dropdown container */
.dropdown {
float: left;
overflow: hidden;
}

/* Dropdown button */
.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: 'Myriad Pro', Calibri, Helvetica, Arial;
line-height: 1.5;
-webkit-font-smoothing: antialiased;;
}

/* Add a blue background color to navbar links on hover */
.navbar a:hover, .dropdown:hover .dropbtn {
background-color: #0090ff;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;

}

/* Links inside the dropdown */
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}

/* Add a grey background color to dropdown links on hover */
.dropdown-content a:hover {
background-color: #ddd;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
display: block;
}
</style>
59 changes: 59 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">

<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,maximum-scale=2">
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/style.css?">
<link rel="icon" type="image/png" href="assets/favicon32.png">

{% seo %}
</head>

<body>

<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="https://github.com/jythontools/jython">View on Github</a>

<a id=logo href="index"><img id="logo" src="assets/jython.png" alt="Jython Logo" height="70" width="109"></a>

{% if site.show_downloads %}
<section id="downloads">
<a class="zip_download_link" href="{{ site.github.zip_url }}">Download this project as a .zip file</a>
<a class="tar_download_link" href="{{ site.github.tar_url }}">Download this project as a tar.gz file</a>
</section>
{% endif %}
{% include navigation.html %}
</header>
</div>

<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
{{ content }}
</section>
</div>

<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p>Jython is a member of the <a href="https://www.python.org/psf/">Python Software Foundation</a></p>
<p>Published with <a href="https://pages.github.com">GitHub Pages</a></p>
</footer>
</div>

{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>
14 changes: 14 additions & 0 deletions archived_sites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Archived Sites
---
## Old Archived Jython Websites
This is the place to access old versions of the Jython website.

### [Jython 2.5 - 2.7](http://www.jython.org/)

### [Jython 2.2.1](http://www.jython.org/archive/221/index.html)

### [Jython 2.2](http://www.jython.org/archive/22/index.html)

### [Jython 2.1](http://www.jython.org/archive/21/index.html)

16 changes: 16 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
---

@import "{{ site.theme }}";

#header_wrap .inner {
padding: 0px 10px 0px 10px;
}

#logo {
box-shadow: none;
border: none;
webkit-box-shadow: none;
padding: 2px;
margin: 10px 0px 0px 0px;
}
Binary file added assets/favicon32.png
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 assets/jython.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Downloads
---
## Current Version
The current version of Jython is 2.7.1
It can be downloaded here:
- [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.
- [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.

For information on installing see [Installation](installation).

This version is supported on Java 7 and 8.

## Previous Versions
Previous versions of Jython are available from:
- [Jython Installer](https://search.maven.org/search?q=g:org.python%20AND%20a:jython-installer&core=gav)
- [Jython Standalone](https://mvnrepository.com/artifact/org.python/jython-standalone)
32 changes: 32 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Home
---
## What is Jython?
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:

* 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.
* 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.
* 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.

Here is an example of running Python code inside a simple Java application.
```java
import org.python.util.PythonInterpreter;

public class JythonHelloWorld {
public static void main(String[] args) {
try(PythonInterpreter pyInterp = new PythonInterpreter()) {
pyInterp.exec("print 'Hello Python World!'");
Copy link
Contributor

@adamburkegh adamburkegh Oct 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should use the new print() syntax in our example, ie

print('Hello Python World!')

Even though the old operator syntax still works in 2.7. It's just starting to look declasse.

This is, if it's not obvious, very much not a blocker.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree! I'm too used to using the old print. Hopefully this can be merged soon then you could open a PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure no worries

}
}
}
```
Ready to get started? Head over to [Downloads](download)

## Who uses Jython?
Jython is embedded in lots of projects. See some from [MVNRepository](https://mvnrepository.com/artifact/org.python/jython-standalone/usages)

- [IBM Websphere](https://www.ibm.com/developerworks/websphere/library/techarticles/1004_gibson/1004_gibson.html) - Use Jython to provide administrative scripting capabilities.
- [Apache PIG](https://pig.apache.org/) - Use Jython to support user defined functions.
- [ImageJ](http://imagej.net) - Use Jython to provide scripted image processing.
- [GDA](http://www.opengda.org/) - Use Jython to script scientific experiments.
- [Robot Framework](http://robotframework.org/) - A generic test automation framework for acceptance testing and acceptance test-driven development (ATDD) which runs on Jython.
48 changes: 48 additions & 0 deletions installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Installation
---
## Installer Jar
Jython 2.7.1 is distributed via an executable jar file installer. After
[downloading](download) it, either double click the `jython-installer-2.7.1.jar` or run java with the -jar option
```
$ java -jar jython-installer-2.7.1.jar
```

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:
```
$ java -jar jython-installer-2.7.1.jar --console
```
The installer will then walk through a similar set of steps in
graphical or console mode: showing the license, selecting an install
directory and JVM and actually copying Jython to the file system.
After this completes, Jython is installed in the directory you
selected. Executing a script in the install directory, `jython` on Unix-like systems or `jython.exe` on Windows, will start up the Jython
console, which can be used to dynamically explore Jython and the Java
runtime, or to run Jython scripts.

## Standalone Jar

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)

You can try it out by running the installer:
```
$ java -jar jython-installer-2.7.1.jar
```
then when you come to the "Installation type" page, select "Standalone".

The installation will generate a `jython.jar` with the Python standard library (`/Lib`) files included, which can be run as:
```
$ java -jar jython.jar
```
Of course you can run scripts just by calling them as you might expect:
```
$ java -jar jython.jar script.py
```
Or, add this file to the classpath of your application.

## Installation options

You can get a list of installer options (to install Jython unattended, for example) by running:
```
$ java -jar jython-installer-2.7.1.jar --help
```
10 changes: 10 additions & 0 deletions links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Links
---
## Jython related projects

### [JyNI](https://jyni.org/)
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.

### [The Very Slow Jython Project](https://github.com/jeff5/very-slow-jython)
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.
Loading