Skip to content

Commit

Permalink
Merge pull request #44 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release v0.3.0
  • Loading branch information
jhkennedy authored Oct 6, 2023
2 parents 94a0742 + 61a90c7 commit f70ea00
Show file tree
Hide file tree
Showing 16 changed files with 265 additions and 302 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Create Jira issue

on:
issues:
types: [labeled]

jobs:
call-create-jira-issue-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
JIRA_FIELDS: ${{ secrets.JIRA_FIELDS }}
34 changes: 2 additions & 32 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,5 @@ name: Static analysis
on: push

jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Scan for secrets with gitleaks
uses: zricethezav/gitleaks-action@master


trufflehog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install trufflehog gitdb2=="2.*"
- name: Scan for secrets with trufflehog
run: |
git fetch origin +refs/tags/*:refs/tags/*
export LAST_TAG_HASH=$(git show-ref --hash -- $(git describe --abbrev=0))
trufflehog --regex --entropy True --since_commit "${LAST_TAG_HASH}" \
--exclude_paths .trufflehog.txt file://"${PWD}"
call-secrets-analysis-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
2 changes: 2 additions & 0 deletions .github/workflows/tag-and-distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ jobs:
- name: Pip install ${{ needs.package.outputs.SDIST_VERSION }}
shell: bash -l {0}
run: |
sleep 30s
python -m pip install --upgrade pip
python -m pip install mkdocs-asf-theme==${{ needs.package.outputs.SDIST_VERSION }}
55 changes: 0 additions & 55 deletions .gitleaks.toml

This file was deleted.

1 change: 0 additions & 1 deletion .trufflehog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.*gitleaks.toml$
.*mkdocs_theme.yml$
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0]

### Changed
- Upgraded `mkdocs-material` to v9.4.2. We have updated our templates in [asf_theme/partials](./asf_theme/partials) to match the [upstream versions](https://github.com/squidfunk/mkdocs-material/tree/9.4.2/src/templates/partials) as closely as possible. This introduces breaking changes. In particular:
- If you want a footer, you should make the following change to your website's `mkdocs.yml` file:
```diff
theme:
features:
+ - navigation.footer
```
- You should carefully review your website to confirm that everything still renders and functions as expected.
- If anything does not work as expected, you may want to read the [`mkdocs-material` upgrade guide](https://squidfunk.github.io/mkdocs-material/upgrade/) starting at [Upgrading from 6.x to 7.x](https://squidfunk.github.io/mkdocs-material/upgrade/#upgrading-from-6x-to-7x) for any other important changes that may apply to your website.

### Removed
- Analytics is no longer provided by default. You should follow <https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/> to enable analytics for your website.

### Fixed
- Fixed <https://github.com/ASFHyP3/mkdocs-asf-theme/issues/27> by upgrading `mkdocs-material`.

## [0.2.4](https://github.com/ASFHyP3/mkdocs-asf-theme/compare/v0.2.3...v0.2.4)

Expand All @@ -17,7 +35,6 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed
- ASF logo and background map now appear correctly in "Project" or repo level sites


## [0.2.2](https://github.com/ASFHyP3/mkdocs-asf-theme/compare/v0.2.1...v0.2.2)

### Changed
Expand Down
47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ which generates [ASF HyP3's documentation](https://hyp3-docs.asf.alaska.edu/).
## Customization
> [!WARNING]
> You should NOT include the `navigation.instant` feature in your `mkdocs.yml`.
> See <https://github.com/ASFHyP3/hyp3-docs/pull/371> for more information.

This theme has been developed with sensible defaults to be used out-of-the-box by
ASF documentation sites. While sections below describe how to customize the
ASF-specific features of this theme, we hope most users won't need them.
Expand All @@ -42,21 +46,8 @@ consider either:

### Analytics

This theme will provide Google Analytics integration for an ASF documentation site.
However, analytics can be customized in your `mkdocs.yml` with
```yaml
google_analytics:
- UA-XXXXXXXX-X
- auto # or a specific site URL
```

To turn off analytics entirely, remove the site level `google_analytics`
configuration and clear the theme one with
```yaml
theme:
name: asf-theme
google_analytics:
```
You can follow <https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/>
to enable analytics for your site.

### Logos

Expand Down Expand Up @@ -145,3 +136,29 @@ theme:
- icon: fontawesome/brands/gitter
link: https://gitter.im/ASFHyP3/community
```
## Development
### Upgrading `mkdocs-material` to a new major version

When upgrading the `mkdocs-material` dependency to a new major version,
you should reference the [upgrade guide](https://squidfunk.github.io/mkdocs-material/upgrade/)
for any important changes.

In particular, you should update each template `.html` file in [asf_theme/partials](./asf_theme/partials)
to match the latest upstream version as closely as possible.
Each template file should include a comment near the top of the file
with a link to the upstream version upon which it was based.
When updating a particular template file,
you can `diff` it against the linked upstream version to see what changes were made.
Then you can apply those changes to the *latest* upstream version of the file.

For example, when updating `header.html` from major version 9 to 10,
you can `diff` our version of `header.html` against the `9.x.x` upstream version linked near the top of the file.
Then you can download the latest `10.x.x` upstream version from <https://github.com/squidfunk/mkdocs-material>
and apply the `diff` changes, adapting them as necessary for the latest version of `mkdocs-material`.

You may also have to update
[asf_theme/assets/stylesheets/asf.css](./asf_theme/assets/stylesheets/asf.css),
[asf_theme/main.html](./asf_theme/main.html),
and [asf_theme/mkdocs_theme.yml](./asf_theme/mkdocs_theme.yml) as appropriate.
47 changes: 35 additions & 12 deletions asf_theme/assets/stylesheets/asf.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,38 @@ a {
}

.md-header, .md-footer {
background: rgb(101, 102, 92);
background: linear-gradient(180deg, rgba(101, 102, 92, 1) 0%, rgba(106, 106, 106, 1) 100%);
box-shadow: 0 5px 20px 0 rgba(0, 0, 0, 0.5);
transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;

}

.md-header-nav__button.md-logo img {
height: 2.0rem;
width: auto;
display: inline-block;
margin-top: -7px;
.md-header {
background: rgb(101, 102, 92);
background: linear-gradient(180deg, rgba(101, 102, 92, 1) 0%, rgba(106, 106, 106, 1) 100%);
}

.md-footer-nav {
.md-footer {
background: rgb(106, 106, 106);
background-image: url("../images/map.png");
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
min-height: 510px;
min-height: 574px;
border-top: 58px solid #ffcd00;
}

.md-header__button.md-logo img {
height: 2.0rem;
width: auto;
display: inline-block;
margin-top: -7px;
}

.md-footer-meta.md-typeset {
position: absolute;
bottom: 0;
width: 100%;
}

.md-footer-container {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -82,14 +91,28 @@ a {
background-color: black;
}

.md-footer-copyright-link {
.md-copyright-link {
color: #1bb0ce !important;
}

.md-footer-copyright {
.md-copyright {
margin-left: 0;
}

.md-nav__title {
color: black;
}

.md-nav--primary .md-nav__title {
background: #f8f8f8;
box-shadow: none;
}

.md-nav--secondary .md-nav__title {
background: #f8f8f8;
box-shadow: none;
}

.expert-rec-search {
margin-top: 10px;
}
6 changes: 1 addition & 5 deletions asf_theme/main.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- Extends https://github.com/squidfunk/mkdocs-material/blob/9.4.2/src/templates/base.html -->
{% extends "base.html" %}
{% block styles %}
{{ super() }}
Expand All @@ -19,11 +20,6 @@
data-current-daac="ASF DAAC">
</script>
{% endblock %}
{% block analytics %}
{% if config.google_analytics or config.theme.google_analytics %}
{% include "partials/integrations/analytics.html" %}
{% endif %}
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ 'assets/javascripts/expert-rec-search.js' | url }}"></script>
Expand Down
5 changes: 0 additions & 5 deletions asf_theme/mkdocs_theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ social:
link: https://twitter.com/Ak_Satellite
- icon: fontawesome/brands/youtube
link: https://www.youtube.com/channel/UChCfI0oVWw4qDwEidnDskJQ

# ASF's Google Analytics
google_analytics:
- UA-991100-5
- search.asf.alaska.edu
31 changes: 24 additions & 7 deletions asf_theme/partials/logo.html → asf_theme/partials/copyright.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016-2020 Martin Donath <[email protected]>
Copyright (c) 2016-2023 Martin Donath <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
Expand All @@ -20,9 +20,26 @@
IN THE SOFTWARE.
-->

<!-- Logo -->
{% if config.theme.logo %}
<img src="{{ config.theme.logo | url }}" alt="logo" />
{% elif config.theme.icon.logo %}
{% include ".icons/" ~ config.theme.icon.logo ~ ".svg" %}
{% endif %}
<!-- Adapted from https://github.com/squidfunk/mkdocs-material/blob/9.4.2/src/templates/partials/copyright.html -->

<!-- Copyright and theme information -->
<div class="md-copyright">
<div class="md-copyright__highlight">
{% if config.copyright or config.theme.copyright %}
&copy; <span id="copyright-year"></span>
<script type="text/javascript">
current_year = new Date().getFullYear();
document.getElementById("copyright-year").innerHTML=current_year;
</script>
{{ config.copyright if config.copyright else config.theme.copyright}}
{% endif %}
<!-- ASF non-discrimination disclaimer-->
&nbsp;&nbsp;
<a href="https://www.alaska.edu/nondiscrimination"
target="_blank"
class="md-copyright-link">
UA is an AA/EO employer and educational institution and prohibits
illegal discrimination against any individual
</a>
</div>
</div>
Loading

0 comments on commit f70ea00

Please sign in to comment.