Giter Site home page Giter Site logo

nmilosev / fedoralovespython.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fedora-python/fedoralovespython.org

0.0 3.0 0.0 412 KB

Fedora Loves Python website

Home Page: https://fedoralovespython.org/

License: MIT License

Shell 3.13% Python 11.00% CSS 49.85% HTML 36.02%

fedoralovespython.org's Introduction

A little webpage that shows why Fedora is a good operating system for programmers, analysts, teachers, learners, and other people using Python.

It contains some talking points, each with a link to more information.

Who made it

Made by people who maintain (or are interested in) Python in Fedora. If you want to join, just send a pull request, or look at the Fedora Python SIG page for more info.

How it works

The website is powered by Elsa. That means it is a Flask website that produces static HTML pages. Those pages are pushed to GitHub Pages. Cloudflare is used for Let's Encrypt HTTPS.

When you push some changes, the Flask website is frozen by Elsa on Travis CI. When the commit is from the master branch, the frozen HTML site is pushed to the gh-pages branch and the cache is purged on Cloudflare. Feel free to explore .travis.yml to see how it's done.

The content if mainly in the points.yml file (as in talking points). It's a YAML file with Markdown. fedoralovespython.py defines what's done with the content and files in templates and static define the form.

Hacking

For local development, you have two options:

  • Inside a Python 3 virtual environment:

      python -m pip install -r requirements.txt
      python fedoralovespython.py serve
    
  • Alternately, with Fedora's system packages:

      sudo dnf install -y python3-flask python3-markdown python3-PyYAML
      FLASK_APP=fedoralovespython.py python3 -m flask run
    

The above commands will serve the website locally; in case you want to test freezing, use the virtual environment option and run:

python fedoralovespython.py freeze --serve

That command will freeze the site and then serve it locally from the static files.

When doing pull requests it is very helpful to show us the result online. Especially if you are chnaging anything but content. You can do it by deploying your changes to your fork's GitHub Pages:

python fedoralovespython.py deploy --no-push --no-cname

The above command will freeze the site, and commit it frozen to your gh-pages branch (be careful though because it will rewrite the branch's history). Then you can push the branch to your fork on GitHub as you would push the branch with your changes.

If you happen to have push permissions to the original fedora-python repository, never deploy the site from your computer, let the automatic machinery do it instead.

The --no-cname option makes sure your deployed site won't redirect back to fedoralovespython.org.

Once pushed, your website should live online on the following URL, where <github-username> is a placeholder for your GitHub username:

http://<github-username>.github.io/fedoralovespython.org

Please add this link to the Pull Request description so we can fast-check what you've changed.

License

This site is not affiliated with either the Fedora Project or the Python Software Foundation.

The content, except for any trademarked logos or unless otherwise noted, is licensed under CC BY-SA (by members of Fedora Python SIG).

The micro:bit picture is Copyright © 2016 British Broadcasting Corporation, licensed under MIT.

All product names, logos, and brands are property of their respective owners.

fedoralovespython.org's People

Contributors

hroncok avatar encukou avatar nmilosev avatar bexelbie avatar frenzymadness avatar conan-kudo avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.