Skip to content

Commit e554017

Browse files
committed
create id urls
1 parent 7f3ec4d commit e554017

287 files changed

Lines changed: 1438 additions & 30 deletions

File tree

Some content is hidden

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

_pdf/p_23e8f5_.pdf

1.52 MB
Binary file not shown.

_pdf/p_38bf88_.pdf

2.46 MB
Binary file not shown.

_pdf/p_d7251a_.pdf

51.6 MB
Binary file not shown.

_pdf/p_e0112f_.pdf

2.03 MB
Binary file not shown.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Adding a New Page to openDANES
2+
3+
## 1. Ensure yaml validity
4+
5+
the template yaml is:
6+
7+
```yaml
8+
---
9+
layout: default+toc # use default-main for pages without a TOC
10+
type: tutorial # or: white-paper
11+
permalink: # leave blank — filled in by generate-slugs (step 3)
12+
title: Your Page Title
13+
banner-image-source: null # URL for the banner image credit link, or null
14+
authors:
15+
author1:
16+
name: Author Name
17+
affiliation: Institution
18+
email: email@example.com
19+
orcid: 0000-0000-0000-0000 # or null
20+
academia: null
21+
github: null
22+
tags:
23+
- tag1
24+
- tag2
25+
summary: One or two sentence summary of the page.
26+
difficulty: beginner # beginner | intermediate | advanced | null
27+
submit-date: YYYY-MM-DD
28+
publish-date: null
29+
peer-review-date: null
30+
update-date: null
31+
reviewers: null
32+
doi: null
33+
---
34+
```
35+
36+
## 2. Assign a short permalink
37+
38+
Run the slug generator to assign a stable 6-character short URL (`/p/XXXXXX/`) to the new page and update all related files:
39+
40+
```bash
41+
npm run slugs:apply
42+
```
43+
44+
This will:
45+
- Add `permalink: /p/XXXXXX/` to the new page's front matter
46+
- Update `assets/docs/page-slugs.json` with the new entry
47+
- Update `assets/js/generate-pdf.js` so the page is included in PDF generation
48+
49+
> **Stable IDs**: The slug is derived from the page title via SHA-256, so running the script again always produces the same ID. Keep the title consistent once published.
50+
51+
## 3. Build the site locally
52+
53+
```bash
54+
npm run build
55+
# then serve:
56+
bundle exec jekyll serve --skip-initial-build
57+
```
58+
59+
Visit `http://localhost:4000/p/XXXXXX/` to preview.
60+
61+
## 4. Generate a PDF (optional)
62+
63+
```bash
64+
npm run pdf -- /p/XXXXXX/
65+
```
66+
67+
PDFs are saved to `_pdf/`.
68+
69+
## Quick reference
70+
71+
| Command | What it does |
72+
|---|---|
73+
| `npm run build` | Jekyll build + Pagefind index |
74+
| `npm run serve` | Full build then serve locally |
75+
| `npm run slugs:apply` | Assign/update permalinks for all pages |
76+
| `npm run pdf:pages` | Generate PDFs for all tutorials/white-papers |
77+
| `npm run pdf -- /p/XXXX/` | Generate PDF for a single page |

_site/assets/docs/page-slugs.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"e0112f": {
3+
"title": "Digital Ancient Near Eastern Studies - A Transition to Arts and Crafts",
4+
"file": "pages/Digital Ancient Near Eastern Studies - A Transition to Arts and Crafts.md",
5+
"permalink": "/p/e0112f/",
6+
"oldUrl": "/pages/Digital%20Ancient%20Near%20Eastern%20Studies%20-%20A%20Transition%20to%20Arts%20and%20Crafts.html"
7+
},
8+
"23e8f5": {
9+
"title": "How to Annotate Cuneiform Texts",
10+
"file": "pages/How to Annotate Cuneiform Texts.md",
11+
"permalink": "/p/23e8f5/",
12+
"oldUrl": "/pages/How%20to%20Annotate%20Cuneiform%20Texts.html"
13+
},
14+
"d7251a": {
15+
"title": "Assembling Photographed Views of Cuneiform Tablets with Photoshop",
16+
"file": "pages/Assembling Photographed Views of Cuneiform Tablets with Photoshop.md",
17+
"permalink": "/p/d7251a/",
18+
"oldUrl": "/pages/Assembling%20Photographed%20Views%20of%20Cuneiform%20Tablets%20with%20Photoshop.html"
19+
},
20+
"38bf88": {
21+
"title": "Musical Instruments in Ancient Mesopotamia (MIAM) A Semantic Media Wiki Database and Lexicon",
22+
"file": "pages/Musical Instruments in Ancient Mesopotamia (MIAM) A Semantic Media Wiki Database and Lexicon.md",
23+
"permalink": "/p/38bf88/",
24+
"oldUrl": "/pages/Musical%20Instruments%20in%20Ancient%20Mesopotamia%20(MIAM)%20A%20Semantic%20Media%20Wiki%20Database%20and%20Lexicon.html"
25+
}
26+
}

0 commit comments

Comments
 (0)