Skip to content

Commit

Permalink
Merge pull request #3345 from getpelican/main-default-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmayer committed Jun 25, 2024
2 parents 28e5410 + 36ebe91 commit ef501a3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
environment: Deployment
needs: [test, lint, docs, build]
runs-on: ubuntu-latest
if: github.ref=='refs/heads/master' && github.event_name!='pull_request' && github.repository == 'getpelican/pelican'
if: github.ref=='refs/heads/main' && github.event_name!='pull_request' && github.repository == 'getpelican/pelican'

permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Before you ask for help, please make sure you do the following:

3. Try reproducing the issue in a clean environment, ensuring you are using:

* latest Pelican release (or an up-to-date Git clone of Pelican master)
* latest Pelican release (or an up-to-date Git clone of Pelican ``main`` branch)
* latest releases of libraries used by Pelican
* no plugins or only those related to the issue

Expand Down Expand Up @@ -87,7 +87,7 @@ Using Git and GitHub
--------------------

* `Create a new branch`_ specific to your change (as opposed to making
your commits in the master branch).
your commits in the ``main`` branch).
* **Don't put multiple unrelated fixes/features in the same branch / pull request.**
For example, if you're working on a new feature and find a bugfix that
doesn't *require* your new feature, **make a new distinct branch and pull
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Why the name “Pelican”?
.. _`Pelican's internals`: https://docs.getpelican.com/en/latest/internals.html
.. _`hosted on GitHub`: https://github.com/getpelican/pelican

.. |build-status| image:: https://img.shields.io/github/actions/workflow/status/getpelican/pelican/main.yml?branch=master
:target: https://github.com/getpelican/pelican/actions/workflows/main.yml?query=branch%3Amaster
.. |build-status| image:: https://img.shields.io/github/actions/workflow/status/getpelican/pelican/main.yml?branch=main
:target: https://github.com/getpelican/pelican/actions/workflows/main.yml?query=branch%3Amain
:alt: GitHub Actions CI: continuous integration status
.. |pypi-version| image:: https://img.shields.io/pypi/v/pelican.svg
:target: https://pypi.org/project/pelican/
Expand Down
2 changes: 1 addition & 1 deletion docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Environment variables can also be used here but must be escaped appropriately::

Settings are configured in the form of a Python module (a file). There is an
`example settings file
<https://github.com/getpelican/pelican/raw/master/samples/pelican.conf.py>`_
<https://github.com/getpelican/pelican/raw/main/samples/pelican.conf.py>`_
available for reference.

To see a list of current settings in your environment, including both default
Expand Down
4 changes: 2 additions & 2 deletions docs/themes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To generate its HTML output, Pelican uses the `Jinja
<https://palletsprojects.com/p/jinja/>`_ templating engine due to its flexibility and
straightforward syntax. If you want to create your own theme, feel free to take
inspiration from the `"simple" theme
<https://github.com/getpelican/pelican/tree/master/pelican/themes/simple/templates>`_.
<https://github.com/getpelican/pelican/tree/main/pelican/themes/simple/templates>`_.

To generate your site using a theme you have created (or downloaded manually
and then modified), you can specify that theme via the ``-t`` flag::
Expand Down Expand Up @@ -368,7 +368,7 @@ period_num A tuple of the form (``year``, ``month``, ``day``),

You can see an example of how to use `period` in the `"simple" theme
period_archives.html template
<https://github.com/getpelican/pelican/blob/master/pelican/themes/simple/templates/period_archives.html>`_.
<https://github.com/getpelican/pelican/blob/main/pelican/themes/simple/templates/period_archives.html>`_.


.. _period_archives_variable:
Expand Down
16 changes: 8 additions & 8 deletions docs/tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@ Publishing a User Site to GitHub Pages from a Branch
----------------------------------------------------

To publish a Pelican site in the form of User Pages, you need to *push* the
content of the ``output`` dir generated by Pelican to the ``master`` branch of
content of the ``output`` dir generated by Pelican to the ``main`` branch of
your ``<username>.github.io`` repository on GitHub.

Again, you can take advantage of ``ghp-import``::

$ pelican content -o output -s pelicanconf.py
$ ghp-import output -b gh-pages
$ git push git@github.com:elemoine/elemoine.github.io.git gh-pages:master
$ git push git@github.com:elemoine/elemoine.github.io.git gh-pages:main

The ``git push`` command pushes the local ``gh-pages`` branch (freshly updated
by the ``ghp-import`` command) to the ``elemoine.github.io`` repository's
``master`` branch on GitHub.
``main`` branch on GitHub.

.. note::

Expand All @@ -116,18 +116,18 @@ inside the ``Pelican`` folder you can run::

$ pelican content -o .. -s pelicanconf.py

Now you can push the whole project ``<username>.github.io`` to the master
Now you can push the whole project ``<username>.github.io`` to the main
branch of your GitHub repository::

$ git push origin master
$ git push origin main

(assuming origin is set to your remote repository).

Publishing to GitHub Pages Using a Custom GitHub Actions Workflow
-----------------------------------------------------------------

Pelican-powered sites can be published to GitHub Pages via a `custom workflow
<https://github.com/getpelican/pelican/blob/master/.github/workflows/github_pages.yml>`_.
<https://github.com/getpelican/pelican/blob/main/.github/workflows/github_pages.yml>`_.
To use it:

1. Enable GitHub Pages in your repo: go to **Settings → Pages** and choose
Expand All @@ -144,15 +144,15 @@ To use it:
workflow_dispatch:
jobs:
deploy:
uses: "getpelican/pelican/.github/workflows/github_pages.yml@master"
uses: "getpelican/pelican/.github/workflows/github_pages.yml@main"
permissions:
contents: "read"
pages: "write"
id-token: "write"
with:
settings: "publishconf.py"
You may want to replace the ``@master`` with the ID of a specific commit in
You may want to replace the ``@main`` with the ID of a specific commit in
this repo in order to pin the version of the reusable workflow that you're using:
``uses: getpelican/pelican/.github/workflows/github_pages.yml@<COMMIT_ID>``.
If you do this you might want to get Dependabot to send you automated pull
Expand Down
2 changes: 1 addition & 1 deletion pelican/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def handle_deprecated_settings(settings: Settings) -> Settings:
"FILES_TO_COPY",
"STATIC_PATHS and EXTRA_PATH_METADATA",
"https://github.com/getpelican/pelican/"
"blob/master/docs/settings.rst#path-metadata",
"blob/main/docs/settings.rst#path-metadata",
),
]:
if old in settings:
Expand Down

0 comments on commit ef501a3

Please sign in to comment.