Skip to content

Commit 8021e2b

Browse files
update sync workflow to avoid overwrites; add various cosmetic formatting fixes
1 parent a18a94f commit 8021e2b

20 files changed

Lines changed: 91 additions & 37 deletions

Makefile

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# ==============================================================================
22
# SUSTAINABILITY PLAYBOOK SITE SYNCHRONIZATION
33
# ==============================================================================
4-
# This Makefile automates the retrieval and processing of core styling,
4+
# This Makefile automates the retrieval and processing of core styling
55
# and branding assets from the ucospo.net repo, including images,
66
# footer.md, and custom.css. Just run this command:
77
# make sync
88
# any time you want to copy those assets to this repo!
9+
# This script will overwrite the existing images and footer.md file.
10+
# To avoid overwriting any custom CSS that is just for the playbook site,
11+
# this script concatenates the downloaded ucospo.net custom.css file to
12+
# our local playbook.css file.
913

1014
# .PHONY tells Make that sync is a command name, not a literal file on disk.
1115
.PHONY: sync
@@ -18,25 +22,33 @@ sync:
1822
@curl -s $(RAW_REPO)/footer.md > footer.tmp
1923

2024
@echo "Processing footer navigation links..."
21-
@# We ONLY transform text links now, leaving image paths as local relatives
25+
@# Rewrite paths to use absolute URLs
26+
@# Rewrite image paths to point to brand_assets folder
2227
@sed -e 's|(about/about.md)|($(PRODUCTION_DOMAIN)/about/)|g' \
2328
-e 's|(events/index.md)|($(PRODUCTION_DOMAIN)/events/)|g' \
2429
-e 's|(posts/index.md)|($(PRODUCTION_DOMAIN)/posts/)|g' \
2530
-e 's|(oss-resources/index.md)|($(PRODUCTION_DOMAIN)/oss-resources/)|g' \
2631
-e 's|(about/contact.md)|($(PRODUCTION_DOMAIN)/about/contact/)|g' \
32+
-e 's|static/images/|static/brand_assets/|g' \
2733
footer.tmp > footer.md
2834
@rm footer.tmp
2935

3036
@echo "Fetching custom CSS..."
3137
@mkdir -p static/css
32-
@curl -s $(RAW_REPO)/static/css/custom.css > static/css/custom.css
38+
@# Download the core file to a temporary name
39+
@curl -s $(RAW_REPO)/static/css/custom.css > static/css/core.tmp.css
40+
@echo "Merging core and local playbook styles..."
41+
@# Concatenate the downloaded core CSS with your local playbook CSS
42+
@cat static/css/playbook.css static/css/core.tmp.css > static/css/combined.css
43+
@# Clean up the temporary file
44+
@rm static/css/core.tmp.css
3345

3446
@echo "Fetching branding images locally..."
35-
@mkdir -p static/images/icons
36-
@curl -s $(RAW_REPO)/static/images/logo.svg > static/images/logo.svg
37-
@curl -s $(RAW_REPO)/static/images/uc-ospo-network-logo-light.svg > static/images/uc-ospo-network-logo-light.svg
38-
@curl -s $(RAW_REPO)/static/images/favicon.ico > static/images/favicon.ico
39-
@curl -s $(RAW_REPO)/static/images/icons/github.svg > static/images/icons/github.svg
40-
@curl -s $(RAW_REPO)/static/images/icons/slack.svg > static/images/icons/slack.svg
41-
@curl -s $(RAW_REPO)/static/images/icons/rss.svg > static/images/icons/rss.svg
47+
@mkdir -p static/brand_assets/icons
48+
@curl -s $(RAW_REPO)/static/images/logo.svg > static/brand_assets/logo.svg
49+
@curl -s $(RAW_REPO)/static/images/uc-ospo-network-logo-light.svg > static/brand_assets/uc-ospo-network-logo-light.svg
50+
@curl -s $(RAW_REPO)/static/images/favicon.ico > static/brand_assets/favicon.ico
51+
@curl -s $(RAW_REPO)/static/images/icons/github.svg > static/brand_assets/icons/github.svg
52+
@curl -s $(RAW_REPO)/static/images/icons/slack.svg > static/brand_assets/icons/slack.svg
53+
@curl -s $(RAW_REPO)/static/images/icons/rss.svg > static/brand_assets/icons/rss.svg
4254
@echo "✓ Assets synced!"

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
# playbook
2-
The Sustainability Playbook describes a holistic approach to project sustainability for open source creators at UC.
1+
# Sustainability playbook
2+
3+
This repository contains the nascent UC OSPO Sustainability Playbook website. It is a MyST Markdown site that acts as a standalone subproject linked to the core UC OSPO Network website.
4+
5+
To ensure that this subproject's branding, layout, and global navigation match the core site, we use a custom `Makefile` to synchronize certain assets periodically.
6+
7+
---
8+
9+
## 🛠️ Syncing with ucospo.net
10+
11+
Any time the core branding images, custom css, or footer.md file changes on [ucospo.net](https://github.com/UC-OSPO-Network/ucospo.net), this playbook repository should be manually "synced" to pull down a copy of all those assets. This should be a very infrequent occurrence.
12+
13+
Run `make sync` to download the global footer, core CSS, and brand images (logos, favicons) from the ucospo.net repository. The Makefile uses sed to edit the paths in footer.md to be relative to this repo instead of the ucospo.net repo.
14+
15+
---
16+
17+
## 📂 Project structure
18+
19+
Because we periodically sync files from an external repository, local assets must be placed in the correct folders so they aren't overwritten or deleted during a `make sync`.
20+
21+
```text
22+
playbook/
23+
├── Makefile # Asset sync automation
24+
├── myst.yml # MyST site configuration
25+
├── images/ # 🟢 PUT PLAYBOOK-SPECIFIC IMAGES HERE
26+
├── static/
27+
│ ├── css/
28+
│ │ ├── playbook.css # 🟢 PUT PLAYBOOK-SPECIFIC CSS HERE
29+
│ │ └── combined.css # 🔴 Auto-generated (Do not edit)
30+
│ └── brand_assets/ # 🔴 Auto-generated (Do not edit)
31+
└── footer.md # 🔴 Auto-generated (Do not edit)
32+
```

facet2/sharedres_feeforserv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Shared resources and academic fee-for-service
1+
# Institutional funding

footer.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Site footer — referenced from myst.yml site.parts.footer
1+
% Site footer — referenced from site.yml
22

33
:::::{div}
44
:class: uco-footer col-screen
@@ -9,12 +9,12 @@
99
:::{div}
1010
:class: uco-footer-brand
1111

12-
```{image} static/images/uc-ospo-network-logo.svg
12+
```{image} static/brand_assets/uc-ospo-network-logo.svg
1313
:alt: UC OSPO Network
1414
:class: uco-logo-dark
1515
```
1616

17-
```{image} static/images/uc-ospo-network-logo-light.svg
17+
```{image} static/brand_assets/uc-ospo-network-logo-light.svg
1818
:alt: UC OSPO Network
1919
:class: uco-logo-light
2020
```
@@ -32,9 +32,9 @@
3232

3333
:::{div}
3434
:class: uco-footer-social
35-
[![GitHub](static/images/icons/github.svg)](https://github.com/UC-OSPO-Network/)
36-
[![Slack](static/images/icons/slack.svg)](https://join.slack.com/t/uc-ospo-network/shared_invite/zt-3ecp5b20z-ECL~4DkCUslB0t3mbH9xUg)
37-
[![RSS](static/images/icons/rss.svg)](/atom.xml)
35+
[![GitHub](static/brand_assets/icons/github.svg)](https://github.com/UC-OSPO-Network/)
36+
[![Slack](static/brand_assets/icons/slack.svg)](https://join.slack.com/t/uc-ospo-network/shared_invite/zt-3ecp5b20z-ECL~4DkCUslB0t3mbH9xUg)
37+
[![RSS](static/brand_assets/icons/rss.svg)](/atom.xml)
3838
:::
3939

4040
::::

images/facets.png

88.6 KB
Loading

images/susPB_logo.png

47.8 KB
Loading

index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# UC OSPO Network Sustainability Playbook DEMO SITE
22

3+
<img src="images/susPB_logo.png" width="600" height="auto">
4+
35
Welcome to the demo website for the Sustainability Playbook. We're sharing this site with collaborators and potential collaborators to demonstrate our vision for the look, feel, and tone of the book.
46

57
All pages except the introduction are placeholders for now. We'll fill them in as soon as we can!
68

79
Let us know what you think! [Leave an issue](https://github.com/UC-OSPO-Network/playbook) or email us at ospo@library.ucsb.edu.
810

9-
<img src="static/images/susPB_logo_small.png" width="600" height="auto">

introduction.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Introduction
22

3-
Open source software (OSS) is ubiquitous in academia, just as it is ubiquitous in every layer of our digital lives. It's been [estimated](https://todogroup.org/blog/state-of-ospo-2024/) that 94% of companies use open source software, all major programming languages are available in open source implementations, and as you read this document right now, you're using OSS, too. The remarkable success of OSS, however, belies a crisis under the surface. A large proportion of open source maintainers are overworked, underpaid, and [battling burnout](https://www.sonarsource.com/the-2024-tidelift-maintainer-impact-report.pdf), even those who are maintaining projects with enormous utility. Academic open source maintainers are no exception--surveys show that the majority of research software contributors lack sufficient funding to support software development activities for their research ([Carver et al. 2022](https://peerj.com/articles/cs-963/)), and that they believe the most useful support a university could provide for their software development work would be grants for sustainability ([Scarlett et al. 2026](https://osf.io/preprints/socarxiv/p8bx6_v1)). Addressing this crisis on a global scale will take time, but there are things that you can do now to strengthen your project's financial and social future.
3+
Open source software (OSS) is ubiquitous in academia, just as it is ubiquitous in every layer of our digital lives. It's been [estimated](https://todogroup.org/blog/state-of-ospo-2024/) that 94% of companies use open source software, all major programming languages are available in open source implementations, and as you read this document right now, you're using OSS, too. The remarkable success of OSS, however, belies a crisis under the surface. A large proportion of open source maintainers are overworked, underpaid, and [battling burnout](https://www.sonarsource.com/the-2024-tidelift-maintainer-impact-report.pdf), even those who are maintaining projects with great utility. Academic open source maintainers are no exception--surveys show that the majority of research software contributors lack sufficient funding to support software development activities for their research ([Carver et al. 2022](https://doi.org/10.7717/peerj-cs.963)), and that they believe the most useful support a university could provide for their software development work would be grants for sustainability ([Scarlett et al. 2026](https://doi.org/10.1371/journal/pone.0348894)). Addressing this crisis on a global scale will take time, but there are things that you can do now to strengthen your project's financial and social future.
44

55
This playbook is for contributors, creators, and maintainers of academic open source software (OSS) at the University of California. We’ll discuss the strategies that UC OSS projects have used to sustain success, ways that UC was a partner on the journey, and some ways in which UC is still catching up to the fast-moving world of OSS. Hardware creators will also find useful content here, though the focus is on software (hardware creators may want to also check out [https://ouch-advice.github.io/](https://ouch-advice.github.io/)). Whether you're a faculty member, staff, or student, if you’re interested in how open source projects do more with less, this playbook is for you.
66

77
Various definitions of open source sustainability have been proposed (e.g. [OSAOS](https://osaos-book.codeforscience.org/), [Daniel Katz](https://danielskatzblog.wordpress.com/2018/09/26/fundamentals-of-software-sustainability/), [SustainOSS](https://sustainoss.org/about/)), but the gist of them is this: a sustainable project is a living thing, adaptable, persistent, and resilient to challenge or uncertainty. As technology and user needs evolve, a sustainable project resists obsolescence, and either stays relevant or grows increasingly useful to a community of users and contributors. This playbook is designed to help you cultivate a sustainability mindset–keeping an eye out for opportunities, and making time for activities with long-term payoffs.
88

99
> A sustainable project is a living thing, adaptable, persistent, and resilient to challenge or uncertainty.
1010
11-
Many academics may understandably feel that sustainability means funding. However, plenty of well-funded projects have fizzled out, and plenty of scrappy projects have achieved remarkable success. The magic of open source is that it’s often powered by people who are motivated by more than money, so in OSS, as the saying goes, money isn’t everything. We offer a holistic approach to sustainability, inspired by the four facets presented in the [It Takes a Village Guidebook by Lyrasis](https://itav.lyrasis.org/guidebook/):
11+
Many academics may understandably feel that sustainability means funding. However, plenty of well-funded projects have fizzled out, and plenty of scrappy projects have achieved remarkable success. In OSS, as the saying goes, money isn’t everything. We offer a holistic approach to sustainability, inspired by the four facets presented in the [It Takes a Village Guidebook by Lyrasis](https://itav.lyrasis.org/guidebook/):
1212
* **Discoverability:** Provide records that will make your software easier to find and use.
13-
* **Funding:** Consider five topics relevant to funding open source: sponsored projects; gifts; non-profits and fiscal sponsorship; entrepreneurship; and shared resources and academic fee-for-service.
13+
* **Funding:** Consider five mechanisms for funding for academic open source: sponsored projects; gifts; non-profits and fiscal sponsorship; entrepreneurship; and institutional funding.
1414
* **Community:** Build a welcoming community to fuel innovation, recognition, and trust.
1515
* **Product design:** Encourage community contributions by building a codebase that is designed to be modified.
1616

17-
```{image} static/images/facets.png
17+
```{image} images/facets.png
1818
:alt: A diagram showing the four facets of sustainability with decorative pictures above each
1919
:align: center
2020
```
@@ -32,24 +32,29 @@ The content provided in this playbook is for informational and educational purpo
3232
The descriptions of university offices (such as Sponsored Projects, Strategic Research Initiatives, etc.) and their workflows are based on the authors’ research and understanding. This content has not been officially reviewed, approved, or endorsed by the specific offices mentioned. University policies and procedures are subject to change; researchers should always consult directly with the relevant administrative offices for the most current guidance and to ensure compliance with university and funder requirements.
3333

3434
## Related resources
35-
```{image} static/images/ospo_link.png
36-
:width: 100px
37-
:alt: UC OSPO Network logo next to a hyperlink symbol
38-
:align: left
35+
::::{grid} 12 12 12 12
36+
:::{grid-item}
37+
:columns: 2
38+
```{image} images/ospo_link.png
39+
:width: 80%
3940
```
41+
:::
42+
:::{grid-item}
43+
:columns: 10
4044
Looking for more resources similar to this playbook? Check out these related works.
41-
45+
:::
46+
::::
4247

4348
* [Open UC Hardware Advice](https://ouch-advice.github.io/)
4449
* A collection of resources on Open Source Hardware in research, teaching, and practice, from the perspective of UC experts; includes talks, interviews, and reusable materials for open source hardware projects.
4550
* [The Turing Way](https://book.the-turing-way.org/)
4651
* An open-source, community-driven handbook on how to make data science reproducible, ethical, collaborative, and accessible for everyone.
4752
* [GitHub open source guides](https://opensource.guide/)
48-
* The Open Source Guides constitute a handbook on growing and sustaining open source software projects. They were created and are curated by GitHub, along with input from community reviewers.
49-
* [It Takes a Village from Lyrasis](https://itav.lyrasis.org/)
50-
* A practical guide for OSS sustainability, rich with case studies and interviews, geared toward open-source software projects serving cultural and scientific heritage organizations.
53+
* A handbook on growing and sustaining open source software projects. Created and curated by GitHub, along with input from community reviewers.
5154
* [CHAOSS practitioner guides](https://chaoss.community/about-chaoss-practitioner-guides/)
5255
* CHAOSS (Community Health Analytics in Open Source Software)’s Practitioner Guides contain advice for maintainers and practitioners about assessing and strengthening open source project health.
56+
* [It Takes a Village from Lyrasis](https://itav.lyrasis.org/)
57+
* A practical guide for OSS sustainability, rich with case studies and interviews, geared toward open-source software projects serving cultural and scientific heritage organizations.
5358
* [OSAOS Handbook](https://osaos.codeforscience.org/)
5459
* A handbook with reflections from open source leaders, created during a hackathon in 2018.
5560

myst.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ site:
4141
options:
4242
logo_text: "UC OSPO Network"
4343
folders: true
44-
logo: static/images/logo.svg # <-- generated by Makefile
45-
favicon: static/images/favicon.ico # <-- generated by Makefile
46-
style: static/css/custom.css # <-- generated by Makefile
44+
logo: static/brand_assets/logo.svg # <-- generated by Makefile
45+
favicon: static/brand_assets/favicon.ico # <-- generated by Makefile
46+
style: static/css/combined.css # <-- generated by Makefile
4747
backmatter:
4848
references: false # remove auto-generated references section at bottom of each page
4949
parts:

0 commit comments

Comments
 (0)