Skip to content

Commit

Permalink
Private Handbook Flip-Flop (#541)
Browse files Browse the repository at this point in the history
* Add link to identity-internal-handbook

* Remove private login

* Update tsconfig

* Remove additional unused configs

Co-authored-by: Andrew Duthie <[email protected]>

* Bring back /private and turn it into a redirect

- Streamline/cleanup some article redirecting code

* Add fox emoji for GitLab repo links

---------

Co-authored-by: Andrew Duthie <[email protected]>
  • Loading branch information
zachmargolis and aduth authored May 3, 2024
1 parent 5e102ee commit 77038bc
Show file tree
Hide file tree
Showing 22 changed files with 91 additions and 664 deletions.
3 changes: 0 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@
"fragment": "Fragment",
"version": "16.2"
}
},
"rules": {
"react/jsx-uses-react": "error"
}
}
2 changes: 1 addition & 1 deletion _articles/cloud-gov-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ subcategory: Code
Login.gov uses [Cloud.gov Pages][cloud-gov-pages] as its hosting provider for our [static sites][static-sites]. By becoming a user of the Login.gov organization in Cloud.gov Pages, you'll have access to build logs and settings configuration for each of our sites. Organization access also allows you to log in on sites which use Netlify CMS ([including this handbook!][handbook-admin]).

[cloud-gov-pages]: https://cloud.gov/pages/
[static-sites]: {% link _articles/github.md %}#static-sites
[static-sites]: {% link _articles/github-gitlab.md %}#static-sites
[handbook-admin]: {{ site.baseurl }}/admin/

## Requesting Access to Cloud.gov Pages
Expand Down
18 changes: 12 additions & 6 deletions _articles/github.md → _articles/github-gitlab.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
title: GitHub
title: GitHub & GitLab
description: Team code repos, permissions, notification strategies
layout: article
category: Development
subcategory: Code
cspell: ignore omniauth
redirect_from: /articles/github.html
---

## Repositories

View a [list of all repositories](https://github.com/topics/login-gov) tagged for Login.gov
View a [list of all repositories](https://github.com/topics/login-gov) tagged for Login.gov.

Some repositories in GitHub are mirrored from our self-hosted GitLab.

### Applications

Expand Down Expand Up @@ -69,7 +72,7 @@ View a [list of all repositories](https://github.com/topics/login-gov) tagged fo

### Platform and Infrastructure

- [**`18f/identity-devops`**](https://github.com/18f/identity-devops)
- [**`lg/identity-devops`**](https://gitlab.login.gov/lg/identity-devops)
Platform CLI tools, Terraform for infrastructure as code (IaC), Chef for instance (server) provisioning, and so much more! (Too much more?)

- [**`18f/identity-devops-private`**](https://github.com/18f/identity-devops-private)
Expand Down Expand Up @@ -129,9 +132,12 @@ View a [list of all repositories](https://github.com/topics/login-gov) tagged fo
Hosted on: [Cloud.gov Pages](https://pages.cloud.gov/)<br />
This handbook!

- [**`18f/identity-handbook-private`**](https://github.com/18f/identity-handbook-private) <br />
[login-handbook.app.cloud.gov](https://login-handbook.app.cloud.gov/)<br />
Hosted on: [Cloud.gov](https://dashboard.fr.cloud.gov/)<br />
- [**`lg-public/identity-internal-handbook`**](https://gitlab.login.gov/lg-public/identity-internal-handbook/)<br />
[lg-public.pages.production.gitlab.login.gov/identity-internal-handbook/](https://lg-public.pages.production.gitlab.login.gov/identity-internal-handbook/)<br />
Hosted on: GitLab Pages (self-hosted)<br />
Internal version of this handbook (Private to Login.gov team only)

- [**`18f/identity-handbook-private`**](https://github.com/18f/identity-handbook-private){: .deprecated-link} (Archived)<br />
Old, private version of this handbook! (Private to Login.gov team only)

## Permissions
Expand Down
6 changes: 3 additions & 3 deletions _articles/pull-request-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for contributions from the Login.gov team (anybody in the
[external contributions](#external-contributions) for more information on
changes from outside.

[github-repositories]: {% link _articles/github.md %}#repositories
[github-repositories]: {% link _articles/github-gitlab.md %}#repositories

- **Who reviews**: at least one member of the engineering team must review and
approve a pull request before it can be merged.
Expand All @@ -37,7 +37,7 @@ changes from outside.
author is unavailable, it may be acceptable for another to merge on their
behalf.

[github-permissions]: {% link _articles/github.md %}#permissions
[github-permissions]: {% link _articles/github-gitlab.md %}#permissions

## External Contributions

Expand All @@ -59,4 +59,4 @@ minimize usages of it to absolutely critical changes needed.

The handbook's GitHub article includes information about other GitHub features, such as:

- [Running continuous integration outside of a pull request]({% link _articles/github.md %}#running-ci-outside-of-a-pull-request) or [sharing work with other engineers]({% link _articles/github.md %}#sharing-work-with-other-engineers)
- [Running continuous integration outside of a pull request]({% link _articles/github-gitlab.md %}#running-ci-outside-of-a-pull-request) or [sharing work with other engineers]({% link _articles/github-gitlab.md %}#sharing-work-with-other-engineers)
17 changes: 1 addition & 16 deletions _categories/private.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,5 @@ title: Private Articles
permalink: /private/
layout: article
icon: lock
redirect_to: https://lg-public.pages.production.gitlab.login.gov/identity-internal-handbook/
---
{% if site.env.BRANCH == 'main' %}
{% assign private_handbook_branch = site.env.PRIVATE_HANDBOOK_BRANCH %}
{% else %}
{% assign private_handbook_branch = site.env.PRIVATE_HANDBOOK_BRANCH_PREVIEW %}
{% endif %}
{% assign private_handbook_branch = private_handbook_branch | default: 'main' %}

<div id="private-container" data-private-handbook-branch="{{private_handbook_branch}}"></div>

<script type="module">
import {
setUpPrivatePage
} from '{{ "/assets/js/private-articles.js" | prepend: site.baseurl }}';

setUpPrivatePage();
</script>
12 changes: 8 additions & 4 deletions _includes/article_url.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{% comment %}
Includes:
- article: page to link to (or directly to its .redirect_to)
{% endcomment %}
{%- if include.article.redirect_to -%}
{%- if include.redirect_to contains '://' -%}
{{ article.redirect_to }}
{%- if include.article.redirect_to contains '://' -%}
{{ include.article.redirect_to }}
{%- else -%}
{{ article.redirect_to | prepend: site.baseurl }}
{{ include.article.redirect_to | prepend: site.baseurl }}
{%- endif -%}
{%- else -%}
{{ article.url | prepend: site.baseurl }}
{{ include.article.url | prepend: site.baseurl }}
{%- endif -%}
5 changes: 0 additions & 5 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
</div>
<div class="grid-container tablet:margin-0 tablet:padding-0">
<div class="flex-row flex-align-center grid-row grid-gap-1">
<ul class="usa-nav__secondary-links grid-col grid-col-auto margin-0">
<li class="usa-nav__secondary-item" id="private-login-button-container"></li>
</ul>
<form class="usa-search usa-search--small grid-col grid-col-fill" role="search">
<label class="usa-sr-only" for="search-input">Search articles</label>
<input class="usa-input width-auto" type="search" id="search-input" placeholder="Search articles...">
Expand Down Expand Up @@ -77,15 +74,13 @@ <h3 class="usa-footer__logo-heading">U.S. General Services Administration</h3>
loadAnchors,
loadPrivateEye,
loadSimpleJekyllSearch,
setUpPrivateLogin,
installCustomTimeElements
} from '{{ "/assets/js/setup.js" | prepend: site.baseurl }}';

document.addEventListener('DOMContentLoaded', () => {
loadAnchors();
loadPrivateEye();
loadSimpleJekyllSearch();
setUpPrivateLogin();
installCustomTimeElements();
}, false);
</script>
Expand Down
18 changes: 0 additions & 18 deletions assets/js/components/alert.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions assets/js/components/anchor-link.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions assets/js/components/heading.tsx

This file was deleted.

37 changes: 0 additions & 37 deletions assets/js/components/sidenav.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions assets/js/github-api.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions assets/js/hooks/jekyll.tsx

This file was deleted.

Loading

0 comments on commit 77038bc

Please sign in to comment.