Skip to content

Commit

Permalink
Switch to mkdocs from Hugo (#926)
Browse files Browse the repository at this point in the history
Closes #908
  • Loading branch information
SeanTAllen authored Feb 12, 2024
1 parent 1ebf407 commit 06585be
Show file tree
Hide file tree
Showing 412 changed files with 3,792 additions and 4,744 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/verify-site-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Verify site builds

on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'

jobs:
test:
name: Verify site builds
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/[email protected]
- name: Install dependencies
run: pip install -r requirements.txt
env:
INSIDERS_PAT: ${{ secrets.MATERIAL_INSIDERS_ACCESS }}
- name: Build site
run: mkdocs build
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4
with:
api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
organization-url: 'https://ponylang.zulipchat.com/'
to: notifications
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,5 @@ Temporary Items
# Linux trash folder which might appear on any partition or disk
.Trash-*


### Hugo ###
hugo.exe
/public/
### mkdocs ##
/site/
2 changes: 1 addition & 1 deletion .spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ matrix:
- 'a'

sources:
- 'content/**/*.md'
- 'docs/**/*.md'
default_encoding: utf-8
2 changes: 2 additions & 0 deletions .spelling-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Athaydes
atomics
aturley
autocomplete
autogenerated
automagically
AVX
backpressure
Expand Down Expand Up @@ -258,6 +259,7 @@ Liétar
Liétar's
linkable
LINQ
linter
Linux
LLDB
LLVM
Expand Down
17 changes: 7 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ Please note, that by submitting any content to the Pony Tutorial book you are ag

## Hugo

The Pony website is generated using [Hugo]: a static website generator. If you are making larger changes to the site, you will need to install Hugo locally to verify your changes are working.

Because the site is deploying using a remote server, you should make sure you are developing using whatever version the deploy server is currently running.
The site is currently built for production deploy using v0.24.1.
The Pony website is generated using [`mkdocs`]: a static website generator. If you are making larger changes to the site, you will need to install `mkdocs` locally to verify your changes are working.

## Ponylang.io hosting

Expand All @@ -23,18 +20,18 @@ Netlify offers "deploy previews" that allow you to view the results of a PR befo

To see the preview, on the PR page select `Show all checks` and then click `Details` next to `deploy/netlify - Deploy preview is ready!`

## Developing locally with Hugo
## Developing locally with mkdocs

To do larger changes, you'll want to install Hugo locally so you can test your changes. As of now, we are using Hugo v0.16. For detailed instructions on using [Hugo], please refer to its website.
To do larger changes, you'll want to install mkdocs locally so you can test your changes. For detailed instructions on using [mkdocs], please refer to its website.

For simpler tasks, once you have Hugo installed, you should be able to:
For simpler tasks, once you have mkdocs installed, you should be able to:

```bash
cd ponylang.github.io
hugo server
mkdocs serve
```

Which will start up a local webserver that will serve the Ponylang website on `http://localhost:1313`. Generated content will be placed in the `public` folder which is ignored by git. Do not check in any generated content to the `source` branch.
Which will start up a local webserver that will serve the Ponylang website on `http://localhost:8080`.

Once you are happy with your changes, commit then and submit a PR. Before doing that, please read the following 'How to submit a pull request' section.

Expand All @@ -55,5 +52,5 @@ If your PR is for a single logical change (which is should be) but spans multipl

Favor relative links for any content on ponylang.io. Absolute links that point to `https://www.ponylang.io` don't play well with Netlify deploy previews. Absolute links will redirect you off the preview website and onto the live website. For this reason, relative links are preferred.

[Hugo]: https://gohugo.io
[mkdocs]: https://www.mkdocs.org/
[Netlify]: https://www.netlify.com/.
2 changes: 0 additions & 2 deletions archetypes/default.md

This file was deleted.

76 changes: 0 additions & 76 deletions archetypes/lwip.md

This file was deleted.

13 changes: 0 additions & 13 deletions archetypes/release.md

This file was deleted.

4 changes: 0 additions & 4 deletions content/blog/_index.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/community/talks.md

This file was deleted.

23 changes: 0 additions & 23 deletions content/index.md

This file was deleted.

5 changes: 0 additions & 5 deletions data/author/codecabc.json

This file was deleted.

7 changes: 0 additions & 7 deletions data/author/colinobrien.json

This file was deleted.

7 changes: 0 additions & 7 deletions data/author/dipinhora.json

This file was deleted.

5 changes: 0 additions & 5 deletions data/author/jdhorwitz.json

This file was deleted.

5 changes: 0 additions & 5 deletions data/author/kevinhoffman.json

This file was deleted.

5 changes: 0 additions & 5 deletions data/author/mwahl.json

This file was deleted.

7 changes: 0 additions & 7 deletions data/author/red.json

This file was deleted.

7 changes: 0 additions & 7 deletions data/author/ryan.json

This file was deleted.

7 changes: 0 additions & 7 deletions data/author/seantallen.json

This file was deleted.

7 changes: 0 additions & 7 deletions data/author/sylvan.json

This file was deleted.

5 changes: 0 additions & 5 deletions data/author/theobutler.json

This file was deleted.

45 changes: 0 additions & 45 deletions data/recent-talks.json

This file was deleted.

File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions static/_redirects → docs/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ https://ponylang.org/* https://www.ponylang.io/:splat 301!
# as that is most likely what someone wanted
/categories/release/ https://github.com/ponylang/ponyc/releases 301!
/categories/release/index.xml https://github.com/ponylang/ponyc/releases.atom 301!

## send the blog categories to the new mkdocs location
/categories/* /blog/categories/:splat 301!
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Loading

0 comments on commit 06585be

Please sign in to comment.