Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The project git@github.com:apache/incubator-rya-site.git  (https://github.com/apache/incubator-rya-site) is the markdown source code of the official Apache Rya website.
- master branch is the source in markdown for the Jekyll tool.
- asf-site branch is the compiled HTML that is deployed to the webserver.

...

To make changes to the website:

1. Clone incubator- rya-site branch master:

    git clone git@githubclone https://github.com:/apache/incubator-rya-site.git
    cd incubator- rya-site/

2. Create a new branch:

    git checkout -b your_new_branch_name_here


3. Modify the markdown as needed using a text editor.
4. New releases go in folder _posts along with other news.
5. Releases must use the prescribed file naming format and have a header variable catagories=release along with some other variables describing the version.
6. The file download.md, using its scripts, should automatically populate the corresponding html based on your new post file and its variables, but it may need tweaking.

7. Install Jekyll.  This may not be straight forward if you don't have a ruby environment.  You may have to add Linux distro packages, then ruby gems, then more packages as dependencies present themselves. Some instructions are at https://jekyllrb.com/docs/installation/ Make sure you update the version of jekyll used by bundle (bundle update)

8. Run this command in the content/ folder to auto-compile and web serve on port 4000:

    cd content/ 
    bundle exec jekyll serve

On a VM:  Set up a port forward in VirtualBox's network settings for port 4000. Use the host option with 0.0.0.0 to publish to the host.  

    bundle exec jekyll serve --host 0.0.0.0

Alternatively, you can use docker to build and serve the site:

export JEKYLL_VERSION=3.8

docker run --name rya-site --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" -p 3000:4000 -it jekyll/jekyll:$JEKYLL_VERSION jekyll build

docker run --name incubator- rya-site --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" -p 3000:4000 -it jekyll/jekyll:$JEKYLL_VERSION jekyll serve

...

When you are done making changes:

10. Run production option to fix links in the feed.xml and anywhere absolute URLs are used.  Let it generate once and ctrl-C.

    JEKYLL_ENV=production bundle exec jekyll serve


11. Move the content/target folder out of the way, you will commit this separately.

...

    git add [new and modified files]
    git commit -a -m "say what you changed here"

...

    git remote add your_username https://github.com/your_username/incubator-rya-site.git

12.3 push

    git push your_username your_branch_name_here --set-upstream

13. Create a pull request to the repo apache/incubator-rya-site branch master.

   Here is a guide https://help.github.com/articles/creating-a-pull-request-from-a-fork/

...

1. Review the setup here:  https://pages.github.com/  using "project-site"
2. It doesn't mention it in the quick start above, but it will also publish a site from a branch named "gh-pages" which is important since master is already used for another purpose.
3. Start with your branch of project "incubator-rya-site" as pushed to your remote, that is based on the asf-site branch.
4. Create and checkout a new branch named "gh-pages".  This will not be used in a pull request.

    git checkout -b gh-pages
  
5. Move the contents of the "content" folder to the root of the project.
6. Modify each HTML page prepending to all references (href= and src=) to the site with "/incubator-rya-site" .  Ignore references beginning with http.

For example:

    Before:
    
        <link href="/assets/themes/apache/bootstrap/css/bootstrap.css" rel="stylesheet">
        
    After:
    
        <link href="/incubator-rya-site/assets/themes/apache/bootstrap/css/bootstrap.css" rel="stylesheet">


This command should do the replacement:

    find . -name \*.html -exec sed -ri 's/=\"\//=\"\/incubator-rya-site\//g' {} \;


7. Commit changes and push to your public github project named incubator- rya-site.

    git commit -a -m "New stuff"
    
    git push  git push --set-upstream yourGitHub gh-pages
    
8. Login to your github account and to the project incubator- rya-site forked from apache/incubator-rya-site, and click on the Settings tab.  Scroll down to GitHub Pages  and choose source=gh-pages branch.  Save.
    
9. Browse to the site:

    https://yourGitHubID.github.io/incubator-rya-site
    
replacing yourGitHubID with your GitHub account ID.

10. Check your work and ask others to review by sending this URL.

...

Important note to the person pulling the new changes:  Be sure that the asf-site matches content in master.  It might be safer to ignore the asf-site pull request and compile the modifications from master.

3. The latest commit to asf-site is automatically served as http://rya.apache.org/