Skip to content

Commit dcc56e7

Browse files
Merge pull request #14 from TidbitSoftware/main
Added support for news items
2 parents 4c19667 + 6cf7f71 commit dcc56e7

15 files changed

+322
-11
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
branches: ["main"]
1010
paths:
1111
- ".github/workflows/pages.yml"
12+
- "docs/_posts/**"
1213
- "docs/about-issm/*"
1314
- "docs/about-issm/publications/bibtex/references.bib"
1415
- "docs/about-issm/publications/index.md"

docs/README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Repository for generating online and PDF documentation for ISSM and storing publ
33

44
The [generated documentation](https://issmteam.github.io/ISSM-Documentation/) is a [Jekyll] site that uses a customized version of the [Just the Docs] theme and is built and published on [GitHub Pages].
55

6+
Blog features on the 'News' page are adapted from the [Mediumish Jekyll Template].
7+
68
## Making Changes to the Documentation
79
If you have write access to this repository, you can make and commit changes from a copy of the repository or make changes to pages directly through the GitHub interface. Alternatively, all users may fork this repository and submit pull requests with proposed changes.
810

@@ -15,9 +17,9 @@ Assuming [Jekyll] and [Bundler] are installed on your computer:
1517

1618
2. Run `bundle install`.
1719

18-
3. Run `bundle exec jekyll serve` to build your site and preview it at `localhost:4000`.
20+
3. Run `bundle exec jekyll serve --watch` to build your site and preview it at `localhost:4000`.
1921

20-
The built site is stored in the directory `_site`.
22+
The built site is stored in the directory `_site/`.
2123

2224
## Structure
2325
Each page in the [front end of the documentation](https://issmteam.github.io/ISSM-Documentation/) has a corresponding Markdown file (`.md`) in the appropriate subdirectory of `docs/`. For example,
@@ -30,14 +32,36 @@ docs/getting-started/model-class/index.md
3032
````
3133
A subdirectory may contain the default file (`index.md`) as well as additional sibling files. In these cases, the `index` file is just that: an index of the other files in the subdirectory (e.g. `docs/troubleshooting/index.md`).
3234

35+
When built, pages are converted from Markdown to HTML and deployed to the `_site/` directory (default).
36+
3337
### Publications
3438
The 'Publications' page and its corresponding content files and their structure in the repo work differently. The important thing to know is that if you want to add a new publication to the front end page, you can do so by adding a DOI to the appropriate file in `docs/publications/doi`, which are named according to the year that the corresponding articles were published. On commit, the entire 'Publications' page will be regenerated.
3539

3640
For more info, see `docs/publications/README`.
3741

42+
### News
43+
The 'News' page and posts rely on [Jekyll's built-in support for blogging]{https://jekyllrb.com/docs/posts/}.
44+
45+
## More In-depth Development
46+
Various components of the default presentation of the site can be overridden by adding custom files to the appropriate directories (which may not yet exist and need to be created).
47+
48+
For example,
49+
- a custom color scheme has been added to `_sass/color_schemes/issm.scss` (see also: [Just the Docs - Custom Schemes]).
50+
- custom SASS rules have been added to `_sass/custom/custom.scss` (see also: [Just the Docs - Custom Styles]).
51+
- custom layouts have been added to `_layouts/` (see also: [Jekyll - Layouts]). Of note, `default.html` was copied in full from Ruby Gem and modified so that `h1` headings do not have an anchor link attached to them.
52+
53+
Recipes for custom layouts can be derived from the default ones shipped with the Just the Docs Ruby Gem,
54+
1. Find Ruby Gem installation directories by running `gem environment` and inspecting the `GEM PATHS` section.
55+
1. Search each location for the `just-the-docs-*` directory.
56+
1. Inspect the files in the contained `_layouts/` directory.
57+
1. These layouts can be overridden by creating a new file of the same name in the `_layouts/` directory of the ISSM Documentation repository.
58+
3859
<!--- Reference-style Links --->
3960
[Jekyll]: https://jekyllrb.com
61+
[Jekyll - Layouts]: https://jekyllrb.com/docs/layouts
4062
[Just the Docs]: https://just-the-docs.github.io/just-the-docs/
63+
[Just the Docs - Custom Schemes]: https://just-the-docs.com/docs/customization/#custom-schemes
64+
[Just the Docs - Custom Styles]: https://just-the-docs.com/docs/customization/#override-and-completely-custom-styles
4165
[GitHub Pages]: https://docs.github.com/en/pages
4266
[Bundler]: https://bundler.io
4367

docs/_layouts/default.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: table_wrappers
3+
---
4+
5+
<!DOCTYPE html>
6+
7+
<html lang="{{ site.lang | default: 'en-US' }}">
8+
{% include head.html %}
9+
<body>
10+
<a class="skip-to-main" href="#main-content">Skip to main content</a>
11+
{% include icons/icons.html %}
12+
{% if page.nav_enabled == true %}
13+
{% include components/sidebar.html %}
14+
{% elsif layout.nav_enabled == true and page.nav_enabled == nil %}
15+
{% include components/sidebar.html %}
16+
{% elsif site.nav_enabled != false and layout.nav_enabled == nil and page.nav_enabled == nil %}
17+
{% include components/sidebar.html %}
18+
{% endif %}
19+
<div class="main" id="top">
20+
{% include components/header.html %}
21+
<div class="main-content-wrap">
22+
{% include components/breadcrumbs.html %}
23+
<div id="main-content" class="main-content">
24+
<main>
25+
{% if site.heading_anchors != false %}
26+
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" h_min=2 %}
27+
{% else %}
28+
{{ content }}
29+
{% endif %}
30+
31+
{% if page.has_toc != false %}
32+
{% include components/children_nav.html %}
33+
{% endif %}
34+
</main>
35+
{% include components/footer.html %}
36+
</div>
37+
</div>
38+
{% if site.search_enabled != false %}
39+
{% include components/search_footer.html %}
40+
{% endif %}
41+
</div>
42+
43+
{% if site.mermaid %}
44+
{% include components/mermaid.html %}
45+
{% endif %}
46+
</body>
47+
</html>

docs/_layouts/post.html

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
layout: default
3+
---
4+
5+
<article>
6+
<!-- Post Title -->
7+
{% if page.title %}
8+
<h1>{{ page.title }}</h1>
9+
{% endif %}
10+
<!-- End Post Title -->
11+
12+
<!-- Post Featured Image -->
13+
{% if page.image %}
14+
<img class="featured-image img-fluid" src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ site.baseurl }}/{{ page.image }}{% endif %}" alt="{{ page.title }}">
15+
{% endif %}
16+
<!-- End Featured Image -->
17+
18+
<!-- Post Date -->
19+
<p>
20+
<small>
21+
<span class="post-date"><time class="post-date" datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date_to_string }}</time></span>
22+
{% if page.last_modified_at %}
23+
(Updated: <time datetime="{{ page.last_modified_at | date_to_xmlschema }}" itemprop="dateModified">{{ page.last_modified_at | date: "%b %-d, %Y" }}</time>)
24+
{% endif %}
25+
</small>
26+
</p>
27+
<!-- End Post Date -->
28+
29+
<!-- Post Content -->
30+
<!-- Toc if any -->
31+
{% if page.toc %}
32+
{% if page.beforetoc %}
33+
<p><em>{{page.beforetoc}}</em></p>
34+
{% endif %}
35+
<div class="toc mt-4 mb-4 lead">
36+
<h3 class="font-weight-bold">Summary</h3>
37+
{% include toc.html html=content %}
38+
</div>
39+
{% endif %}
40+
<!-- End Toc -->
41+
{{ content }}
42+
43+
<!-- Post Categories -->
44+
<!-- <div class="after-post-cats">
45+
<ul class="tags mb-4">
46+
{% assign sortedCategories = page.categories | sort %}
47+
{% for category in sortedCategories %}
48+
<li>
49+
<a class="smoothscroll" href="{{site.baseurl}}/categories#{{ category | replace: " ","-" }}">{{ category }}</a>
50+
</li>
51+
{% endfor %}
52+
</ul>
53+
</div> -->
54+
<!-- End Categories -->
55+
56+
<!-- Post Tags -->
57+
<!-- <div class="after-post-tags">
58+
<ul class="tags">
59+
{% assign sortedTags = page.tags | sort %}
60+
{% for tag in sortedTags %}
61+
<li>
62+
<a class="smoothscroll" href="{{site.baseurl}}/tags#{{ tag | replace: " ","-" }}">#{{ tag }}</a>
63+
</li>
64+
{% endfor %}
65+
</ul>
66+
</div> -->
67+
<!-- End Tags -->
68+
</article>
69+
70+
<!-- Prev/Next -->
71+
<!-- <div class="row PageNavigation d-flex justify-content-between font-weight-bold">
72+
{% if page.previous.url %}
73+
<a class="prev d-block col-md-6" href="{{ site.baseurl }}/{{page.previous.url}}"> &laquo; {{page.previous.title}}</a>
74+
{% endif %}
75+
{% if page.next.url %}
76+
<a class="next d-block col-md-6 text-lg-right" href="{{ site.baseurl }}/{{page.next.url}}">{{page.next.title}} &raquo; </a>
77+
{% endif %}
78+
<div class="clearfix"></div>
79+
</div> -->
80+
<!-- End Prev/Next -->
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: ISSM Codebase Has Been Migrated From SVN to GitHub
3+
layout: post
4+
image: /ISSM-Documentation/assets/img/news/issm-codebase-has-been-migrated-to-github.png
5+
excerpt: When you get a chance, please check out a new copy from GitHub.
6+
tags: [general,]
7+
featured: true
8+
---
9+
10+
The ISSM codebase has been migrated from SVN to GitHub. When you get a chance, please check out or fork a new copy from the <a href="https://github.com/ISSMteam/ISSM" target="_blank">ISSM GitHub repository</a>.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: 2025 ISSM Workshop at Dartmouth College announced
3+
layout: post
4+
image: /ISSM-Documentation/assets/img/news/2025-issm-workshop-at-dartmouth.jpg
5+
excerpt: We are happy to announce that the 2025 ISSM Workshop will be held at Dartmouth College.
6+
tags: [workshops,]
7+
---
8+
9+
The 2025 ISSM Workshop will take place at Dartmouth, in Hanover, New Hampshire, USA, March 19th to 21st, 2025.
10+
11+
We are pleased to announce that registration is now open for the 2025 Ice-sheet and Sea-level System Model (ISSM) Workshop. There is no fee for participation in the workshop. A limited amount of travel support may be provided by Dartmouth’s Changing Polar Regions Academic cluster to help students or early-career scholars attend the workshop. Tutorials and interactive sessions will be offered for beginners/advanced users and developers interested in learning how to use ISSM. The workshop will be in-person and will cover both ice sheet dynamics and solid-Earth/Sea level fingerprints. We hope the workshop generates fruitful interactions between our team, the growing community of ISSM users, and the broader cryosphere community.
12+
13+
The workshop is sponsored by Dartmouth’s Changing Polar Regions Academic cluster, and NASA’s Earth Surface and Interior, Cryosphere and Sea Level Change Team Programs.
14+
15+
<a href="https://icefuture.org/issm-workshop-2025/" target="_blank">Register for the workshop</a>

docs/_sass/custom/custom.scss

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
@mixin clearfix {
2+
&:after {
3+
content: "";
4+
display: table;
5+
clear: both;
6+
}
7+
}
8+
19
.dev-status-prod {
210
background-color: green;
311
}
@@ -14,6 +22,7 @@
1422
display: flex;
1523
flex-flow: row wrap;
1624
justify-content: space-around;
25+
padding-left: unset !important;
1726

1827
> li {
1928
&::before {
@@ -35,3 +44,76 @@
3544
}
3645
}
3746
}
47+
48+
.post-index {
49+
padding-left: unset !important;
50+
51+
&.home-page-post-index {
52+
> li {
53+
margin: 0 auto;
54+
width: 100%;
55+
max-width: 320px;
56+
57+
img {
58+
width: 100%;
59+
height: auto;
60+
}
61+
62+
> div {
63+
64+
}
65+
}
66+
}
67+
68+
&.news-page-post-index {
69+
> li {
70+
img {
71+
width: 100%;
72+
height: auto;
73+
}
74+
75+
> div {
76+
77+
}
78+
}
79+
}
80+
81+
> li {
82+
&::before {
83+
display: none;
84+
content: none;
85+
}
86+
87+
.post-excerpt {
88+
margin-top: 0;
89+
}
90+
}
91+
}
92+
93+
/* Sidebar expanded */
94+
@media (min-width: 800px) {
95+
.post-index {
96+
&.home-page-post-index {
97+
> li {
98+
@include clearfix;
99+
100+
margin: unset;
101+
max-width: unset;
102+
103+
img, > div {
104+
float: left;
105+
}
106+
107+
img {
108+
width: 31%;
109+
height: auto;
110+
}
111+
112+
> div {
113+
margin-left: 3%;
114+
width: 66%;
115+
}
116+
}
117+
}
118+
}
119+
}

docs/about-issm/development-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Development Status
33
layout: default
44
parent: About ISSM
5-
nav_order: 3
5+
nav_order: 4
66
has_children: false
77
has_toc: false
88
---

docs/about-issm/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ has_toc: false
99
# About ISSM
1010
- <a href="./contributors" target="_top">Contributors</a>
1111
- <a href="./collaborations" target="_top">Collaborations</a>
12-
- <a href="./development-status" target="_top">Development Status</a>
1312
- <a href="./publications" target="_top">Publications</a>
14-
<!--- - <a href="./news" target="_top">News</a> --->
13+
- <a href="./development-status" target="_top">Development Status</a>
14+
- <a href="./news" target="_top">News</a>
1515

1616
----
1717

docs/about-issm/news.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: News
3+
layout: default
4+
parent: About ISSM
5+
nav_order: 5
6+
has_children: false
7+
has_toc: false
8+
---
9+
10+
# News
11+
<ul class="post-index news-page-post-index">
12+
{% for post in site.posts %}
13+
<li>
14+
<a href="{{ post.url }}"><img src="{{ post.image }}" /></a>
15+
<div>
16+
<a href="{{ post.url }}"><span class="text-beta">{{ post.title }}</span></a>
17+
<p class="post-excerpt">{{ post.excerpt }}</p>
18+
</div>
19+
</li>
20+
{% endfor %}
21+
</ul>

0 commit comments

Comments
 (0)