This project is the markdown version of the official Apache Rya website. This project is processed by Jekyll and committed to the asf-branch.
- Branch master (you are here) is this source in markdown for the Jekyll tool.
- Branch asf-site is the compiled HTML that is deployed to the webserver.
To make changes to the website:
-
Git clone git://git.apache.org/rya-site.git branch master
-
Created a new branch.
git checkout -b your_new_branch_name_here
-
Modify the markdown as needed using a text editor.
-
New releases go in folder _posts along with other news.
-
Releases must use the prescribed file naming format and have a header variable catagories=release along with some other variables describing the version.
-
The file download.md, using its scripts, should automatically populate the coresponding html based on your new post file and its variables, but it may need tweaking.
-
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 dependendencies present themselves.
-
Run this command in the content/ folder to auto-compile and web serve on port 4000:
cd content/
bundle exec jekyll serve
-
Now just iteratevly use your editor and web browser to edit and test changes.
-
When you are done making changes:
-
Move the content/target folder out of the way, you will commit this separately.
-
Commit changes, add a remote to your own public git repo, and push to it with --set-upstream.
-
Create a pull request to the repo apache/rya-site branch master.
-
Now for the deployable HTML that you moved above:
-
In the same git folder,
``git checkout --force origin/asf-site
git checkout -b another_new_branch_name_here
rm -r content/*``
Note: --force removes any stray files left over.
Note: replace another_new_branch_name_here with a new branch hinting at your changes.
Note: the recursive remove of all the content is necessary to discover files deleted as well as changed.
- Now copy the folder formally named target/ into the project, renaming it to content/.
- Use git status to observe changes. The css and other template files are probably not changed. If they are flagged as modified, investigate CRLF or other trival differences. See .gitattributes.
- When done, commit to your repo in a new branch as above.
- Create a pull request as above, except to be merged into branch asf-site.
- Beg and bribe peers and mentors to review changes. Consider hosting the site temporarily for review, see below.
- Make changes and commit them as above. No need to create new pull requests as they follow the latest commit in the branch.
-
Review the setup here: https://pages.github.com/ using "project-site"
-
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.
-
Start with your branch of project "rya-site" as pushed to your remote, that is based on the asf-site branch.
-
Create and checkout a new branch named "gh-pages". This will not be used in a pull request.
git checkout -b gh-pages
-
Move the contents of the "content" folder to the root of the project.
-
Modify each HTML page prepending to all references (href= and src=) to the site with "/rya-site" . Ignore references beginning http.
For example:
Before:
``<link href="/assets/themes/apache/bootstrap/css/bootstrap.css" rel="stylesheet">``
After:
``<link href="/rya-site/assets/themes/apache/bootstrap/css/bootstrap.css" rel="stylesheet">``
This command should do the replacement:
``find . -name \*.html -exec sed -ri 's/=\"\//=\"\/rya-site\//g' {} \;``
-
Commit changes and push to your public github project named rya-site.
git commit -a -m "New stuff"
git push git push --set-upstream yourGitHub gh-pages
-
Login to your github account and to the project rya-site forked from apache/rya-site, and click on the Settings tab. Scroll down to GitHub Pages and choose source=gh-pages branch. Save.
-
Browse to the site:
replacing yourGitHubID with your GitHub account ID.
- Check your work and ask others to review by sending this URL.