Welcome to the Google Developer Group Pisa public website ๐ The website is written with Jekyll and hosted on GitHub Pages.
The website is publicly available on https://gdgpisa.it/.
Feel free to fork โธ or star โญ๏ธ this repo! Contributions are really appreciated. Please have a look at the Contributing Guidelines or at the TODO list down there. You can easily start having a look at our Issues.
Don't know where to start? ๐ค have a look at our help wanted or good first issue tickets.
- Material Designed (based on hcz-jekyll-blog theme) ๐จ
- Mobile Responsive ๐ฑ
- Progressive Web App ready ๐ฅ
- HTML5 Cache support โป๏ธ
- Awesome Community behind ๐ค
To get starting developing, we really recommend to clone the website locally and start developing on your machine.
This will allow you to preview what the generated site will look like in your browser locally. Jekyll comes also with a auto-regenerate feature, this will allow you to quickly iterate over different changes to the website (useful if you're touching the CSS files). More info about the auto-regenerate feature on the Jekyll usage page.
- Install Ruby with your package manager.
Debian
sudo apt install ruby ruby-dev
ArchLinux
sudo pacman -S ruby
- Clone this repository (you need
gitinstalled).
git clone https://github.com/gdgpisa/gdgpisa.github.io.git
cd gdgpisa.github.io/
- To configure gems user-wide add the following line to your shell configuration files, for example
~/.bashrcor~/.zshrc
export GEM_HOME=$(ruby -e 'print Gem.user_dir')
- Open your terminal and install
jekyllandbundler
gem install jekyll
gem install bundler
- To run executable gems, without typing the full location, run the following command or add it to your shell configuration files, for example
~/.bashrcor~/.zshrc.
PATH=$(ruby -e 'print Gem.user_dir')/bin:$PATH
- To install gems into
GEM_HOME
bundle install
- Serve the website with the following command,
bundle exec jekyll serve
You should be able to see the local website at http://127.0.0.1:4000
To be able to build the site locally, you need Homebrew installed. Please follow this link to install Homebrew
- Clone this repository (you need
gitinstalled).
git clone https://github.com/gdgpisa/gdgpisa.github.io.git
cd gdgpisa.github.io/
- Open your terminal and install
ruby,jekyllandbundler(skip the related command if you already have the package installed).
brew install ruby
sudo gem install jekyll
sudo gem install bundler
- Serve the website with the following command
bundle exec jekyll serve
You should be able to see the local website at http://127.0.0.1:4000/.
You must have git for windows installed in your system.
-
Download and install Ruby and Rubygems using rubyInstaller for windows
-
Using git bash, clone this repository.
git clone https://github.com/gdgpisa/gdgpisa.github.io.git
cd gdgpisa.github.io/- On your terminal install
jekyllandbundler
gem install jekyll bundler- Serve the website with the following command
bundle exec jekyll serveYou should be able to see the local website at http://127.0.0.1:4000/.
- Be sure to have Docker installed on your local machine
Ubuntu
sudo apt-get install docker
ArchLinux
sudo pacman -S docker
- Clone this repository (you need
giton your machine)
git clone https://github.com/gdgpisa/gdgpisa.github.io.git
cd gdgpisa.github.io/
- Run a Docker container with
jekyll/jekyllimage and serve the site
docker run --rm -it \
-p 4000:4000 -v "$PWD":/srv/jekyll \
jekyll/jekyll jekyll serve
You should be able to see the local website at http://127.0.0.1:4000
This command will download the jekyll/jekyll image from Docker Hub and build a container from that image.
Container port 4000 is linked to localhost:4000, so that you can access the site from that address.
Every time this container is executed, it'll automatically do a bundle install, thus retrieving all Gem dependencies before building and serving.
To add a new post to the blog page, you need to create a new file in the _post folder. Please follow the naming of the file, like:
2017-10-10-hello-world.md
The structure of the blog post file should be as following:
---
layout: post
title: <TITLE OF YOUR BLOGPOST>
date: <DATE OF YOUR BLOGPOST LIKE '2017-10-10 13:50:39'>
categories: <LIST OF SPACE SEPARATED CATEGORIES>
---
<BODY OF YOUR BLOGPOST>We are using a dynamic shortlink for the events feedback form. The shortlink is http://bit.ly/gdgfback. To change the destination of the shortlink please edit the feedbackform.md file:
---
layout: page
redirect_to: "http://example.com"
permalink: /feedbackform/
---And change the redirect_to field to the desired one.
Before committing an update in this repo, you should install Workbox CLI and update the Service Worker. To update it correctly, run workbox generateSW static/js/workbox-config.js from your shell in the root of this repo.
If during the generation appears an error of invalid configuration, edit static/js/workbox-config.js and remove the key ignoreURLParametersMatching and its values.
Here a short description of the project structure:
_config.ymlJekyll config file, used to provide projectwise configuration._dataContains JSON files used to build pages_data/project.jsonUsed to build the /projects page._data/heroes.jsonUsed to build the /heroes page._data/social.jsonUsed to create the social buttons._data/urls.jsonUsed to create the navigation bar.
_includesStatic HTML files that will be used to generate web pages_includes/analytics.htmlGoogle Analyics snippet._includes/css.htmlCSS Includes go here._includes/header.htmlHeader for all pages is here, including the homepage with the big image._includes/footer.htmlFooter for all pages is here._includes/js.htmlJS Includes go here._includes/main.htmlMain content is here (whatever is between header and footer)._includes/meta.htmlMETA tags go here._includes/navigation.htmlNavigation menu is here._includes/share-page.htmlShare buttons (after content) are here._includes/social_links.htmlSocial buttons in the header are generated here.
_layoutsLayout files used to create pages_layouts/default.htmlDefault layout, all the pages follow this structure. All the other layouts will just add elements to this layout._layouts/page.htmlPage layout, used to render static pages (like the About page)._layouts/post.htmlBlogpost layout, used to render blogposts from the_postsfolder)._layouts/posts_by_gategory.htmlLayout used when user clicks on a specific category._layouts/project.htmlProjects layout, used to display seminars with Cards._layouts/heroes.htmlHall of Fame layout, used to display our Heroes.
blog/index.htmlIndex file for the blog page. Used by thejekyll-paginate.categoryContains one file for every category. Please add files here before using new categories in blogposts.manifestsContains manifests file for the PWA.staticContains static files served directly by Jekyll (Images, JS, CSS, etc.)static/cssCSS and SASS files goes here..scssfile starting with double---will be built by Jekyll and the resulted.cssfile will be available in thestatic/css/_sitefolder. Please note that this project is using Bootstrap Material Design, feel free to use the CSS classes you need.static/imgImages goes herestatic/jsJavascript files goes here.
about.mdAbout page, Markdown file used to create it.feed.xmlXML File used to create the RSS feed.projects.mdProjects page, Markdown file used to create it. For cards creation refer to the project layout file.heroes.mdHeroes page, Markdown file used to create it. For cards creation refer to the project layout file.feed.xmlXML File used to create the RSS feed.feedbackform.mdFeedback form redirect page, used to handle the feedback form QR code.sw.jsService Worker used for PWA purpose.
Feel free to contribute to this project! You can have a look at our Contribution guidelines if you don't know how to proceed.
Feel free to open a issue or submit a new pull request โค๏ธ
Here a short TODO list:
- Create the hall of fame page.
- Writing Linux setup steps to this Readme.
- Writing Windows setup steps to this Readme.
- Fix naming issues (mix of
-and_in file naming). - Clean-up the
staticfolder.
This project is licensed under the MIT License - see the License file for details