forked from google/docsy-example
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from British-Oceanographic-Data-Centre/feature…
…/beauty-docsy Feature/beauty docsy
- Loading branch information
Showing
45 changed files
with
2,416 additions
and
2,239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,53 @@ | ||
# COAsT docsy | ||
# COAsT Documentation Website | ||
|
||
This is the website repo for the COAsT python package it uses [Docsy](https://github.com/google/docsy) a Hugo theme for technical documentation sites, providing easy site navigation, structure, and more. | ||
This is the repository for the COAsT Python package documentation website. This site utilizes the [Docsy](https://github.com/google/docsy) theme, a Hugo theme designed for technical documentation sites, offering streamlined navigation, structure, and more. | ||
|
||
## Prerequisites | ||
|
||
## Cloning the COAsT Project website | ||
Before you get started, make sure you have the following prerequisites in place: | ||
|
||
The following will give you a project that is set up and ready to use (don't forget to use `--recurse-submodules` or you won't pull down some of the code you need to generate a working site). The `hugo server` command builds and serves the site. If you just want to build the site, run `hugo` instead. | ||
1. **Node.js and npm Installation**: Download and install Node.js, which includes npm, from the official [Node.js website](https://nodejs.org/). We recommend using version 18 or later. | ||
|
||
2. **Hugo Installation**: You'll need an extended version of Hugo, preferably version 0.120.1 or later, for local builds and previews of sites that use Docsy. To ensure you have the correct Hugo version, follow these steps: | ||
|
||
- If you install Hugo from the release page, make sure to select the **extended Hugo version** to support SCSS. | ||
|
||
- After installation, verify your Hugo version by running `hugo version`. Your output should resemble the following: | ||
|
||
```bash | ||
hugo v0.120.2-9c2b2414d231ec1bdaf3e3a030bf148a45c7aa17+extended linux/amd64 BuildDate=2023-10-31T16:27:18Z VendorInfo=gohugoio | ||
``` | ||
|
||
Ensure that the version name includes the string *"extended"*. | ||
|
||
## Getting Started | ||
|
||
Follow these steps to set up your project and get it ready for use. Begin by cloning the repository: | ||
|
||
```bash | ||
git clone --recurse-submodules --depth 1 https://github.com/British-Oceanographic-Data-Centre/COAsT-site.git | ||
cd docsy-example | ||
hugo server | ||
git clone --recurse-submodules --depth 1 [email protected]:British-Oceanographic-Data-Centre/COAsT-site.git | ||
cd COAsT-site | ||
``` | ||
|
||
The theme is included as a Git submodule: | ||
Now, proceed to install the dependencies and essential scripts: | ||
|
||
```bash | ||
▶ git submodule | ||
a053131a4ebf6a59e4e8834a42368e248d98c01d themes/docsy (heads/master) | ||
npm install # Install package dependencies | ||
npm run prepare # Fetch the submodule used as the theme for this website and install its dependencies | ||
``` | ||
|
||
If you want to do SCSS edits and want to publish these, you need to install `PostCSS` (not needed for `hugo server`): | ||
The `npm run prepare` command will install all the necessary dependencies for your theme, including `PostCSS`, `Bootstrap`, and `Autoprefixer`. | ||
|
||
## Running the Website Locally | ||
|
||
After cloning the site repository, navigate to the repository's root folder, and execute the following command to serve the website locally: | ||
```bash | ||
npm install | ||
hugo server | ||
``` | ||
The `hugo server` command builds and serves the site. If you only want to build the site without serving it locally, run `hugo` instead. | ||
<!--### Cloning the Example from the Theme Project | ||
|
@@ -42,12 +64,4 @@ Note that the Hugo Theme Site requires the `exampleSite` to live in a subfolder | |
git subtree add --prefix exampleSite https://github.com/google/docsy.git master --squash | ||
``` | ||
To pull in changes, see `pull-deps.sh` script in the theme.--> | ||
|
||
## Running the website locally | ||
|
||
Once you've cloned the site repo, from the repo root folder, run: | ||
|
||
``` | ||
hugo server | ||
``` | ||
To pull in changes, see `pull-deps.sh` script in the theme.--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.