Add Hugo and initial content migration scripts
What does this MR do and why?
- Adds Hugo to the Hugo project!
😄 - Adds make target and directions for local setup
- Adds scaffolding for theme
- Adds a minimal configuration file
- Adds a script to modify markdown files at build time
- Adds a build stage to the CI pipeline
Screenshots, screen recordings, or links to review app
- Successful pipeline where we've compiled Hugo with all source content: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/jobs/5698150904
How to set up and validate locally
REMOVE_BEFORE_CLONE=true
while testing the clone-docs-projects
make target will remove local copies of upstream projects if they're in the same directory as gitlab-docs-hugo
.
-
Check out this branch. -
Run make setup
. This should addhugo
andyq
to your local toolset. -
Pull down content repos. This step now also runs a bash script that renames files: REMOVE_BEFORE_CLONE=true make clone-docs-projects
You should see successful clone and update operations, like this:
INFO: Fetching docs content sources...
2023/12/06 15:12:00 [Info] ../gitlab-runner already exists, removing it
2023/12/06 15:12:00 [Info] Fetching runner on branch main at commit heads/main
2023/12/06 15:12:01 [Info] Last commit: 79fa4fb Merge branch 'mrincon-ff-clarification' into 'main'
2023/12/06 15:12:01 [Info] ../charts-gitlab already exists, removing it
2023/12/06 15:12:01 [Info] Fetching charts on branch master at commit heads/master
2023/12/06 15:12:02 [Info] Last commit: 43f2d4c Merge branch 'fix-nginx-newline' into 'master'
2023/12/06 15:12:02 [Info] ../gitlab-operator already exists, removing it
2023/12/06 15:12:02 [Info] Fetching operator on branch master at commit heads/master
2023/12/06 15:12:03 [Info] Last commit: 5f76e16 Merge branch 'beck-arm-crosscompile' into 'master'
2023/12/06 15:12:05 [Info] ../gitlab already exists, removing it
2023/12/06 15:12:05 [Info] Fetching gitlab on branch master at commit heads/master
2023/12/06 15:12:27 [Info] Last commit: 964b7cf9a Merge branch 'fix_undefined_method_downcase' into 'master'
2023/12/06 15:12:27 [Info] ../omnibus-gitlab already exists, removing it
2023/12/06 15:12:27 [Info] Fetching omnibus on branch master at commit heads/master
2023/12/06 15:12:28 [Info] Last commit: a489b4e Merge branch 'naman/17584-pages-nginx-namespace-in-path' into 'master'
INFO: Running content update scripts...
Renaming index files in ../gitlab...
Renaming index files in ../omnibus-gitlab...
Renaming index files in ../gitlab-runner...
Renaming index files in ../charts-gitlab...
Renaming index files in ../gitlab-operator...
INFO: Content updates complete!
-
Run make view
You should see that Hugo has compiled all our pages:
| EN
-------------------+-------
Pages | 2739
Paginator pages | 0
Non-page files | 827
Static files | 1
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0
Note: The "Pages" number is higher than our recent content audit because this still includes some pages that we won't actually publish. We'll address this later on: #24 (closed).
This will also return a preview URL: http://localhost:1313/
Visiting this page in your browser should show you the top-level index page (on the current site, that's this: https://docs.gitlab.com/ee/).
Links will not work yet (not til #52 (closed)), and there's no styling, but it's a real webpage!
You can verify we've included all products by visiting these pages:
- GitLab: http://localhost:1313/
- Omnibus: http://localhost:1313/omnibus/
- Operator: http://localhost:1313/operator/
- Runner: http://localhost:1313/runner/
- Charts: http://localhost:1313/charts/
For GitLab, this is a big change: we've dropped the ee
prefix in the URL (which will eventually close gitlab-org/gitlab-docs#1081 (closed)). We will handle redirects for this later on: #43
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.
Closes #3 (closed)