diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a9ee3ce..100a5af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,5 @@ name: Build -on: - push: +on: [push, pull_request] jobs: no-uncommitted-changes: @@ -13,10 +12,10 @@ jobs: uses: actions/setup-node@v1 with: node-version: '12.x' - - run: npm run build + - run: npm run build - name: Check working tree id: changes uses: UnicornGlobal/has-changes-action@v1.0.11 - name: Check for uncommited changes if: steps.changes.outputs.changed == 1 - run: git status && echo "Output does not match src/, uncommitted changes exist, follow build instructions from README" && exit 1 + run: git status && git --no-pager diff --patch-with-raw && echo "Output does not match src/, uncommitted changes exist, follow build instructions from README" && exit 1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..47e8bd5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.0] - 2020-08-03 +This release streamlines the process for making future updates to this repo: + +- Moves source-of-truth HTML and CSS files into new `src` directory ([details](https://github.com/ipfs/dir-index-html/pull/40#issue-456530181)) +- Adds build script in `package.json` to generate minified/inlined `dir-index.html` at top level from individual files in `src` directory ([details](https://github.com/ipfs/dir-index-html/pull/40#issue-456530181)) +- Adds GitHub Action to guard against committing state where `dir-index.html` does not match source materials in `src` ([details](https://github.com/ipfs/dir-index-html/pull/40#pullrequestreview-456126397)) + +## [v1.1.0] - 2020-07-24 +This release brings general tidying, plus some substantial UI enhancements! Big thanks to @neatonk for all the work. + +- Adds a column for CIDs between the name and size columns; CIDs are clickable links that open the item as a new "root path", enabling users to copy direct links to images or subdirectories (see https://github.com/ipfs/dir-index-html/issues/37 and https://github.com/ipfs/dir-index-html/issues/15) +- Adds the size of the current directory to the header of the table (see https://github.com/ipfs/dir-index-html/issues/37 and https://github.com/ipfs/dir-index-html/issues/25) +- Makes path components in table headers into links, so clicking on segments between directory slashes will go to that level of the directory tree (see https://github.com/ipfs/dir-index-html/issues/37 and https://github.com/ipfs/dir-index-html/issues/2) +- Updates tests to include testing the above (see https://github.com/ipfs/dir-index-html/pull/38) +- Reconciles legacy discrepancies between `dir-index.html` and `dir-index-uncat.html` (see https://github.com/ipfs/dir-index-html/pull/39) + + +## [v1.0.6] - 2020-06-25 +- Adds favicon: visual consistency/prettiness, but more importantly prevents 404 error on an implicit /favicon.ico (see [#35](https://github.com/ipfs/dir-index-html/issues/35)) +- Adds social sharing metadata (see [#34](https://github.com/ipfs/dir-index-html/issues/34)) +- Updates contributing link in readme (thanks @stensonb!) + + +## [v1.0.5] - 2020-05-05 + +- Removes extraneous references to Glyphicons (closes [#23](https://github.com/ipfs/dir-index-html/issues/23)) +- Makes page responsive overall (closes [#24](https://github.com/ipfs/dir-index-html/issues/24)) +- Adds file icons for .wmv, .mov, .mkv (closes [#19](https://github.com/ipfs/dir-index-html/issues/19)) +- Strips out unneeded CSS +- Makes colors more accessible consistent with those in ipfs-css +- Tidies up in general + + +## [v1.0.4] - 2020-04-21 +- Update style to match IPFS branding +- Add links to ipfs.io, install help, and the bug tracker + + +## [v1.0.3] - 2016-08-31 +- No release notes added + + +## [v1.0.2] - 2016-08-31 +- No release notes added + + +## [v1.0.1] - 2016-08-31 +- No release notes added diff --git a/README.md b/README.md index c6d240b..66e44e1 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,3 @@ -# dir-index-html +## Archived. -[![Made by Protocol Labs](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) -[![Project: IPFS](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.io/) -[![Matrix](https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat-square)](https://matrix.to/#/room/#ipfs:matrix.org) -[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) - -> Directory listing HTML for `go-ipfs` gateways - -**NOTE:** This repo is not intended to be used as a standalone project! This code is used by the gateway code within [`go-ipfs`](https://github.com/ipfs/go-ipfs). In the long term, once the the gateway is extracted from `go-ipfs`, the code in this repo will be merged into that gateway package. - -![](https://user-images.githubusercontent.com/157609/88379209-ce6f0600-cda2-11ea-9620-20b9237bb441.png) - -## Updating - -When making updates to the directory listing page template, please note the following: - -1. Make your changes to the (human-friendly) source documents in the `src` directory -2. Before testing or releasing, make sure to run the build script to update the minified version in the top-level directory: - -```bash -> npm run build -``` -3. To get your updates into `go-ipfs`, you'll need to do the following: - - Cut a new, appropriately versioned release of `dir-index-html` (don't forget to bump the version number in `package.json`) - - Make a PR against `go-ipfs` following [these instructions](https://github.com/ipfs/go-ipfs/tree/master/assets#updating-dir-index-html) for updating the directory index - -## Testing - -1. Make sure you have [Go](https://golang.org/dl/) installed -2. Start the test server, which lives in its own directory: - -```bash -> cd test -> go run . -``` -This will listen on [`localhost:3000`](http://localhost:3000/) and reload the template every time you refresh the page. - -If you get a "no such file or directory" error upon trying `go run .`, make sure you ran `npm run build` to generate the minified artifact that the test is looking for. - -## Contribute - -Feel free to join in. All are welcome! A good place to start is to check the [issues](https://github.com/ipfs/dir-index-html/issues) for anything you find interesting. - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -### Want to hack on IPFS? - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) - -## License - -MIT +This repo got [merged back into go-ipfs](https://github.com/ipfs/go-ipfs/pull/8555) and can be found in [go-ipfs/assets/dir-index-html](https://github.com/ipfs/go-ipfs/tree/master/assets/dir-index-html). diff --git a/dir-index.html b/dir-index.html index e948603..ec00da7 100644 --- a/dir-index.html +++ b/dir-index.html @@ -1,10 +1,7 @@ {{ $root := . }} - + - @@ -21,6 +18,9 @@ Codestin Search App +