Skip to content

Commit cadbc12

Browse files
committed
adding template to master
1 parent d8061d7 commit cadbc12

File tree

142 files changed

+9189
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+9189
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/software
2+
/licensed
3+
OLD
4+
_site
5+
/free
6+
/non-free
7+
*.keytab

404.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: page
3+
title: "404: Page not found"
4+
permalink: 404.html
5+
search: exclude
6+
---
7+
8+
<div class="page">
9+
<h1 class='text-center'>Beep boop! Page not found.</h1>
10+
<img style="padding:30px" class='img-center' src="{{ site.baseurl }}assets/img/robot.png">
11+
<p class="text-center lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ site.baseurl }}">Head back home</a> to try finding it again.</p>
12+
</div>

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# RedDocs Researcher Docs
2+
3+
Welcome to the RedDocs template for researcher documentation! This is a [Jekyll](https://jekyllrb.com/docs/installation/) site, meaning that it is incredibly easy to contribute to. How easy?
4+
5+
- adding a news item means adding a markdown document to the [_posts/news](_posts/news) folder
6+
- the core docs, which are rendered automatically along with navigation, are also markdown files in the [_docs](_docs) folder
7+
- the site renders automatically on a push to the `gh-pages` branch of the repo, no additional building or continuous integration is necessary.
8+
9+
![img/intro.png](img/intro.png)
10+
11+
12+
## QuickStart
13+
Clone, make changes to files in [_docs](_docs), and push a PR to the `gh-pages` branch of this repo to be reviewed. More specifically:
14+
15+
16+
git clone https://github.com/stanford-rc/sherlock-docs
17+
cd sherlock-docs
18+
19+
20+
1. Option 1: Docker
21+
22+
Download [docker](https://docs.docker.com/engine/installation/), download the site repository to a folder, and run a container:
23+
24+
25+
docker run --label=jekyll --volume=$(pwd):/srv/jekyll -it -p 127.0.0.1:4000:4000 jekyll/jekyll
26+
27+
28+
Then go to `127.0.0.1:4000/template-jekyll-docs/` in your browser to see the site! Make changes, add the files to your github folder, preview and go! We can even easily add continuous integration to preview the site so others don't have to build locally.
29+
30+
31+
2. Option 2: Run Locally
32+
33+
34+
Install [Jekyll](https://jekyllrb.com/docs/installation/) and then run with:
35+
36+
37+
jekyll serve
38+
39+
40+
### About Pages
41+
A page is rendered with the template that has a sidebar, the one that looks like this:
42+
43+
44+
![img/docs.png](img/docs.png)
45+
46+
Any page that you add, meaning an `html` or `markdown` file in the [pages](pages) folder will have the docs sidebar if you add the following to the front-end matter:
47+
48+
sidebar: true
49+
50+
When left undefined (desired for pages like news, 404, etc), this sidebar will be different:
51+
52+
![img/sidebar.png](img/sidebar.png)
53+
54+
55+
### How do the docs work?
56+
Check out the [demo](https://researchapps.github.io/template-jekyll-docs/docs) to learn about how the folder of [_docs](_docs) is rendered automatically.
57+
58+
59+
### Need help?
60+
Check out the [demo](https://researchapps.github.io/template-jekyll-docs), and for feature requests please submit an [issue](https://github.com/researchapps/template-jekyll-docs/issues). This is a work in progress, and much change is expected. Specifically:
61+
62+
- What functions or content formatting would you like to see for examples?
63+
- What third party integrations would be useful?
64+
- What can we describe better for setting up or changing content?
65+
66+
67+
### Special Thanks
68+
Huge props to [mkdocs-material](https://github.com/squidfunk/mkdocs-material) by squidfunk the base material design template that we converted to Jekyll, and to @killian for getting us started with the hugo version!

_config.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Dependencies
2+
highlighter: rouge
3+
4+
markdown: kramdown
5+
kramdown:
6+
input: GFM
7+
auto_ids: true
8+
hard_wrap: false
9+
syntax_highlighter: rouge
10+
11+
# filter used to process markdown. note that kramdown differs from github-flavored markdown in some subtle ways
12+
13+
# Permalinks
14+
permalink: pretty
15+
16+
# Setup
17+
title: Documentation
18+
tagline: 'Research Portal'
19+
description: 'Documentation Template for Researchers'
20+
url: http://researchapps.github.io/template-jekyll-docs
21+
baseurl: /template-jekyll-docs/
22+
23+
author:
24+
name: 'Vanessa Sochat'
25+
url: https://twitter.com/StanfordCompute
26+
github: 'researchapps'
27+
twitter: 'StanfordCompute'
28+
29+
paginate: 5
30+
gems: [jekyll-paginate, jekyll-gist]
31+
collections:
32+
- docs
33+
34+
# Defaults
35+
defaults:
36+
-
37+
scope:
38+
path: ""
39+
type: "pages"
40+
values:
41+
layout: "page"
42+
43+
44+
# Stuff to ignore
45+
exclude:
46+
- playground
47+
- OLD
48+
- theme
49+
- src
50+
51+
# Custom vars
52+
version: 1.0.0
53+
54+
github:
55+
repo: https://github.com/researchapps/template-jekyll-docs
56+
57+
58+
# Social networking, etc
59+
google_analtics: "UA-68034405-2"
60+
disqus_shortname: "stanfordrc"
61+
twitter_username: StanfordCompute
62+
github_username: researchapps
63+
contact_email: [email protected]
64+
65+
# Site information
66+
site_name: RedDocs
67+
site_description: Documentation Template for Researchers
68+
site_favicon: assets/img/favicon/favicon.ico # relative to baseurl
69+
#logo: assets/img/logo_small.png # relative to baseurl
70+
71+
72+
# Copyright
73+
copyright: "Have questions? Feel free to contact <a href='mailto:[email protected]'>Research Applications</a>"

_docs/1000_intro.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
sectionid: intro
3+
sectionclass: h1
4+
title: Introduction
5+
number: 1000
6+
---
7+
8+
You have code, and you need an easy way to document it. You might even want the docs to live in the github pages branch of the code's repository. If you are using Python, we recommend [Sphinx](http://www.sphinx-doc.org/en/stable/contents.html) documentation built automatically on [readthedocs](http://readthedocs.org/), but this may be too complicated, or not suitable for your needs. This is RedDocs, with substantial thanks to <a href="https://github.com/squidfunk/mkdocs-material" target="_blank">mkdocs material,</a>. We have added a front page and jekyll-ized that theme, adding automatic generation of pages and navigation for docs.
9+
10+
Here we'll show you what RedDocs looks like and how you will use it. Take a look to the left. There is a sidebar with links, and contents (what you are reading now). When you click the link it scrolls to the section, and that's it.
11+
12+
Let's get started!

_docs/2000_set-up.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
sectionid: set-up
3+
sectionclass: h1
4+
is-parent: yes
5+
title: Set Up
6+
number: 2000
7+
---
8+
9+
The general idea is that you are going to be able to host this on <a href="https://help.github.com/articles/what-is-github-pages/" target="_blank">github-pages</a>, which is available to anyone with a Github account. We have provided a Dockerized development environment, unless you want to <a href="https://jekyllrb.com/docs/installation/">install Jekyll yourself</a>.
10+
11+
When you are ready to go, you can download the theme, and then start developing your site. Just navigate to the folder, open a terminal and type:
12+
13+
{% highlight bash %}
14+
jekyll serve
15+
{% endhighlight %}
16+
17+
You will then be able to see the page at **localhost:4000** and make your changes. When you are happy just push them to github in a gh-pages branch, or the master branch of your organization or user, and you're site will be compiled by GitHub for you.

_docs/2100_config.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
sectionid: config
3+
sectionclass: h2
4+
parent-id: set-up
5+
title: _config.yml
6+
number: 2100
7+
---
8+
9+
There is very few configuration to be done before you are up and running, still the ones you need to add, are as follows:
10+
11+
In the `_config.yml`-file:
12+
13+
{% highlight yaml %}
14+
# name of the docs
15+
name: Stanford Documentation Template
16+
17+
# docs author
18+
author: Stanford Research Computing
19+
20+
# docs version
21+
version: V 1.0
22+
{% endhighlight %}
23+
24+
All of these, minus the version, will be displayed on the top left-hand corner.

_docs/3000_content.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
sectionclass: h1
3+
sectionid: content
4+
is-parent: yes
5+
title: Content
6+
number: 3000
7+
---
8+
9+
Let's get to the meat of your docs - your content! How does it work?
10+
11+
The only thing you need to care about are the files in the `_entries` folder. Each of these will be written separately and then be compiled into one single HTML file (`index.md`). This ensures that the output is minimal.

_docs/3100_collection-entries.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
sectionclass: h2
3+
sectionid: collection-entries
4+
parent-id: content
5+
is-parent: yes
6+
number: 3100
7+
title: Collection Entries
8+
---
9+
Okay, so the collection is the entries collection. All of your documentation sections will be placed within that folder.
10+
The index file will then go over every one of these and put them together.
11+
12+
There are different ways on how you can take care of the order of the entries, depending on which one you chose, you will either have to work with filenames, or with the `number` front matter.
13+
14+
If you decide to work with file-names, you will just prefix your file names with numbers.

_docs/3110_section-types.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
sectionid: section-types
3+
sectionclass: h3
4+
parent-id: collection-entries
5+
is-parent: yes
6+
number: 3110
7+
title: Section Types
8+
---
9+
10+
There are three different levels supported, basically four, but the `h4` tags will not be included, within the navigation by default. Read on if you want to change that.

0 commit comments

Comments
 (0)