Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generate the state listing #1

Open
5 tasks
waldoj opened this issue Mar 5, 2021 · 4 comments
Open
5 tasks

Auto-generate the state listing #1

waldoj opened this issue Mar 5, 2021 · 4 comments

Comments

@waldoj
Copy link
Collaborator

waldoj commented Mar 5, 2021

  • extract from Markdown a list of every project and its URL slug, save it as JSON
  • extract from Markdown a list of every project's states, save it as JSON
  • generate a list of each state and the projects in that state
  • output that list as a new HTML file
  • script this as a CD step
@waldoj
Copy link
Collaborator Author

waldoj commented Mar 6, 2021

This generates TSV of every project and its URL slug:

echo "URL\ttitle"; egrep "^# " *.md |sed 's/.md:#/\t/'

@waldoj
Copy link
Collaborator Author

waldoj commented Mar 6, 2021

This should generate TSV of every project and its states, but it doesn't, due to as-yet-unplumbed oddities in the regex dialect supported by sed:

egrep "\| states" *.md |sed 's/\.md:\|\sstates(\s+)\|\s/\t/'

@waldoj
Copy link
Collaborator Author

waldoj commented Mar 8, 2021

Ah-ha, this generates TSV of every project and its states:

echo "URL\tstates"; egrep "\| states" *.md |sed 's/\.md:|[[:blank:]]*states[[:blank:]]*\|[[:blank:]]*/\t/'

@waldoj
Copy link
Collaborator Author

waldoj commented Mar 8, 2021

I've been wondering how to execute GitHub Actions prior to pushing content out to GitHub Pages. Turns out that you need to use this GitHub Pages action as the last step.

waldoj added a commit that referenced this issue Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant