Skip to content

Commit

Permalink
Merge branch 'master' into density
Browse files Browse the repository at this point in the history
  • Loading branch information
florisvdh committed Sep 16, 2020
2 parents e09be23 + 6fdd707 commit aad7b19
Show file tree
Hide file tree
Showing 575 changed files with 66,802 additions and 45,308 deletions.
64 changes: 54 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,61 @@
.DS_Store

# R
.Rproj.user
# History files
.Rhistory
.Rapp.history

# Session Data files
.RData
.Ruserdata

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/
.Rproj.user
*.Rproj
*R_cache/

# Ignore tokens
*.rds
# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth
token

# ignore temporary download files
# knitr and R markdown default cache directories
/*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md

# Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html
rsconnect/

# Mac OS X
.DS_Store

# Tokens
*.rds
token*

# npm & JS libaries
node_modules/
package-lock.json

# Public folder
public/

# Hugo themes directory
themes/

# Certain content files
content/**/*.html

# Temporary download files
2016-04-20-processed-logs*
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
language: go

cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod

before_install:
- sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev
- . $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable

# Install hugo, lunr (search) & minimo theme (v2.7.0)
install:
- curl -Lo hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.62.0/hugo_0.62.0_Linux-64bit.deb
- sudo dpkg -i hugo.deb
- npm install lunr glob
- git clone https://github.com/MunifTanjim/minimo.git --branch v2.7.0 themes/minimo

before_script:
- rm -rf public 2> /dev/null

# Run the build script
script:
- hugo

# Need to add post build for the search functionality...
before_deploy:
- node themes/minimo/scripts/generate-search-index-lunr.js

deploy:
provider: pages
local_dir: public
github_token: $GITHUB_TOKEN
skip_cleanup: true
verbose: true
keep-history: true
on:
branch: master
55 changes: 37 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@

# Tutorials

Here you can find the source files for the instructions on the use, installation, and development of freeware open source research software at the Research Institute of Nature and Forest (INBO). Visit <http://inbo.github.io/tutorials> to see the rendered version.
[![Build Status](https://travis-ci.com/inbo/tutorials.svg?branch=master)](https://travis-ci.com/inbo/tutorials)

This repository contains the source files for the [INBO tutorials website](https://inbo.github.io/tutorials/): a collection of instructions on the use, installation and development of research software at the Research Institute of Nature and Forest (INBO).

## Adding content

New tutorials should go in a new directory in `content/tutorials`. Use plain markdown files (`.md`) as much a possible. Use Rmarkdown files (`.Rmd`) when calculations in R are required. For more information about creating a new tutorial, check the [create tutorial](https://inbo.github.io/tutorials/create_tutorial/) page.

## Building the site

The technology used to create the website is [Hugo](https://gohugo.io/), a static website generator. Hugo will process all the markdown files - ignoring Rmd, which is why these need to be knit beforehand - and create the necessary files (html, css, js) for the website. These are served from the [`gh-pages` branch](https://github.com/inbo/tutorials/tree/gh-pages).

### Travis CI

[Travis](https://travis-ci.com/inbo/tutorials) will automatically run the steps above ([install Hugo, download theme, run Hugo, deploy website](.travis.yml)) for every pull request or commit to the master branch. You will see in the pull request if the build was successful. If not, [check the build logs](https://travis-ci.com/inbo/tutorials/builds) to figure out what went wrong.

### Building the site on your local computer

1. [Install hugo](https://gohugo.io/getting-started/installing/)
2. Clone the tutorials repository
3. In the cloned tutorials directory, install the theme with `git clone https://github.com/MunifTanjim/minimo.git --branch v2.7.0 themes/minimo`
4. Build and serve the site with `hugo server -D`

For more information, see [Hugo's getting started documentation](https://gohugo.io/getting-started/usage/).

### Customizing the theme

The repository is structured in two folders: `docs` and `source`. `source` contains all source files of the website in RMarkdown format. One should only edit these files. The `docs` folder contains the rendered version of the source files. <http://inbo.github.io/tutorials> displays the content of the `docs` folder in the HEAD of the master branch.
The tutorials website makes use of the Hugo theme [minimo](https://themes.gohugo.io/minimo/). This theme is not included in the repository, but [downloaded by Travis](https://github.com/inbo/tutorials/blob/c715a8ea58817d280f89133aa06645590b8e16e0/.travis.yml#L18) at build time. This avoids clutter and changes to the theme itself. To customize the theme:

## How to render the source files
1. Browse the `layouts` directory in the [minimo repository](https://github.com/MunifTanjim/minimo/tree/master/layouts) to see which template file you want to customize
2. Copy the template file to the same path in the [`layouts`](layouts/) directory of this repository
3. Edit the file to the desired effect. E.g. [this update](https://github.com/inbo/tutorials/blob/b122758ef8d98977e51335bf227a2cf8c1f6bbd7/layouts/partials/entry/meta.html#L15-L16) to the [original minimo file](https://github.com/MunifTanjim/minimo/blob/4436676dd44c767faaa4fa85f8a24527ce61ba81/layouts/partials/entry/meta.html#L15) adds a "edit this page" link for every page.
4. Hugo will now use your customized file instead of the default theme file.

### Using the command line
For more information, see the [Hugo theme customization documentation](https://gohugo.io/getting-started/quick-start/#step-6-customize-the-theme). To test theme customization, it is best to build the site on your local computer (see above).

```
rmarkdown::render_site("source")
```
## Contributors

### Using the RStudio GUI
[List of contributors](https://github.com/inbo/tutorials/graphs/contributors)

First setup the RStudio project
## License

1. Open RStudio
1. Create a new project:
1. _File > New Project > Version Control > Git_
1. Copy the URL in _Repository URL_
1. _Create project_
1. Go to the _Build_ pane
1. Click _More > Configure Build Tools ..._
1. Set the _Site directory_ to `source` and click _OK_
[Creative Commons Attribution](https://creativecommons.org/licenses/by/4.0/) for [content](content) / [MIT License](https://github.com/inbo/tutorials/blob/master/LICENSE) for source code.

When the RStudio project is setup: Go to the _Build_ pane and click _Build Website_.
Empty file added bwkhab.geojson/BWK
Empty file.
151 changes: 151 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
theme = "minimo"
baseURL = "https://inbo.github.io/tutorials/"
languageCode = "en-us"
title = "INBO Tutorials"

ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.db$", "\\.csv$", "\\.sqlite$", "\\.geojson$"]
# relativeURLs = true
# canonifyurls = true

# for smart copyright line, leave this blank and check [params.copyright]
copyright = ""

disqusShortname = ""
googleAnalytics = ""

Paginate = 1000
preserveTaxonomyNames = true

enableRobotsTXT = true # generate robots.txt

# Syntax Highlighting ( https://gohugo.io/content-management/syntax-highlighting/ )
pygmentsCodefences = true
pygmentsStyle = "autumn"

enableEmoji = true

# Missing translations will default to this content language
defaultContentLanguage = "en"

[params.info]
description = ""
title404 = "Nothing's here..."

[params.assets]
favicon = "favicon.ico"
customCSS = ["css/custom.css"]
customJS = ["js/custom.js"]
gopher = "" # used in 404 template ( Generator: https://gopherize.me )

[params.copyright]
prefix = ""
holder = "Research Institute for Nature and Forest (INBO)"
startYear = "2018"
suffix = "<a rel='license' href='http://creativecommons.org/licenses/by/4.0/' style='float: right;'><img alt='Creative Commons License' src='https://i.creativecommons.org/l/by/4.0/88x31.png'></a>"

[params.settings]
# date & time format: https://golang.org/pkg/time/
dateFormat = "2006, Jan 02"
listDateFormat = "2006, Jan 02"
archiveDateFormat = "Jan 02"
hideEntryNavigation = ["page"] # boolean / array of sections
hideEntryMeta = ["page"] # boolean / array of sections
showReadingTime = true
showLastmod = true
taxonomyCloudShuffle = false
accentColor = "#c04384"
hideMainMenu = true

[params.sidebar]
enable = true

[params.widgets]
header = ["breadcrumbs"]
homepage = ["recent_posts"] # "recent_posts"
sidebar = ["about", "search", "sidebar_menu", "taxonomy_cloud", "social_menu"]

[params.opengraph.facebook]
admins = [] # array of Facebook IDs
appID = ""
pageID = ""

[params.opengraph.twitter]
page = "" # Twitter page username

[params.seo]
# Title Separator: - – — · • * ⋆ | ~ « » < >
titleSeparator = ""

[params.social]
facebook = "INBOVlaanderen"
github = "inbo"
twitter = "INBOVlaanderen"

[params.comments]
enable = false

# Isso: https://posativ.org/isso/
[params.comments.isso]
enable = false
scriptSrc = "" # "https://isso.example.com/js/embed.min.js"
dataAttrs = "" # "data-isso='https://isso.example.com' data-isso-require-author='true'"

[params.comments.staticman]
enable = false
apiEndpoint = "https://api.staticman.net/v2/entry"
maxDepth = 2

[params.comments.staticman.github]
username = ""
repository = ""
branch = "master"

# Utterances: https://utteranc.es
[params.comments.utterances]
enable = false
issueTerm = "pathname" # pathname / url / title

[params.comments.utterances.github]
username = ""
repository = ""

[params.search]
client = "lunr" # algolia / fuse / lunr

[params.search.algolia]
appId = ""
indexName = ""
searchApiKey = ""

[params.githublink]
GithubEditLink = "https://github.com/inbo/tutorials/edit/master/content/"
GithubContentLink = "https://github.com/inbo/tutorials/blob/master/content/"

[taxonomies]
author = "authors"
category = "categories"
tag = "tags"

[permalinks]
#page = "/:slug/"
#articles = "/posts/:slug/"
#tutorials = "/tutorials/:filename/"
#search = "/:slug/"
#categories = "/categories/"
content = "/:slug/"

[[menu.sidebar]]
name = "Repository"
identifier = "repository"
url = "https://github.com/inbo/tutorials"
weight = 110

[blackfriday]
hrefTargetBlank = true

[languages]
# edit this block for your own language
[languages.en]
lang = "en"
languageName = "English"
weight = 1
39 changes: 39 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Home
menu: sidebar
weight: -100
---

## Introduction

Welcome to the tutorials website of the [Research Institute for Nature and Forest (INBO)](https://www.inbo.be/en). It contains a collection of guides, tutorials and further reading material on the installation, use and development of **(research) software** at our institute.

## Getting started

When this is your first time checking this website, welcome! You are always free to look around a bit, but if you are looking for something specific, the website provides 3 options to search for relevant topics:

- [Categories]({{< relref "/categories/_index.md" >}}): A (limited) set of general categories to classify the tutorials. For example, `installation` for support during installation of software or `r` for tutorials about the R programming language. Click on a category to get the relevant tutorials.
- Tags: Check the cloud of tags listed on each page of the website and pick an item that would be relevant for your topic. By clicking on a specific tag, you will get an overview of the tutorials with this tag
- Search: Type any word in the search form and you will get a dropdown list of the pages which contain the word you are looking for.

## Website menu

Apart from the navigation options explained in the previous section, pages are divided into 3 main section accessible with the menu:

- [Tutorials]({{< relref "/tutorials/_index.md" >}}): The main bulk of pages, providing tutorials on a variety of topics.
- [Articles]({{< relref "/articles/_index.md" >}}): Provides useful background information about topics, links to literature, etc.
- [Installation]({{< relref "/installation/_index.md" >}}): Installation instructions for both system administrators and users

The absence of a more granular menu is a deliberate decision to overcome the requirement to recreate a website menu when new tutorials are written. By using categories and tags, more flexibility is provided. The tags list, categories overview and search options are automatically updated when a new tutorial is added to the website.

## Want to contribute?

Great news! By sharing information, we can effectively help each other. Moreover, a tutorial is useful for your future self as well ;-). Anything that could be useful to your colleagues? Instead of keeping a note or document on your own computer or drive, make it a tutorial and share it. Notice that also links/references to other resources are useful to add, as this will enable others to find these reources.

Check the [_create tutorial_]({{< relref "/create_tutorial/index.md" >}}) page for more information on how to contribute to this website!

## Questions?

If you have any questions, do not hesitate to contact the website maintainers (main contributors listed [here](https://github.com/inbo/tutorials/graphs/contributors)), provide a [new issue](https://github.com/inbo/tutorials/issues/new) if you already have a Github account or just ask the [IT helpdesk](mailto:[email protected]) for more information.


5 changes: 5 additions & 0 deletions content/articles/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Articles
menu: sidebar
weight: 10
---
Loading

0 comments on commit aad7b19

Please sign in to comment.