FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Convert to MySTMD by lundybernard · Pull Request #315 · scientific-python/learn.scientific-python.org · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .css  (2) .ico  (1) .md  (26) .py  (1) .svg  (1) .toml  (1) .yaml  (1) .yml  (3) No extension  (2) dotfile  (2) All 10 file types selected
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.hugo*
*~
resources/
public/
_build/
content/_build/
.DS_Store
3 changes: 0 additions & 3 deletions .gitmodules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "themes/scientific-python-hugo-theme"]
path = themes/scientific-python-hugo-theme
url = https://github.com/scientific-python/scientific-python-hugo-theme
[submodule "external-content/cookie"]
path = external-content/cookie
url = https://github.com/scientific-python/cookie
22 changes: 14 additions & 8 deletions Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help prepare cookie external html serve clean
.PHONY: help prepare cookie external html serve build-serve clean
.DEFAULT_GOAL := help

# Add help text after each target name starting with '\#\#'
Expand All @@ -18,17 +18,23 @@ cookie:

external: cookie

html: ## Build learn site (without external content) in `./public`
html: ## Build learn site in `./content/_build/html`
html: prepare
hugo
(cd content && myst build --html)

html-all: ## Buildlearn site (with external content) in `./public`
html-all: html external
html-all: ## Build learn site with external content in `./public`
html-all: html
mkdir -p public && cp -r content/_build/html/. public/
$(MAKE) external

serve: ## Serve site, typically on http://localhost:1313
serve: ## Serve site, typically on http://localhost:3000
serve: prepare
@hugo --printI18nWarnings server
(cd content && myst start)

build-serve: ## Build full site (learn + cookie) and serve `./public` at http://localhost:3000
build-serve: html-all
python3 scripts/serve.py 3000 public

clean: ## Remove built files
clean:
rm -rf public
rm -rf content/_build public
42 changes: 42 additions & 0 deletions README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# learn.scientific-python.org

Source for [learn.scientific-python.org](https://learn.scientific-python.org),
built with [MyST-MD](https://mystmd.org/) (the `mystmd` CLI).

## Layout

- `content/` — the MyST source project (`myst.yml` lives here). This is the
main site.
- `external-content/cookie/` — the [cookie](https://github.com/scientific-python/cookie)
submodule, a separate MyST site. Its build is overlaid at `/development/`.
- `public/` — build output. The merged, deployable static site (main +
cookie). Written by `make html-all`; published by Netlify.

## Prerequisites

- **mystmd** — the `myst` CLI. See the
[MyST install guide](https://mystmd.org/guide/quickstart).
- **Node** — the cookie overlay builds via `npx mystmd`, so a full build needs
Node available.
- **git** — the cookie content is a submodule; `make prepare` initializes it.

## Local development

| Command | What it does |
| ------------------ | ----------------------------------------------------------------------- |
| `make serve` | Live-reload dev server for the **main site only**, at `localhost:3000`. |
| `make html` | Build the main site to `content/_build/html/`. |
| `make html-all` | Build main + cookie, merged into `public/`. |
| `make build-serve` | Run `html-all`, then serve the full merged site at `localhost:3000`. |
| `make clean` | Remove build output (`content/_build`, `public/`). |

**Previewing `/development/` (cookie) locally:** `make serve` (and `myst start`)
serve `content/` only — the cookie overlay is **not** visible there. To preview
the full site, including `/development/`, use `make build-serve`. It is a static
build (no live reload); rerun it after edits.

## Decisions

Architecture decisions are recorded in
[`docs/decisions/`](docs/decisions/). See
[`0001-myst-migration/`](docs/decisions/0001-myst-migration/) for the
Hugo → MyST migration.
3 changes: 0 additions & 3 deletions assets/css/custom.css

This file was deleted.

70 changes: 0 additions & 70 deletions config.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions content/.copier-answers.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: e390239
_src_path: gh:scientific-python/scientific-python-myst-theme
favicon: https://raw.githubusercontent.com/scientific-python/scientific-python.org/main/static/favicon.ico
project_name: Learn Scientific Python
project_url: learn.scientific-python.org
104 changes: 104 additions & 0 deletions content/assets/css/scientific-python.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}

main {
min-height: 0;
flex: 1 0 auto;
}

.article.content {
/* Override 100vh from myst-theme:styles/typography.css so content div
* doesn't grow <main> to push the footer offscreen.
*/
min-height: 0;
}

.footer {
/* Make footer "sticky" to page bottom (also the above flex rules), per
* the flexbox strategy described here:
* https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox
* and here:
* https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
* This solution does not require hardcoding a fixed footer height in the
* style rules.
*/
flex-shrink: 0;
background: #013243;
color: white;
padding-left: 2rem;
padding-right: 2rem;

padding-left: 3.5rem;
padding-right: 3.5rem;

/* Outer content grid */
& .outer-grid {
/* spacer, project description, spacer, link columns, spacer */
grid-template-columns: 3fr 3fr 4fr;
align-items: center;
margin-bottom: 0rem;

& li {
list-style: none;
}
}

@media (max-width: 640px) {
& .outer-grid {
grid-template-columns: 1fr;
justify-items: start;
}
}

/* Heading colours */
& a,
h1,
h2,
h3,
h4,
h5,
h6 {
color: white;
}

& h1 {
font-size: 1.25rem;
font-weight: bold;
}
}

/* Hide download button */
.myst-fm-downloads-button {
display: none;
}

/* Set site title bold */
.myst-home-link {
font-weight: bold;
}

/* Unsure where this CSS came from, but keeping it for now */
/* --- Make layout feel less "book-ish" and closer to a website --- */
.bd-main .bd-content .bd-article-container {
max-width: 900px; /* keep readable, less wide than default "docs" feel */
}

h1,
h2,
h3,
h4 {
letter-spacing: -0.01em;
}

/* Slightly tighten the top spacing so it feels more like a marketing/docs site */
.bd-header {
box-shadow: none;
}

/* If the left sidebar feels too dominant, reduce its visual weight */
.bd-sidebar-primary {
border-right: 0;
}
Binary file added content/assets/images/favicon.ico
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: "Community Guide"
shortcutDepth: 2
---

Welcome to the Community Managers Guide! Here you will find useful resources that will help you foster your community better.
Expand Down
4 changes: 2 additions & 2 deletions content/community/onboarding.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: "Onboarding"
---

{{< admonition warning >}}
:::{warning}
This is a draft document.
{{< /admonition >}}
:::

- Organizing sprints
- Organising sprints are an excellent way to invite new collaborators, solve issues, gather contributions and broaden the project community. Some helpful tips for organising a sprint efficiently:
Expand Down
13 changes: 13 additions & 0 deletions content/config/scientific-python.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 1

site:
template: book-theme
parts:
primary_sidebar_footer: sidebar-footer.md
footer: footer.md
options:
style: assets/css/scientific-python.css
hide_toc: true
hide_footer_links: true
folders: true
hide_myst_branding: true
66 changes: 0 additions & 66 deletions content/contributors/_index.md

This file was deleted.

Loading

Back | FazBrowse Home | New Git URL