Skip to content

Commit

Permalink
Merge pull request #152 from alphagov/remove-widdershins
Browse files Browse the repository at this point in the history
Remove widdershins
  • Loading branch information
brucebolt authored Jan 7, 2025
2 parents 23c662a + 3a36608 commit 44c77e9
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 2,291 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@
.DS_Store

Staticfile.auth

/node_modules
/source/reference.html.md.erb
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
requirements:
npm install
bundle install

clean:
rm -rf build

api:
$(if ${API_SPEC},,$(error Must specify path to the OpenAPI spec file in API_SPEC))
./generate.js ${API_SPEC} source/reference.html.md.erb

html: requirements clean api
html: requirements clean
bundle exec rake build

server: html
bundle exec middleman server

publish: requirements clean api
publish: requirements clean
bundle exec rake publish

all: html

.PHONY: setup requirements clean api html server publish
.PHONY: setup requirements clean html server publish
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@ This documentation is built from source files in this repository and an
[Content Store][content-store] application.

The framework for this documentation
is provided by the [GOV.UK Tech Docs Template][tech-docs-template] and through
the use of a [fork][forked-widdershins] of [widdershins][widdershins] to
convert the [`openapi.yaml`][content-store-openapi] to Markdown.
is provided by the [GOV.UK Tech Docs Template][tech-docs-template].

## Updating content

The [`reference.html`][reference-page] page is built using the
[`openapi.yaml`][content-store-openapi] file. Changes to content on this page
should be made by opening a pull request against the
[Content Store][content-store] application. Some aspects of the reference.html
page are controlled by templates which are stored in the
[`/templates`][templates-dir] of this repository.
[Content Store][content-store] application.

Other HTML pages are in the [`/source`][source-dir] of this repository and are
authored using Markdown. You can suggest edits to these pages by making changes
Expand All @@ -33,8 +29,8 @@ as well as the [Content Store][content-store].

### Installing dependencies

Setting up the documentation requires Ruby and Node. Run the following to
install the necessary dependencies:
Setting up the documentation requires Ruby. Run the following to install the
necessary dependencies:

```
make requirements
Expand All @@ -53,7 +49,7 @@ access it if they are given the link.
Type the following to start the server:

```
make server API_SPEC=../content-store/openapi.yaml
make server
```

You should now be able to view a live preview at http://localhost:4567.
Expand All @@ -69,7 +65,7 @@ If for some reason the automatic deployment fails you can deploy with the
following command:

```
make publish API_SPEC=<path/to/openapi.yaml>
make publish
```

This will push to the `gh-pages` branch and therefore deploy to GitHub Pages.
Expand All @@ -78,11 +74,8 @@ This will push to the `gh-pages` branch and therefore deploy to GitHub Pages.

[MIT License](LICENCE)

[forked-widdershins]: https://github.com/alphagov/widdershins
[widdershins]: https://github.com/Mermade/widdershins
[content-store-openapi]: https://github.com/alphagov/content-store/blob/deployed-to-production/openapi.yaml
[content-store-openapi]: https://github.com/alphagov/content-store/blob/main/openapi.yaml
[content-store]: https://github.com/alphagov/content-store
[templates-dir]: https://github.com/alphagov/govuk-content-api-docs/tree/


/templates
Expand Down
3 changes: 3 additions & 0 deletions config/tech-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ max_toc_heading_level: 6

# Prevent robots from indexing (e.g. whilst in development)
prevent_indexing: false

# Generate the API reference
api_path: https://raw.githubusercontent.com/alphagov/content-store/refs/heads/main/openapi.yaml
39 changes: 0 additions & 39 deletions generate.js

This file was deleted.

Loading

0 comments on commit 44c77e9

Please sign in to comment.