diff --git a/content/home.md b/content/home.md new file mode 100644 index 0000000..40d7647 --- /dev/null +++ b/content/home.md @@ -0,0 +1,46 @@ +--- +title: Welcome to pyOpenSci +subtitle: We make it easier for researchers to create, find, maintain and contributors to reusable code and software. +callout: "A mission statement might go text here" +hero_image: images/headers/pyopensci-sprints.png +buttons: + - label: "Submit a Package For Review" + url: "https://www.pyopensci.org/how-to-submit-a-package-to-pyopensci.html" + - label: "Learn to Create a Python Package" + url: "https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html" +feature_cards: + - image_path: images/landing-pages/software-peer-review.png + alt: "Light purple image that says software Peer Review..." + title: "We Run Software Peer Review" + excerpt: "We review Python packages and software with the goal of helping scientists build better, discoverable and usable software.

+ + Your package can also be published in JOSS through our review process.
+ + Submit a package today for review today.
+ Apply to become a reviewer.
+ " + - image_path: images/landing-pages/community-partnerships.png + alt: "Light purple image with a bunch from different backgrounds..." + title: "We Build Community Partnerships" + excerpt: "We [partner with open source communities](...)...
..." + - image_path: images/landing-pages/simple-python-packaging-header.png + title: "We Break Down Python Packaging Painpoints" + alt: "Light purple image that says python packaging guide..." + excerpt: "Check out our beginner-friendly...
..." +--- + +This is your new homepage, written in Markdown. + + + +
+ Did you know? + You can use custom HTML and classes in your Markdown! +
+ +
+ Did you know?
+ You can use custom HTML and Tailwind classes in your Markdown! +
+ +hi \ No newline at end of file diff --git a/core/urls.py b/core/urls.py index 240486c..49b2f33 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,10 +1,12 @@ from django.urls import path from . import views +from core.views import home_markdown + app_name = 'core' urlpatterns = [ - path('', views.home, name='home'), + path('', home_markdown, name='home'), path('blog/', views.blog_index, name='blog_index'), path('events/', views.events_index, name='events_index'), path('blog//', views.serve_blog_page, name='blog_page'), diff --git a/core/views.py b/core/views.py index ea04339..da9789b 100644 --- a/core/views.py +++ b/core/views.py @@ -1,5 +1,10 @@ +import os from django.shortcuts import render, get_object_or_404 +from django.conf import settings + import logging +import markdown +import frontmatter from .utils import ( get_recent_contributors, @@ -12,6 +17,17 @@ logger = logging.getLogger(__name__) +def home_markdown(request): + md_path = os.path.join(settings.BASE_DIR, 'content', 'home.md') + with open(md_path, 'r') as f: + post = frontmatter.load(f) + html_content = markdown.markdown(post.content) + context = { + 'markdown_content': html_content, + 'meta': post.metadata, + } + return render(request, 'core/home.html', context) + def home(request): """ Homepage view for PyOpenSci. diff --git a/publications/migrations/0003_remove_eventindexpage_page_ptr_delete_blogindexpage_and_more.py b/publications/migrations/0003_remove_eventindexpage_page_ptr_delete_blogindexpage_and_more.py new file mode 100644 index 0000000..1c116d9 --- /dev/null +++ b/publications/migrations/0003_remove_eventindexpage_page_ptr_delete_blogindexpage_and_more.py @@ -0,0 +1,22 @@ +# Generated by Django 5.2.4 on 2025-09-24 23:01 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("publications", "0002_blogindexpage_eventindexpage"), + ] + + operations = [ + migrations.RemoveField( + model_name="eventindexpage", + name="page_ptr", + ), + migrations.DeleteModel( + name="BlogIndexPage", + ), + migrations.DeleteModel( + name="EventIndexPage", + ), + ] diff --git a/templates/core/home.html b/templates/core/home.html index 6fb5221..bfd7c3a 100644 --- a/templates/core/home.html +++ b/templates/core/home.html @@ -1,293 +1,26 @@ -{% extends 'base.html' %} -{% load static %} -{% load image_tags %} - -{% block title %}{{ page_title }} - PyOpenSci{% endblock %} - -{% block content %} - -
-
-
-

Welcome to pyOpenSci

-

{{ hero_title }}

- -
-
-
- - -
-
-

{{ hero_subtitle }}

-
-
- - -
-
-

- Peer review of Python software to support open science -

- -
- -
-
- {% card_image "landing-pages/software-peer-review" "Light purple image showing software peer review with a woman at a laptop with a pyOpenSci logo" %} -
-
-

We Run Software Peer Review

-

We review Python packages and software with the goal of helping scientists build better, discoverable and usable software.

-

Your package can also be published in JOSS through our review process.

-
    -
  • Submit a package for review
  • -
  • Apply to become a reviewer
  • -
-
-
- - -
-
- {% card_image "landing-pages/community-partnerships" "Light purple image with diverse stick figure people representing community partnerships" %} -
-
-

We Build Community Partnerships

-

We partner with open source communities to share resources and processes such as Peer review.

-

Learn more about our partnerships with:

-
    -
  • JOSS
  • -
  • Astropy
  • -
-
-
- - -
-
- {% card_image "landing-pages/simple-python-packaging-header" "Light purple image showing python packaging guide with a laptop and hands" %} -
-
-

We Break Down Python Packaging Painpoints

-

Check out our beginner-friendly resources:

-
    -
  • Python Package Tutorials
  • -
  • Python package guide
  • -
-

All of our resources are co-developed with the broader Python community and reviewed by beginner to expert Pythonistas to ensure the material is accessible for all.

-
-
-
-
-
- - -
-
-

- Broadening participation in scientific open source -

- -
-
-
- {% responsive_image "pyopensci-sprint-pycon-2023" "Image showing 3 people working at 2 computers during a sprint at PyCon USA 2023" "w-full h-full object-cover rounded-lg" %} -
-
-
-

You don't need to be an expert to get involved

-

Are you new to software peer review but you want to get involved? We've got you!

-

We offer support and mentorship to new reviewers completing their first review.

-

All reviewers don't need to be python package experts. We welcome reviewers that focus on software accessibility and usability.

-

Are you new to peer review? We offer a mentorship program for anyone interested in participating in peer review but who might like a bit of support.

-
-
-
-
- - -
-
-

New pyOpenSci contributors

- -
- {% for contributor in recent_contributors %} -
- {% if contributor.github_avatar_url %} - GitHub photo of {{ contributor.display_name }} - {% else %} -
- -
- {% endif %} - -

- {{ contributor.display_name }} -

- - {% if contributor.organization %} -

{{ contributor.organization }}

- {% endif %} - - {% if contributor.title %} -

- {% for title in contributor.title %} - {{ title }}{% if not forloop.last %}, {% endif %} - {% endfor %} -

- {% endif %} - -
- - - - - {% if contributor.twitter %} - - - - {% endif %} - - {% if contributor.website %} - - - - {% endif %} - - {% if contributor.orcidid %} - - - - {% endif %} - - {% if contributor.mastodon %} - - - - {% endif %} -
-
- {% empty %} - -
-

Unable to load contributor data at this time. Please try again later.

-
- {% endfor %} -
-
-
- - -
-
-
-

Recent blog posts & updates

- -
- - {% for i in "123" %} -
-
-
-

Blog Post Title {{ forloop.counter }}

-

March {{ forloop.counter }}, 2025

-

Brief description of the blog post content...

-
-
- {% endfor %} -
- - -
-
-
- - -
-
-

Recently Accepted Python Packages

- -
- {% for package in recent_packages %} -
-

{{ package.package_name }}

-

- - {% if package.all_current_maintainers %} - {% for maintainer in package.all_current_maintainers %} - {% if maintainer.name %} - {{ maintainer.name }}{% if not forloop.last %}, {% endif %} - {% else %} - {{ maintainer.github_username }}{% if not forloop.last %}, {% endif %} - {% endif %} - {% endfor %} - {% elif package.submitting_author.name != 'Name' %} - {{ package.submitting_author.name }} - {% else %} - {{ package.submitting_author.github_username }} - {% endif %} -

-

{{ package.package_description|truncatewords:20 }}

-
- {% if package.repository_link %} - - View Code - - {% endif %} - {% if package.gh_meta.documentation %} - - View Docs - - {% endif %} - {% if package.issue_link %} - - View Review - - {% endif %} -
-
- {% empty %} - -
-

Unable to load package data at this time. Please try again later.

-
- {% endfor %} -
- - -
-
-{% endblock %} +{% extends "base.html" %} + + +{% block content %} +{% include "core/includes/hero.html" %} + + + +
+
+

{{ meta.callout }}

+
+
+ +
+ {% for card in meta.feature_cards %} + {% include "core/includes/feature_card.html" %} + {% endfor %} +
+ + + +
+ {{ markdown_content|safe }} +
+{% endblock %} \ No newline at end of file diff --git a/templates/core/includes/feature_card.html b/templates/core/includes/feature_card.html new file mode 100644 index 0000000..3ee5c38 --- /dev/null +++ b/templates/core/includes/feature_card.html @@ -0,0 +1,13 @@ +{% load static %} + +
+
+ {{ card.alt }} +
+
+

{{ card.title }}

+
+ {{ card.excerpt|safe }} +
+
+
\ No newline at end of file diff --git a/templates/core/includes/feature_card_set.html b/templates/core/includes/feature_card_set.html new file mode 100644 index 0000000..7e5d06d --- /dev/null +++ b/templates/core/includes/feature_card_set.html @@ -0,0 +1,5 @@ +
+ {% for card in cards %} + {% include "core/includes/feature_card.html" %} + {% endfor %} +
\ No newline at end of file diff --git a/templates/core/includes/hero.html b/templates/core/includes/hero.html new file mode 100644 index 0000000..40d5aaa --- /dev/null +++ b/templates/core/includes/hero.html @@ -0,0 +1,18 @@ +{% load static %} +
+
+
+

{{ meta.title }}

+

{{ meta.subtitle }}

+ {% if meta.buttons %} +
+ {% for button in meta.buttons %} + + {{ button.label }} + + {% endfor %} +
+ {% endif %} +
+
+
\ No newline at end of file diff --git a/templates/core/old_home.html b/templates/core/old_home.html new file mode 100644 index 0000000..6fb5221 --- /dev/null +++ b/templates/core/old_home.html @@ -0,0 +1,293 @@ +{% extends 'base.html' %} +{% load static %} +{% load image_tags %} + +{% block title %}{{ page_title }} - PyOpenSci{% endblock %} + +{% block content %} + +
+
+
+

Welcome to pyOpenSci

+

{{ hero_title }}

+ +
+
+
+ + +
+
+

{{ hero_subtitle }}

+
+
+ + +
+
+

+ Peer review of Python software to support open science +

+ +
+ +
+
+ {% card_image "landing-pages/software-peer-review" "Light purple image showing software peer review with a woman at a laptop with a pyOpenSci logo" %} +
+
+

We Run Software Peer Review

+

We review Python packages and software with the goal of helping scientists build better, discoverable and usable software.

+

Your package can also be published in JOSS through our review process.

+
    +
  • Submit a package for review
  • +
  • Apply to become a reviewer
  • +
+
+
+ + +
+
+ {% card_image "landing-pages/community-partnerships" "Light purple image with diverse stick figure people representing community partnerships" %} +
+
+

We Build Community Partnerships

+

We partner with open source communities to share resources and processes such as Peer review.

+

Learn more about our partnerships with:

+
    +
  • JOSS
  • +
  • Astropy
  • +
+
+
+ + +
+
+ {% card_image "landing-pages/simple-python-packaging-header" "Light purple image showing python packaging guide with a laptop and hands" %} +
+
+

We Break Down Python Packaging Painpoints

+

Check out our beginner-friendly resources:

+
    +
  • Python Package Tutorials
  • +
  • Python package guide
  • +
+

All of our resources are co-developed with the broader Python community and reviewed by beginner to expert Pythonistas to ensure the material is accessible for all.

+
+
+
+
+
+ + +
+
+

+ Broadening participation in scientific open source +

+ +
+
+
+ {% responsive_image "pyopensci-sprint-pycon-2023" "Image showing 3 people working at 2 computers during a sprint at PyCon USA 2023" "w-full h-full object-cover rounded-lg" %} +
+
+
+

You don't need to be an expert to get involved

+

Are you new to software peer review but you want to get involved? We've got you!

+

We offer support and mentorship to new reviewers completing their first review.

+

All reviewers don't need to be python package experts. We welcome reviewers that focus on software accessibility and usability.

+

Are you new to peer review? We offer a mentorship program for anyone interested in participating in peer review but who might like a bit of support.

+
+
+
+
+ + +
+
+

New pyOpenSci contributors

+ +
+ {% for contributor in recent_contributors %} +
+ {% if contributor.github_avatar_url %} + GitHub photo of {{ contributor.display_name }} + {% else %} +
+ +
+ {% endif %} + +

+ {{ contributor.display_name }} +

+ + {% if contributor.organization %} +

{{ contributor.organization }}

+ {% endif %} + + {% if contributor.title %} +

+ {% for title in contributor.title %} + {{ title }}{% if not forloop.last %}, {% endif %} + {% endfor %} +

+ {% endif %} + +
+ + + + + {% if contributor.twitter %} + + + + {% endif %} + + {% if contributor.website %} + + + + {% endif %} + + {% if contributor.orcidid %} + + + + {% endif %} + + {% if contributor.mastodon %} + + + + {% endif %} +
+
+ {% empty %} + +
+

Unable to load contributor data at this time. Please try again later.

+
+ {% endfor %} +
+
+
+ + +
+
+
+

Recent blog posts & updates

+ +
+ + {% for i in "123" %} +
+
+
+

Blog Post Title {{ forloop.counter }}

+

March {{ forloop.counter }}, 2025

+

Brief description of the blog post content...

+
+
+ {% endfor %} +
+ + +
+
+
+ + +
+
+

Recently Accepted Python Packages

+ +
+ {% for package in recent_packages %} +
+

{{ package.package_name }}

+

+ + {% if package.all_current_maintainers %} + {% for maintainer in package.all_current_maintainers %} + {% if maintainer.name %} + {{ maintainer.name }}{% if not forloop.last %}, {% endif %} + {% else %} + {{ maintainer.github_username }}{% if not forloop.last %}, {% endif %} + {% endif %} + {% endfor %} + {% elif package.submitting_author.name != 'Name' %} + {{ package.submitting_author.name }} + {% else %} + {{ package.submitting_author.github_username }} + {% endif %} +

+

{{ package.package_description|truncatewords:20 }}

+
+ {% if package.repository_link %} + + View Code + + {% endif %} + {% if package.gh_meta.documentation %} + + View Docs + + {% endif %} + {% if package.issue_link %} + + View Review + + {% endif %} +
+
+ {% empty %} + +
+

Unable to load package data at this time. Please try again later.

+
+ {% endfor %} +
+ + +
+
+{% endblock %}