The website is setup to automatically deploy via Netlify as soon as a PR is merged. Each PR also generates a preview of the website with changes (see deployment preview in the PR) so that any problems can be fixed before hitting the merge button. Once merged, the website is rendered live within minutes.
Apart from the homepage all content is built from Markdown files stored under content/, templated as explained below, and with the inclusion of html partials.
They use partials, e.g. all templates use the same header, head and footer. Partials are presented in the next subsection.
- default pages e.g. about, donate
- single page template -- it includes a loop to include all partials mentioned in the frontmatter, e.g. in the community.md you see
partials=["community.html","mailkimp.html"]
that will include the team, collaborators, and form to subscribe to the newsletter.
- single page template -- it includes a loop to include all partials mentioned in the frontmatter, e.g. in the community.md you see
- blog
- tutorials
- tags page
- use cases
- tech notes
- tech notes list
- Single tech notes page
All under https://github.com/ropensci/roweb2/blob/master/themes/ropensci/layouts/partials/
To add or remove calendar events, edit themes/ropensci/static/js/calendarJSON.js
It should be straightforward to copy the existing JSON template. In the future we can automate writing out this file from the calendar API (failed to work this time around).
- Edit
themes/ropensci/static/js/calendarJSON.js
and add the event - Update the comm calls repo.
- Add the appropriate css here as the first item of the carousel.
- Link the events table to the appropriate issue on the
commcalls
repo.
CSS is defined in a series of pcss
files that you need to compile into CSS when modified.
You need a specific postcss stack defined in package.json.
If you don't have npm yet, run e.g. brew install node
.
cd themes/ropensci/static/
npm install . --no-optional
npm run css
Don't modify the CSS file directly because the changes will get overwritten on the next run.
The _redirects file is used to proxy or redirect content from the old website. Try to make sure existing hyperlinks to ropensci.org
will keep working. Currently we have:
/blog/blog/...
redirects to/blog/...
/blog/technotes/...
redirects to/technotes/...
/assets/...
is proxied by the server to github pages branch of the old website- The RSS feeds
/feed.xml
redirect to the new location/index.xml
.
Legacy website
The old website has been archived over at ropensci/roweb
and continues to maintain the full history of commits, contributors, and issues from the early days of the project.