Skip to content

Commit

Permalink
Docusaurus switch (#694)
Browse files Browse the repository at this point in the history
Fixes #649 

* Live preview: https://me.mfocko.xyz/packit

TODO:

- [x] Front page!
- [x] Documentation
  - [x] Check any Hugo-specific features
  - [x] Convert Hugo details to HTML details
  - [x] Should be done, ready for “rip and tear until it's done”
- [x] Source-git
  - [x] Check…
  - [x] Hugo links
- [x] Deployment
  - [x] Merge the changes back into the deployment repo
  - [ ] packit/deployment#507
- [x] Research
- [x] Consider including it; probably follow-up PR, since it requires
more changes
- [x] Blog posts
  - [x] Check…
  - [x] Polish off the “previews”
    - [x] Definitely remove the headings
- [x] Weekly updates
  - [x] Check…
  - [ ] Consider switching to post per week
- [ ] Make sure the RSS for weekly updates is updated in the linked
Fedora digest or something! ask @xsuchy
- [ ] Shortcodes redo
  - [ ] Architecture
  - [ ] Usage charts
  - [ ] Workflow
- [x] Footer
- [ ] Decide what to include: Docusaurus themselves link back the docs,
community/contacts, github/mastodon and legal
- [x] Navbar
- [x] Probably link back to GitHub, dashboard — basically former
external links on the left panel in Hugo
- [ ] Check 1:1 links against Hugo
- [x] GitHub Action for building (and deploying on merge)
- [x] Remove stuff from Docusaurus template
- [x] Consider changing the CSS, e.g. Packit colors instead of the
Docusaurus green one
- [x] Finally! Move out from the nested directory that simplifies
rebasing 😰
- [x] Resolve broken links reported during build
- [ ] Set up
[search](https://docusaurus.io/docs/search#using-algolia-docsearch)
  • Loading branch information
mfocko authored Jul 17, 2023
2 parents 1184c61 + 8b1a35d commit 1f9911e
Show file tree
Hide file tree
Showing 218 changed files with 9,975 additions and 912 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/deploy-pages.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Import the nested docs
run: make import

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
25 changes: 25 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test deployment

on:
pull_request:
branches:
- main

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Import the nested docs
run: make import

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
32 changes: 28 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# IDEs
.idea
.hugo_build.lock
.vscode

public/
resources/
# Imported docs
.deployment-docs
.research-docs

.vscode
deployment
research
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

8 changes: 0 additions & 8 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
check:
jobs:
- pre-commit
- hugo
gate:
jobs:
- pre-commit

- job:
name: hugo
parent: base
description: Check that the website can be built with hugo
pre-run: files/install-hugo.yaml
run: files/build-with-hugo.yaml
29 changes: 26 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
run-dev: import
yarn start

install-dependencies: import
sudo dnf -y install yarnpkg
yarn install

import:
([[ -d deployment-docs ]] && rm -rf deployment-docs content/deployment-docs) || true
git clone https://github.com/packit/deployment.git deployment-docs
mv deployment-docs/docs content/deployment-docs
# Deployment
([[ -d .deployment-docs ]] && rm -rf .deployment-docs deployment) || true

# temporary workaround to fix the build
git clone https://github.com/mfocko/deployment.git .deployment-docs
(cd .deployment-docs && git checkout docusaurus)

mv .deployment-docs/docs/deployment deployment

# Research
([[ -d .research-docs ]] && rm -rf .research-docs research) || true

# temporary workaround to fix the build
git clone https://github.com/mfocko/research.git .research-docs
(cd .research-docs && git checkout docusaurus)

mv .research-docs/research research

.PHONY: run-dev import
Loading

0 comments on commit 1f9911e

Please sign in to comment.