👷 Testing the README.md before deploy.

This commit is contained in:
Myles Braithwaite
2018-01-19 11:05:16 -05:00
parent a59d5b71ae
commit d727f624dc
8 changed files with 3662 additions and 73 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules/

8
.remarkrc Normal file
View File

@@ -0,0 +1,8 @@
{
"plugins": [
"lint",
"lint-alphabetize-lists",
"validate-links",
"remark-lint-are-links-valid-duplicate"
]
}

9
.travis.yml Normal file
View File

@@ -0,0 +1,9 @@
language: node_js
node_js:
- 'node'
brefore_script:
- npm install -g remark-cli
script: npm test

View File

@@ -4,11 +4,11 @@ Your contributions are always welcome!
## Guidelines
* Add section if needed.
* Add section title to Table of contents.
* Search previous suggestions before making a new one, as yours may be a duplicate.
* Add your links: ```* [project-name](http://example.com/) - A short description ends with a dot. - `#ProgrammingLanguage` `#Framework` ```
* Don't mention the section title in the description as it's implied.
* Check your spelling and grammar.
* Make sure your text editor is set to remove trailing whitespace.
* Send a Pull Request.
* Add section if needed.
* Add section title to Table of contents.
* Search previous suggestions before making a new one, as yours may be a duplicate.
* Add your links: ```* [project-name](http://example.com/) - A short description ends with a dot. - `#ProgrammingLanguage` `#Framework` ```
* Don't mention the section title in the description as it's implied.
* Check your spelling and grammar.
* Make sure your text editor is set to remove trailing whitespace.
* Send a Pull Request.

View File

@@ -1,21 +1,20 @@
# Awesome Static Web Site Generators [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)
# Awesome Static Web Site Generators
[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) [![Changelog Feed](https://mozorg.cdn.mozilla.net/media/img/trademarks/feed-icon-14x14.png)](https://github.com/myles/awesome-static-generators/commits/master/README.md.atom)
A static web site generator is an application that takes plain text files and compiles them to HTML files.
[![Changelog Feed](https://mozorg.cdn.mozilla.net/media/img/trademarks/feed-icon-14x14.png)](https://github.com/myles/awesome-static-generators/commits/master/README.md.atom)
- [Awesome Static Web Site Generators](#awesome-static-web-site-generators)
- [Blogs](#blogs)
- [CMS](#cms)
- [Documentation](#documentation)
- [Frameworks](#frameworks)
- [Photography](#photograpy)
- [Photography](#photography)
- [Single Page](#single-page)
- [Wikis](#wikis)
- [Helpful Tools and Services](#helpful-tools-and-services)
- [Deploy](#deploy)
- [Web Hosts](#web-hosts)
- [Other Lists of Static Web Site Geneartors](#other-lists-of-static-web-site-generators)
- [Other Lists of Static Web Site Geneartors](#other-lists-of-static-web-site-geneartors)
- [Related Awesome](#related-awesome)
- [Static Web Site Generators in Other Awesome Lists](#static-web-site-generators-in-other-awesome-lists)
@@ -49,7 +48,6 @@ A static web site generator is an application that takes plain text files and co
### Frameworks
* [Assemble](http://assemble.io/) - `#JavaScript` `#Node.js`
* [Cactus](http://cactusformac.com/) - `#MacOSX`
* [Cactus](https://github.com/koenbok/Cactus) - `#Python`
* [coil](https://github.com/badosu/coil) - `#elixir`
* [Complexity](http://complexity.readthedocs.org/en/latest/) - for those who like to work in HTML - `#Python`
@@ -63,7 +61,7 @@ A static web site generator is an application that takes plain text files and co
* [Hugo](https://github.com/spf13/hugo) - It is optimized for speed, easy use and configurability. - `#Go`
* [JBake](https://github.com/jbake-org/jbake) `#Java`
* [LambdaPad](https://github.com/gar1t/lambdapad) - `#Erlang`
* [m4-bakery](http://datagrok.github.io/m4-bakery/) - `#make` `#m4`
* [m4-bakery](https://github.com/datagrok/makebakery) - `#make` `#m4`
* [Metalsmith](https://github.com/segmentio/metalsmith) - An extremely simple, pluggable static site generator. - `#JavaScript` `#Node.js`
* [MiddleMan](https://github.com/middleman/middleman) - Middleman is a static site generator using all the shortcuts and tools in modern web development. - `#Ruby`
* [nanoc](https://github.com/nanoc/nanoc) - Felxiable support for small personal to large corporate web sites. - `#Ruby`
@@ -101,10 +99,6 @@ A static web site generator is an application that takes plain text files and co
* [Formspree](http://www.formspree.io/) - Adds functional forms to your static web sites.
* [git-annex](http://git-annex.branchable.com/tips/setup_a_public_repository_on_a_web_site/) - Configure git-annex for a public repository for a static web site.
### Deploy
* [Harpoon](http://www.getharpoon.com/) - S3 based deploy with rollback and staging/production support. - `#Ruby`
### Web Hosts
* [AWS S3](http://aws.amazon.com/s3/)

3615
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

14
package.json Normal file
View File

@@ -0,0 +1,14 @@
{
"dependencies": {
"remark-cli": "^4.0.0",
"remark-lint": "^6.0.1",
"remark-lint-alphabetize-lists": "^2.0.0",
"remark-lint-are-links-valid": "^1.0.3",
"remark-lint-are-links-valid-alive": "^0.3.0",
"remark-lint-are-links-valid-duplicate": "^0.2.2",
"remark-validate-links": "^7.0.0"
},
"scripts": {
"test": "remark -u validate-links README.md"
}
}

53
sort.py
View File

@@ -1,53 +0,0 @@
# coding: utf-8
"""
FROM: <https://github.com/vinta/awesome-python/blob/master/sort.py>
The approach taken is explained below. I decided to do it simply.
Initially I was considering parsing the data into some sort of
structure and then generating an appropriate README. I am still
considering doing it - but for now this should work. The only issue
I see is that it only sorts the entries at the lowest level, and that
the order of the top-level contents do not match the order of the actual
entries.
This could be extended by having nested blocks, sorting them recursively
and flattening the end structure into a list of lines. Revision 2 maybe ^.^.
"""
def main():
# First, we load the current README into memory as an array of lines
with open('README.md', 'r') as read_me_file:
read_me = read_me_file.readlines()
# Then we cluster the lines together as blocks
# Each block represents a collection of lines that should be sorted
# This was done by assuming only links ([...](...)) are meant to be sorted
# Clustering is done by indentation
blocks = []
last_indent = None
for line in read_me:
s_line = line.lstrip()
indent = len(line) - len(s_line)
if any([s_line.startswith(s) for s in ['* [', '- [']]):
if indent == last_indent:
blocks[-1].append(line)
else:
blocks.append([line])
last_indent = indent
else:
blocks.append([line])
last_indent = None
with open('README.md', 'w+') as sorted_file:
# Then all of the blocks are sorted individually
blocks = [''.join(sorted(block, key=lambda s: s.lower()))
for block in blocks]
# And the result is written back to README.md
sorted_file.write(''.join(blocks))
if __name__ == "__main__":
main()