arXiv / arxiv-docs

Help, about and other static pages
MIT License
110 stars 61 forks source link
arxiv-ce documentation in-production mkdocs

info.arxiv.org pages

Help, about, policy and other pages for arXiv.

Overview

This is where to make edits to the about, help, labs, new and other pages at info.arxiv.org. These are written in markdown and turned into HTML pages with mkdocs-material.

How to do a Quick Edit on github

To make a quick edit, use this is a 4 step process:

  1. Make your edit and commit to a new branch.

  2. Make a PR from your branch to develop, get that reviewed.

  3. Merge the PR to develop.

  4. Merge changes on develop to master.

1. Make your edit on github

Screenshot of a page on info.arxiv.org and the location of the edit icon

Screenshot of a page in Github and the location of the edit icon

Screenshot of the location of the preview button on the edited page in Github

Screenshot displaying the preview of your edits in Github

Screenshot of the location of the commit button on the edited page in Github

Screenshot of how to create a new branch for the edits made in Github

If you have more changes to make at this time you may make and commit them all to the branch you created. The additional changes you commit will be grouped together when you make your pull request in the next step.


2. Make a Pull Request from your branch to develop

Once you have completed all of your changes, you need to have your changes reviewed. This is done by "creating a PR." PR stands for pull request.

Screenshot how to compare changes in the pull request in github

In the event that you have made a commit and were unable to complete or create your pull request at the time, you will not have the same yellow box interface if you return to the page the next day.

You will have to make a pull request by clicking on the "Pull requests" link in the header of the github
Next, click the button to the right that says "New pull request"

Screenshot how to compare changes in the pull request in github


Screenshot how to compare changes in the pull request in github

Screenshot how to compare changes in the pull request in github

Screenshot of how to select reviewers of your PR and create the PR in Github

Screenshot of the location of the create pull request button in Github


3. Merge the PR to develop

Screenshot of how to merge your pull request in Github


4. Make a Pull Request from develop to master

Please note: Once you have merged your changes to develop, it is important to deploy them as soon as possible. Lingering commits on on the develop branch can cause unintentional problems when they are deployed with other code. If you notice commits other than your own in the PR you make, please be sure to check in with the owners of those commits to ensure they are ready to go live.

Screenshot how to compare changes in the pull request in github

Screenshot how to compare changes in the pull request in github

Screenshot how to compare changes between the develop branch and the master branch in github


Authoring Markdown

See AUTHORING.md

Building on your local machine

Instead of using github to edit you can check all the files for arxiv-docs to your laptop to edit and preview.

git clone git@github.com:arXiv/arxiv-docs.git
cd arxiv-docs
python --version
# 3.8.12
python -m venv docs-venv
source docs-venv/bin/activate
pip install -r requirements.txt
mkdocs serve
google-chrome https://localhost:8000/index.html

Then you will have the site served locally with hot reloading on edits. In your browser, go to http://localhost:8000/index.html

Deployment to info.arxiv.org

Commits or merges to arxiv-docs master branch will deploy the site.

The cloud build YAML files combined with CloudBuild triggers in arxiv-production comprise the deployment pipeline for arxiv-docs.

Previews of PRs

PRs that will merge to the branch develop on the github repo arxiv-docs will deploy previews at https://storage.googleapis.com/arxiv-docs-prs/YOUR_BRANCH_NAME/about/index.html

Note that the home page specifically does not exist, but any other page can be accessed with its URL path. This preview can been seen by the public, everything in the github arxiv-docs repo can also be seen by the public.

Direct commits to the develop branch will not generate a preview.

Historical site content

See https://github.com/arXiv/arxiv-docs/releases for branches prior to 2023 when content was shifted to the source/ directory.