-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_quarto.yml
More file actions
executable file
·216 lines (196 loc) · 7.74 KB
/
_quarto.yml
File metadata and controls
executable file
·216 lines (196 loc) · 7.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
project:
type: website
resources:
- password-protect.html
- auth-check.js
website:
page-navigation: true
back-to-top-navigation: true
title: "NASA Disasters Documentation"
site-url: "https://us-ghg-center.github.io/ghgc-docs" #should I change these
repo-url: https://github.com/us-ghg-center/ghgc-docs
repo-actions: [edit, issue]
page-footer:
right: "This page is built with [Quarto](https://quarto.org/)."
left: "© CC-By US GHG Center, 2022-2023" #how should I change this
sidebar:
logo: "logo/disasters_logo.png"
pinned: true
align: center
tools:
# - icon: info-circle
# href: https://www.earthdata.nasa.gov/esds/veda
# text: "earthdata.nasa.gov/esds/veda"
- icon: globe-americas
href: https://disasters.openveda.cloud/
text: "NASA Disasters Portal"
- icon: github
href: https://github.com/Disasters-Learning-Portal
text: "Repository home"
style: "docked"
search: true
collapse-level: 1
contents:
- href: index.qmd
text: Welcome
- section: aws.qmd
text: AWS
contents:
- AWS/AWS_SSO_Setup_Guide.qmd
- AWS/AWS_SSO_Remote_Server.qmd
- AWS/aws-mfa-setup.qmd
- AWS/aws-s3-commands-guide.qmd
- section: git-github-comprehensive-guide.qmd
text: GitHub
contents:
- text: "The VEDA Project"
href: GitHub/veda-preview.qmd
- GitHub/setup.qmd
- GitHub/commands.qmd
- GitHub/resources.qmd
- section: jupyterhub.qmd
text: JupyterHub
contents:
- Jupyterhub/jupyterhub-training-guide.qmd
- Jupyterhub/loading-disaster-hub-image.qmd
- Jupyterhub/clone_conversion_repo.ipynb
- Jupyterhub/sentinel2_workflow-testUpdates.ipynb
- Jupyterhub/CSDA-demo.ipynb
- text: "GeoTIFF Event Processor"
href: Jupyterhub/extract_eventname_metadata.ipynb
- section: workflow.qmd
text: Data Workflow Diagrams
contents:
- data_workflow2/NRT_data_download.qmd
- data_workflow2/NRT_directory_structure.qmd
- section: contentcuration.qmd
text: Content Curation
contents:
- section: datasetingestion.qmd
text: Dataset Ingestion
contents:
- text: Boilerplate Ingest Example
href: DataIngestion/stac-collection.ipynb
- section: Documentation
contents:
- text: "Quarto Guide for Beginners"
href: quarto-guide.qmd
- section: User Services
contents:
- services/apis.qmd
- services/jupyterhub.qmd
- section: Presentations
contents:
- section: PowerPoints
contents:
- text: "Disasters Logo and Template Overview"
href: Presentations/disasters-powerpoint-template.qmd
- text: "AWS and Grafana Monitoring Tutorial"
href: Presentations/aws-grafana-tutorial.qmd
- text: "AWS Cost Management"
href: Presentations/aws-cost-management.qmd
- text: "JupyterHub and Data Conversions Tutorial"
href: Presentations/jupyterhub-data-conversions-tutorial.qmd
- text: "STAC Database and Apache Airflow Tutorial"
href: Presentations/stac-airflow-tutorial.qmd
- section: datausage.qmd
text: Disaster Case Studies
contents:
- text: "Texas Flood 2025"
href: user_data_notebooks/Texas_Flood_2025.ipynb
- text: "New Mexico Fire 2025"
href: user_data_notebooks/New_Mexico_Fire_2025.ipynb
format:
html:
grid:
sidebar-width: 25vw
body-width: 900px
theme:
light: [flatly]
dark: [darkly]
css: styles.css
code-copy: true
code-overflow: wrap
toc: true
toc-depth: 3
include-in-header:
- text: |
<script>
// Authentication check for all pages - inlined to ensure it's always present
(function() {
const SESSION_KEY = 'disasters_docs_auth';
// Get the base path for the current page
function getBasePath() {
let path = window.location.pathname;
// If path ends with / or is a directory, it's already the base
if (path.endsWith('/')) {
return path;
}
// If path ends with .html, get the directory
if (path.endsWith('.html')) {
const lastSlash = path.lastIndexOf('/');
return path.substring(0, lastSlash + 1);
}
// Otherwise, assume it's a directory and add trailing slash
return path + '/';
}
function getLoginPage() {
const basePath = getBasePath();
return basePath + 'password-protect.html';
}
function checkAuth() {
// Skip authentication on localhost (for development)
if (window.location.hostname === 'localhost' ||
window.location.hostname === '127.0.0.1') {
console.log('Running on localhost - skipping authentication');
return;
}
// Skip check if we're on the login page
if (window.location.pathname.endsWith('password-protect.html') ||
window.location.pathname.endsWith('login.html')) {
return;
}
const auth = localStorage.getItem(SESSION_KEY);
if (!auth) {
// No authentication, redirect to login
window.location.href = getLoginPage();
return;
}
try {
const authData = JSON.parse(auth);
const now = new Date().getTime();
if (authData.expires <= now || !authData.authenticated) {
// Expired or invalid session
localStorage.removeItem(SESSION_KEY);
window.location.href = getLoginPage();
return;
}
// Valid session - allow page to load
} catch (e) {
// Invalid auth data
localStorage.removeItem(SESSION_KEY);
window.location.href = getLoginPage();
}
}
// Run check immediately
checkAuth();
// Add logout functionality
window.addEventListener('DOMContentLoaded', function() {
// Add logout button to page if it doesn't exist
const existingLogout = document.getElementById('logout-btn');
if (!existingLogout) {
const logoutBtn = document.createElement('button');
logoutBtn.id = 'logout-btn';
logoutBtn.textContent = 'Logout';
logoutBtn.style.cssText = 'position: fixed; top: 10px; right: 10px; padding: 8px 16px; background: #e74c3c; color: white; border: none; border-radius: 5px; cursor: pointer; z-index: 9999; font-size: 14px;';
logoutBtn.onclick = function() {
localStorage.removeItem(SESSION_KEY);
window.location.href = getLoginPage();
};
document.body.appendChild(logoutBtn);
}
});
})();
</script>
filters:
- quarto