-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from scipy-conference/modernize
Update the development process and package versions
- Loading branch information
Showing
6 changed files
with
179 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,149 +1,88 @@ | ||
conference.scipy.org | ||
==================== | ||
|
||
This repository contains the landing page and blog for the | ||
conference.scipy.org. Each specific SciPy Conference manages it's own | ||
website and this site is only meant to capture the commonalities | ||
between them. | ||
This repository contains the landing page for | ||
[conference.scipy.org](https://conference.scipy.org). Each conference manages | ||
its own website. This site is only meant to capture the commonalities between | ||
them. | ||
|
||
## Dependencies | ||
## Quick Set Up | ||
|
||
You need a python environment with `pelican` and `markdown` packages installed. | ||
In a Python virtual environment, install dependencies: | ||
|
||
## Contributing | ||
|
||
Currently the website is a set of static pages generated by | ||
[Pelican](http://getpelican.org). The generated content is uploaded | ||
to an S3 bucket manged by [Enthought](https://enthought.com). Contact | ||
[[email protected]](mailto://[email protected]) to | ||
get things updated. | ||
|
||
Please feel free to contribute in what ever capacity you feel best. | ||
For now, the site contains details for conferences past and news items | ||
from conferences. | ||
|
||
Here are a few ways you can contribute: | ||
``` | ||
$ make init | ||
``` | ||
|
||
### Add news item | ||
Build the site. The output will be in the `output/` directory. | ||
|
||
* [Fork the repository](https://help.github.com/articles/fork-a-repo) on | ||
[github](https://github.com/scipy-conference/conference.scipy.org) | ||
``` | ||
$ make html | ||
``` | ||
|
||
* [Clone the fork](https://help.github.com/articles/fork-a-repo#step-2-clone-your-fork) | ||
To view the site locally: | ||
|
||
``` | ||
$ git clone [email protected]:aterrel/conference.scipy.org.git | ||
Cloning into 'conference.scipy.org'... | ||
remote: Counting objects: 74, done. | ||
remote: Compressing objects: 100% (68/68), done. | ||
remote: Total 74 (delta 3), reused 73 (delta 2) | ||
Receiving objects: 100% (74/74), 248.52 KiB | 0 bytes/s, done. | ||
Resolving deltas: 100% (3/3), done. | ||
Checking connectivity... done | ||
$ cd conference.scipy.org | ||
$ make serve | ||
< open browser to http://127.0.0.1:8000 > | ||
( you should see your test page in the News and archives ) | ||
< Ctrl-C to exit server on terminal > | ||
``` | ||
|
||
* [Create a new branch](https://help.github.com/articles/fork-a-repo#create-branches) with the name of your news item. | ||
|
||
* Add your news item in content/news, see | ||
[Pelican docs](http://docs.getpelican.com/en/3.3.0/getting_started.html#writing-content-using-pelican) | ||
for details can be rst or markdown. An exmple below: | ||
## Adding and Editing Items | ||
|
||
The website is a set of static pages generated by | ||
[Pelican](http://getpelican.org) from Markdown files. The content is published | ||
automatically to GitHub Pages every time a pull request is merged to the `main` | ||
branch. | ||
|
||
News items in `content/news` are published on the News pages. The format looks like this: | ||
|
||
``` | ||
$ cd content/news | ||
$ cat << EOF > 2013-10-25-test.md | ||
$ cat << EOF > 2024-03-05-test.md | ||
> Title: Test | ||
> Date: 2013-10-25 | ||
> Date: 2024-03-05 | ||
> Comments: true | ||
> Categories: | ||
> Author: Andy R. Terrel <andy.terrel@gmail.com> | ||
> Author: Ze Claw <ze.claw@example.com> | ||
> Summary: Testing | ||
> | ||
> Testing how this works! | ||
> | ||
> EOF | ||
``` | ||
|
||
* [Push to your fork on github](https://help.github.com/articles/fork-a-repo#push-commits) | ||
|
||
* [Create a pull request](https://help.github.com/articles/using-pull-requests) | ||
|
||
* Email [[email protected]](mailto://[email protected]) to get the content deployed. | ||
|
||
### Add or edit a page | ||
|
||
* To edit the website one needs to first install the pelican blog system, see http://docs.getpelican.com/en/3.3.0/getting_started.html | ||
* be sure to have [Markdown](http://pythonhosted.org/Markdown/index.html) installed as well | ||
|
||
* Next checkout the source code: | ||
``` | ||
$ git clone [email protected]:scipy-conference/conference.scipy.org.git | ||
$ cd conference.scipy.org.git | ||
``` | ||
|
||
Pages in `content/pages` map to top-level menu items as defined in | ||
`pelicanconf.py`. | ||
|
||
* Editting pages: | ||
After adding or making changes to an item, regenerate the site: | ||
|
||
* The content of the page can be found in the content directory | ||
``` | ||
$ cd content; ls | ||
images news pages pdf | ||
< Ctrl-C to exit server on the terminal if it's already running > | ||
$ make html && make serve | ||
``` | ||
* images and pdf: static content to be copied, | ||
* news: the markdown blog like pages, | ||
* pages: the set of pages to be displayed | ||
|
||
* To add a new post, add a file to the news, see pelican docs for the page issues: | ||
## Edit the Home Page and the Layout | ||
|
||
* Generating and viewing changes | ||
* Now go to the top dir and regenerate site: | ||
``` | ||
$ cd ../../ | ||
$ make html | ||
``` | ||
The layout is defined in the `theme/` folder. | ||
|
||
* To view it locally: | ||
``` | ||
$ make serve | ||
< open browser to http://127.0.0.1:8000 > | ||
( you should see your test page in the News and archives ) | ||
< Ctrl-C to exit server on terminal > | ||
``` | ||
|
||
* To modify a page edit inside the pages content | ||
``` | ||
$ cd content/pages | ||
$ vi 2013_detail.md | ||
``` | ||
|
||
* Once again go to top and make it and view | ||
``` | ||
$ cd ../.. && make html && make serve | ||
``` | ||
|
||
* To edit the layout see thing inside the theme | ||
``` | ||
$ ls theme | ||
tuxlite_zfs | ||
``` | ||
|
||
* Be sure to check in your changes and push | ||
``` | ||
$ git add <files changed> | ||
$ git commit -m “<Describe changes>” | ||
$ git push origin <branch-name> | ||
``` | ||
|
||
## Publishing | ||
## Update Dependencies | ||
|
||
You need to have a user on the conference.scipy.org server. This user needs to | ||
have your ssh keys and ssh connection should work fine. The user also needs to | ||
be added into the `scipy` group on the server to be allowed to publish new | ||
content. | ||
There's a Make target to update dependencies: | ||
|
||
To publish an updated website, just use `make rsync` after `make publish`. | ||
``` | ||
$ make update-deps | ||
``` | ||
|
||
Be careful, we do not backup the old website. | ||
It'll read dependencies from `pyproject.toml` and update the `requirements.txt` | ||
file with the latest version. | ||
|
||
## Contact | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- # | ||
from __future__ import unicode_literals | ||
|
||
import os | ||
|
||
AUTHOR = u'SciPy Organizers <[email protected]>' | ||
SITENAME = u'SciPy Conferences' | ||
SITEURL = '' | ||
|
||
TIMEZONE = 'US/Central' | ||
DEFAULT_LANG = u'en' | ||
AUTHOR = "SciPy Organizers <[email protected]>" | ||
SITENAME = "SciPy Conferences" | ||
SITEURL = "" | ||
|
||
TIMEZONE = "US/Central" | ||
DEFAULT_LANG = "en" | ||
|
||
USE_FOLDER_AS_CATEGORY = True | ||
|
||
# Set the article URL | ||
ARTICLE_URL = 'news/{date:%Y}/{date:%m}/{date:%d}/{slug}/' | ||
ARTICLE_SAVE_AS = 'news/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html' | ||
ARTICLE_URL = "news/{date:%Y}/{date:%m}/{date:%d}/{slug}/" | ||
ARTICLE_SAVE_AS = "news/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html" | ||
|
||
# Title menu options | ||
DISPLAY_PAGES_ON_MENU = False | ||
MENUITEMS = [('Home', '/'), | ||
('Past Conferences', '/past.html'), | ||
('Proceedings', '/proceedings'), | ||
('News', '/archives.html')] | ||
|
||
MENUITEMS = [ | ||
("Home", "/"), | ||
("Past Conferences", "/past.html"), | ||
("Proceedings", "/proceedings"), | ||
("News", "/archives.html"), | ||
] | ||
|
||
NEWEST_FIRST_ARCHIVES = False | ||
|
||
# Theme | ||
# Theme | ||
THEME_DIR = os.path.join(os.getcwd(), "theme") | ||
THEME_NAME = "tuxlite_zf" | ||
THEME = os.path.join(THEME_DIR, THEME_NAME) | ||
|
@@ -45,12 +44,12 @@ | |
# ('You can modify those links in your config file', '#'),) | ||
|
||
# Social widget | ||
#SOCIAL = (('You can add links in your config file', '#'), | ||
# SOCIAL = (('You can add links in your config file', '#'), | ||
# ('Another social link', '#'),) | ||
|
||
DEFAULT_PAGINATION = 5 | ||
|
||
STATIC_PATHS = ['images', 'pdf', 'CNAME', 'proceedings'] | ||
STATIC_PATHS = ["images", "pdf", "CNAME", "proceedings"] | ||
|
||
# Uncomment following line if you want document-relative URLs when developing | ||
#RELATIVE_URLS = True | ||
# RELATIVE_URLS = True |
Oops, something went wrong.