forked from xsf/xmpp.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7952165
commit de3d825
Showing
257 changed files
with
11,378 additions
and
5,921 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.css diff=css | ||
*.html diff=html | ||
*.xhtml diff=html | ||
*.py diff=python | ||
*.md diff=markdown |
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,21 +1,27 @@ | ||
language: python | ||
dist: focal | ||
cache: apt | ||
language: python | ||
python: | ||
- "3.9" | ||
|
||
notifications: | ||
email: false | ||
|
||
jobs: | ||
include: | ||
- python: 2.7 | ||
name: "Website Build" | ||
- python: 3.7 | ||
name: "Data Linting" | ||
env: | ||
- HUGO_VERSION="0.80.0" | ||
|
||
install: | ||
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install pelican==3.3 ghp-import markdown; fi | ||
- wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz | ||
- tar xf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz | ||
- mv hugo ~/bin/ | ||
- hugo version | ||
- pip3 install requests | ||
|
||
script: | ||
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then make html; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then ./data/lint-list.py clients.json; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then ./data/lint-list.py servers.json; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then ./data/lint-list.py libraries.json; fi | ||
jobs: | ||
include: | ||
- stage: Prepare XEP list | ||
script: python3 ./tools/prepare_xep_list.py | ||
- stage: Software list linting | ||
script: python3 ./tools/lint-list.py clients.json && python3 ./tools/lint-list.py servers.json && python3 ./tools/lint-list.py libraries.json | ||
- stage: Generate pages | ||
script: hugo |
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
|
||
FROM debian | ||
FROM debian:bullseye | ||
MAINTAINER Dave Cridland <[email protected]> | ||
|
||
# Set environment variables | ||
|
@@ -20,7 +20,7 @@ ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && apt-get dist-upgrade -y && apt-get autoremove -y && apt-get clean | ||
|
||
# Install dependencies. | ||
RUN apt-get install -y python-pip git && pip install pelican==3.3 markdown==2.6.11 ghp-import | ||
RUN apt-get install -y hugo python3 python3-pip && pip3 install requests | ||
|
||
# Build and copy in place. | ||
WORKDIR /var/tmp/src/xmpp.org | ||
|
@@ -29,5 +29,4 @@ RUN cd /var/tmp/src/xmpp.org && make publish | |
|
||
FROM nginx | ||
COPY deploy/xsf.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=0 /var/tmp/src/xmpp.org/output/ /var/www/html/ | ||
|
||
COPY --from=0 /var/tmp/src/xmpp.org/public/ /var/www/html/ |
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
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,130 +1,129 @@ | ||
xmpp.org | ||
======== | ||
[![Build Status](https://travis-ci.org/xsf/xmpp.org.png?branch=master)](https://travis-ci.org/xsf/xmpp.org) | ||
# xmpp.org | ||
|
||
[![Build Status](https://travis-ci.com/xsf/xmpp.org.png?branch=master)](https://travis-ci.com/xsf/xmpp.org) | ||
[![Docker Build Status](https://img.shields.io/docker/cloud/build/xmppxsf/xmpp.org)](https://hub.docker.com/r/xmppxsf/xmpp.org/builds/) | ||
|
||
Please log any [issues](https://github.com/xsf/xmpp.org/issues/new). | ||
|
||
Contributing new content and updates | ||
------------------------------------ | ||
|
||
## Contributing new content and updates | ||
|
||
* Fork the [code](https://github.com/xsf/xmpp.org/fork) to your own git repository. | ||
* Make your changes in `/content/pages` or [directly](https://github.com/xsf/xmpp.org/tree/master/content/pages) in GitHub. | ||
* Make your changes in `/content` or [directly](https://github.com/xsf/xmpp.org/tree/master/content) in GitHub. | ||
* When you are happy with your updates, submit a [pull request](https://github.com/xsf/xmpp.org/pulls) describing the changes. | ||
* **IMPORTANT** :- Before sending a **Pull Request** make sure that your forked repo is in sync with the base repo. | ||
* **IMPORTANT:** Before sending a **Pull Request** make sure that your forked repo is in sync with the base repo. | ||
* The updates will be reviewed and merged in. | ||
|
||
Communication forum | ||
------------------- | ||
## Communication forum | ||
|
||
Please use [[email protected]](xmpp:[email protected]?join) for discussions about the site, content, generation etc. | ||
|
||
Site generation | ||
--------------- | ||
## Site generation | ||
|
||
* Commits to the master branch generate a new build. | ||
* Builds are visible at https://travis-ci.org/xsf/xmpp.org/builds | ||
* Changes will be visible on http://xmpp.org after the next update | ||
* Builds are visible at [Travis-CI](https://travis-ci.com/xsf/xmpp.org/builds) | ||
* Changes will be visible on [xmpp.org](https://xmpp.org) after the next update | ||
|
||
## Software Requirements | ||
|
||
* Pelican 3.3 | ||
* ghp-import | ||
* Markdown 2.3.1 | ||
* Hugo | ||
* Python | ||
|
||
## Gentle introduction to Pelican | ||
## Introduction to Hugo | ||
|
||
Pelican's [QUICKSTART](http://docs.getpelican.com/en/latest/quickstart.html) page is a good place to learn about the basics of Pelican (installation, project skeleton, development cycle, etc.). | ||
Hugo’s [quickstart](https://gohugo.io/getting-started/quick-start/) page is a good place to learn about the basics of Hugo (installation, project skeleton, development cycle, etc.). | ||
|
||
## Installation instructions | ||
## Installation instructions | ||
|
||
Two types of installations are documented: a regular one, and one that creates a virtual environment via Vagrant. | ||
Multiple types of installations are documented: | ||
|
||
* Local (regular) | ||
* Docker container | ||
* Vagrant virtual machine | ||
|
||
### Regular installation | ||
|
||
To run a development server on your local computer, follow these basic steps: | ||
|
||
```bash | ||
git clone ssh://[email protected]/xsf/xmpp.org.git | ||
# install Pelican and dependencies | ||
# install Hugo | ||
cd xmpp.org | ||
``` | ||
|
||
Running the server in development mode: | ||
Running the server in development mode (reloads whenever a file is changed): | ||
|
||
```bash | ||
make serve | ||
``` | ||
|
||
If you want the server to autoreload whenever a file change, you can instead do: | ||
View at `http://localhost:1313` | ||
|
||
### Docker-based installation | ||
|
||
The Makefile will build the website completely by running: | ||
|
||
```bash | ||
make devserver | ||
make -f MakefileDocker | ||
``` | ||
|
||
View at `http://localhost:8000` | ||
|
||
### Docker-based installation | ||
It'll do the following: | ||
|
||
The Makefile will build the website completely by running `make -f MakefileDocker`. It'll do | ||
the following: | ||
* Create a build Docker image (`make builder`) which is a development environment with a complete set of dependencies ready. | ||
|
||
* Create a build Docker image (`make builder`) which is a development | ||
environment with a complete set of dependencies ready. | ||
* Run this docker image on the xmpp.org directory locally. This directory is presumed to contain a checked out repository for the website. (`make site`) | ||
|
||
* Run this docker image on the xmpp.org directory locally. This directory | ||
is presumed to contain a checked out repository for the website. (`make site`) | ||
* From the newly created static files in `deploy/output`, it will then create a minimalist docker image to actually serve the website. (`make deployer`) | ||
|
||
* From the newly created static files in `deploy/output`, it will then create | ||
a minimalist docker image to actually serve the website. (`make deployer`) | ||
For development convenience, you can run the website on port 80: | ||
|
||
For development convenience, you can run the website on port 8080 by `make -f MakefileDocker serve` | ||
```bash | ||
make -f MakefileDocker serve | ||
``` | ||
|
||
### Vagrant-based installation | ||
|
||
For your convenience, this repository ships with a basic Vagrantfile, which allows you to create virtual machine with all the dependencies required for local development. | ||
|
||
Assuming your computer has [Vagrant](https://www.vagrantup.com/) installed, the following will get you a running server: | ||
|
||
```bash | ||
git clone ssh://[email protected]/xsf/xmpp.org.git | ||
cd xmpp.org | ||
vagrant up | ||
vagrant ssh | ||
cd /vagrant/ | ||
make devserver | ||
make serve | ||
``` | ||
|
||
Now, the wesite should be available at `http://localhost:8000` | ||
Now, the website should be available at `http://localhost:1313` | ||
|
||
## Configuration | ||
|
||
``` | ||
<repo> | ||
Dockerfile | ||
fabfile.py | ||
develop_server.sh | ||
MakefileDocker | ||
Makefile | ||
README.md | ||
pelicanconf.py (development configuration) | ||
publishconf.py (production configuration) | ||
output | ||
<generated files - published to gh-pages branch> | ||
public | ||
<generated files> | ||
content | ||
pages | ||
<website page files> | ||
pelican-bootstrap3 | ||
<website page files> | ||
themes | ||
<website theme> | ||
``` | ||
|
||
## Site generation | ||
## Local site generation | ||
|
||
To just generate a new version (without starting up a local webserver) just do: | ||
|
||
`make html` | ||
|
||
|
||
Theme development | ||
----------------- | ||
```bash | ||
make publish | ||
``` | ||
|
||
You can modify the theme (layout and styling) in the [xmpp.org-theme](https://github.com/xsf/xmpp.org/tree/master/xmpp.org-theme/sass) directory. | ||
Pages will be available in the /public folder. | ||
|
||
Make changes to Sass files, *not* compiled CSS. | ||
## Theme development | ||
|
||
`npm i` then run `grunt` to compile Sass. | ||
You can directly modify the theme (layout and styling) in the [themes/xmpp.org](https://github.com/xsf/xmpp.org/tree/master/themes/xmpp.org/static/css/) directory. |
Oops, something went wrong.