Giter Club home page Giter Club logo

gds-way's Introduction

Technical Documentation

Contributing

Making documentation changes (using the Github interface)

At the bottom of each page of the hosted GDS Way there is a View source link. This link will take you to to the corresponding Github page where you can use the pencil icon (:pencil:) in the interface to propose edits to a page.

Once you have made your changes you can write a description, click the green Propose changes button, and on the following page clickj the green Create pull request button.

Making documentation changes (locally)

To make changes edit the source files in the source folder.

The bulk of the documentaion that makes up the GDS Way can be found in files located in the source/standards and source/manuals directories.

Adding documentation

You can add a new file to the source folder (or an appropriate sub-folder) to create a new page.

It is probably easiest to copy an existing file and change the name if you are new to writing text in markdown.

You then need to manually add your new page to one of the menu files in source/partials/_nav... for it to appear in one of the menus.

Raising and merging PRs to this repo

To submit changes to this repo, raise a PR in the usual way and these will be regularly reviewed by The GDS Way forum group that meets once a month. Reviewing and merging PRs at any time is fine, the forum will also review merged PRs as part of its regular meeting.

Any open non-draft PRs that have been more than 1 month without further comments, suggestions or alterations will be merged by the forum group unless there is an explicit "DO NOT MERGE" somewhere in the title or description.

There is a GDS Slack channel #gds-way where these are discussed.

Making functional changes

The GDS Way is built from the Tech Docs Template repository. Any functional changes and bug fixes should be made to that project first, then follow the instructions here to update the GDS Way.

Running Locally

Getting started

To preview or build the website, we need to use the terminal.

Install Ruby and Bundler

Install Ruby with Rubygems, preferably with a Ruby version manager, and the Bundler gem.

Clone the repository

Clone the repository using:

git clone https://github.com/alphagov/gds-way.git
cd gds-way

Additional commands for Apple silicon

If you are using a Mac with Apple silicon (such as an M1 chip), you must run additional commands.

Note If you are using an Intel Mac, skip this and go to the ‘Install the required gems’ step.

Tell Bundler to use libraries relating to the Apple silicon architecture:

 bundle lock --add-platform arm64-darwin-21
 bundle config --local specific_platform true
 bundle config --local build.ffi --enable-libffi-alloc

We need to make sure the EventMachine gem is built with OpenSSL from Homebrew and not the default macOS version of OpenSSL.

First, install OpenSSL 1.1:

brew install [email protected]

Do not worry if Homebrew says OpenSSL 1.1 is already installed.

Then tell your Mac to use the Homebrew installation of OpenSSL 1.1 when looking for packages (this will last until you end your terminal session):

export PKG_CONFIG_PATH=$(brew --prefix [email protected])/lib/pkgconfig

Install the required gems

Then in the application folder type the following to install the required gems:

bundle config set path 'vendor/bundle'
bundle install

Preview

Whilst writing documentation we can run a middleman server to preview how the published version will look in the browser. After saving a change the preview in the browser will automatically refresh.

The preview is only available on our own computer. Others will not be able to access it if they are given the link.

Type the following to start the server:

bundle exec middleman server

If all goes well something like the following output will be displayed:

== The Middleman is loading
== LiveReload accepting connections from ws://192.168.0.8:35729
== View your site at "http://Laptop.local:4567", "http://192.168.0.8:4567"
== Inspect your site configuration at "http://Laptop.local:4567/__middleman", "http://192.168.0.8:4567/__middleman"

You should now be able to view a live preview at http://localhost:4567.

Build

If you want to publish the website without using a build script you may need to build the static HTML files.

Type the following to build the HTML:

bundle exec middleman build

This will create a build subfolder in the application folder which contains the HTML and asset files ready to be published.

Check external links

If you want to verify that all of the external links in every page work (i.e. do not return an HTTP error code), use the check_links.rb script.

bundle exec ruby check_links.rb

This script is automatically run as part of CI, but skipped on the main branch (so that the main branch can always be deployed).

Deploy

This repo is continuously deployed from the main branch by GitHub Actions, using the workflow defined in /.github/workflows/bundle_and_release.yml.

Licence

Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.

The documentation is © Crown copyright and available under the terms of the Open Government 3.0 licence.

gds-way's People

Contributors

36degrees avatar alexbishop1 avatar alexmuller avatar benvand avatar chrisbashton avatar cmcnallygds avatar davbo avatar davidbiddle avatar deanwilson avatar dependabot-preview[bot] avatar dependabot[bot] avatar erino avatar galund avatar injms avatar lfdebrux avatar louzoid-gds avatar margauxgir avatar mrwilson avatar nooshu avatar olliejc avatar philandstuff avatar soupdragon99 avatar stephengrier avatar stephenharker avatar steveevansgds avatar tijmenb avatar timblair avatar tombye avatar venusbb avatar willp-bl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gds-way's Issues

Clarity about including Open Government Licence in repositories

https://gds-way.cloudapps.digital/manuals/licensing.html#use-mit says that all repositories should have a LICENCE file and that we use the MIT licence.

https://gds-way.cloudapps.digital/standards/publish-opensource-code.html#how-to-publish-open-source-code says that we use the MIT licence for code and code samples in documentation and Open Government Licence (OGL) for documentation.

Some questions I'd like clarity on (and then I'm happy to try and improve the documentation based on the answers):

  1. Should absolutely all repositories contain a LICENCE file? For example the gds-way repository itself does not have a LICENCE file. Note, if you build the gds-way docs then there is a link at the bottom of all pages to the OGL licence. Is that sufficient rather than having an actual LICENCE file in the repository?

  2. For documentation repositories, should we therefore be including two licences (MIT and OGL)? Does this differ if the repository is the documentation (e.g. https://github.com/alphagov/monitoring-doc) versus the repository gets built into an actual website serving documentation (such as the gds-way)?

Removing or rewording of the important note around node usage

I would like to have a conversation around the "Important Note" that can be seen on the "Using Node.js at GDS" page.

We currently don't have a Deputy Director Technology Operations at GDS to consult around this issue, and if we did would this person be the correct person to consult with and make this decision? Should this paragraph be reworded so that a decision is made from a key group of individuals using the new GDS Way Forum strategy that has recently been proposed? Or should the paragraph now be removed completely?

Node is already being used internally, and it is a language area that has a huge supporter base that has matured greatly in the past few years. I'm concerned that this paragraph will immediately halt any consideration for using Node in projects, even when it could be the perfect technology to use.

Python version recommendation

Python 2.7 is recommended against by the python maintainers for new stuff, and has an end of life in 2020.

Python 3.6 is the latest release and should probably be used for new stuff.

Upgrading from 2.7 to 3.x can be tricky.

We should make a clear recommendation about python version.

Provide guidance in the GDS Way on the use of static site publishing tools

There are quite a few examples of GDS projects that use static website generation tools but no actionable guidance on the topic.

Prior art includes:

There are many approaches to hosting

and probably more if we go looking.

Some guidance on which options are best for specific user needs would be helpful.

e.g. I need to publish technical documentation for a GDS Service or publish my teams working practices as a Team Manual

Documentation of APIs

(As suggested by Will Pearson.)

I know there's lots of discussion about APIs within GDS, but there's nothing currently in The GDS Way. Should we add something around APIs?

The Open Standards team is currently evaluating whether we should mandate the use of OpenAPI v3 to document all our APIs.

See the discussion on co-cddo/open-standards#31

Sentry

https://sentry.io

non on G-Cloud

zuz to meet with Nick Sinclair and find out how it can be procured

bob & Alex to start collecting numbers to determine which tier we need (most likely Enterprise but need some numbers ie no of events to begin conversations) and start creating the business case

Improve alt text guidance in accessibility.html.md.erb

From @selfthinker on PR #828:

When the alt-text section was changed in #500 it was to align with the GOV.UK content guidance. But The GDS Way is not about GOV.UK content specifically (although it can, and maybe should, be included) but about products from all of GDS. And the guidance in here currently does not align with the Design System guidance.

I think this is a valid point and one we should address. My view is that it might make sense to make this section much smaller (probably keeping the bit about figcaption) and link to the Design System guidance on alt text. It's a good introduction to using alt text, it explains most of the same things we're saying here, and it's not overly prescriptive, so GOV.UK and other teams can have their own more specific guidance if they want to.

I wanted to keep the changes in #828 limited so didn't make this change in that PR - capturing in an issue and assigning to myself so it still gets done.

Edge 16 anchor jump links no longer work

I've just tested the GDS Way in Edge 16 (latest, released in October) and have noticed a strange issue where clicking on an anchor jump link in the left hand nav now has no effect.

The browser looks like it is trying to jump down, the URL hash changes for a second, then reverts back to its previous state.

url-jump-link

Note: this has been tested in BrowserStack. It would be good to test and debug on a device actually running 16 rather than through the emulator. Would be worth investigating if a page refresh is being triggered, as that is what it looks to be doing.

Also Edge 15 and 14 work as expected, looks to be a 16 only issue.

Re: 'Linting Python at GDS'

Problem with 'Linting Python at GDS' (https://gds-way.cloudapps.digital/manuals/programming-languages/python/linting.html)

  • I can't click on links that are on the last line before a new section

To reproduce:

  • Find a link that is on a line just before a section - for example "Flake8 error codes list", or "by performing a PyPI search".
  • Try to click on it. It won't work.
    • Neither will the link be highlighted when you hover over it.

I wonder if this issue is common to all GDS Way pages.

Last list anchors broken on mobile / tablet viewport

To reproduce:

margin-issue

Issue caused here

h3, h4, h5, h6 {
    @include heading-offset($gutter);
  }

Proposed fix:

  1. Either remove usage of the mixin in this case and add specific styling manually (less padding, no negative margin)
  2. Continue to use the mixin but add an override after it's usage

Option 1 seems like the cleanest to me with minimal impact.

Markdown guidance

Following a discussion with @jamietanna here, should we have some guidance around markdown, even if that's to say no preferences around usage?

I'm in favour of setting a max line length and using breaks within a sentence as I find it makes using the terminal and comparing changes in commits easier, but I do appreciate that's not easy to maintain with some editors including GitHub's web interface and some parsers/renderers handle differently. So, I'd happily follow guidance saying not to break sentences if it was noted and included somewhere, or maybe we note that there's no set guide as long as the output renders correctly?

NodeJS guidance on Koa

The guidance on NodeJS currently recommends using the Express framework for web applications.

It has been suggested that the Koa framework is now a better fit for how we advise writing NodeJS JavaScript. While this is true, Koa's design encourages a different way of writing application code1 which:

  • requires developers to provide common features like routing, sessions, etc...
  • has fewer conventions around how to write applications

GDS also currently has no examples of applications written in Koa in production.

While all of this is true, it also appears the guidance to use Express has prevented developers choosing Koa in the past, despite it potentially being a better fit.

This aims to collect the discussion in one place and gather evidence for how we advise developers choosing between Express and Koa and whether migrating to Koa from Express is something teams should consider.

1. see #606 (comment) for more detail

Include User support/Support operations on Technical Operations page

Since PR #400 we've added a Technical Operations page for the Cyber and RE pages to sit underneath: https://gds-way.cloudapps.digital/standards/technical-operations.html
We should also include content on User Support in this section as they are part of the Technical Operations programme.

A 'How GDS provides user support' page already exists here: https://gds-way.cloudapps.digital/standards/user-support.html

We should review this page and either move the content under the TO page or cross-link

Recommend JS design patterns over others

Should we go further and tackle the problem of JavaScript having so many ways to write things? Not just at the commonjs level, but also things like => vs function, class vs function, for vs forEach vs map, Promises vs async/await, TypeScript vs Flow, etc.

Every other language has the same issue, of course. But JS happens to be worse, and this can result in code being very hard to read and modify by devs inheriting a JS codebase (which is the main problem the GDS Way is trying to solve, I think). And I'm not even talking about packages like Ramda that let you write your JS in an almost unintelligible way for people not used to pure functional programming or other paradigms. Should we encourage some of those practices and reject others?

I'm afraid I don't have a PR that answers this, but I think an extra conversation about higher-level abstract patterns is worth having.

DNS hosting guidance

(related to guidance that will be published on Service Manual for the rest of government )

Basic container guidance

It would be good to re-use all/some of the guidance Laura wrote in this PR - #89

If it can capture the way things are working right now it can be amended/expanded later as needed.

Graphite

now available on G-Cloud

procurement docs to be set up

bob & Alex to start collating info for the business case

current users: Pay, DMP

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.