- Notifications
You must be signed in to change notification settings - Fork34
The source repository for the bufferbloat.net web site
License
tohojo/bufferbloat-net
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repo contains the source files for the bufferbloat.net web site(https://www.bufferbloat.net). The site is built using the Hugo staticsite generator (https://gohugo.io) and most of the content isautomatically converted from the old bufferbloat.net redmineinstallation.
Contributions to improve the content are very welcome. See below forsome pointers on how the content is organised and how to contribute.
The content shown on the site is all in thecontent
directory. Eachsubdirectory is a project, which in turn has subdirectoriescorresponding to the different types of content. Currently, these arewiki
for Wiki pages,news
for news items andissues
for theexported bug reports from the old site. The latter is mainly kept forarchival purposes, and is probably not worth editing.
The scripts used to convert the content from the old site live in theexport
directory, which also contains the csv files with the data.Hopefully, there shouldn't be a need to run these anymore. Theold-projects
directory contains exported data for projects that it wasnot deemed relevant to move over to the new site. This data is here forarchival purposes and is not used when generating the site.
Finally, thestatic
directory contains resources such as images andCSS files used for the site layout, and thelayouts
directory containsthe templates Hugo uses to build the site.For more information on how the latter works,consult the documentation athttps://gohugo.io.
To contribute to the site, simply clone the repository, make yourchanges to the markdown file corresponding to the page you wish to edit,commit the results and open a pull request against this repository.It is also possible to file issues to point out errors or omissions, orgive suggestions for the content.
The site is build using theHugo static site generator.Version 0.16 (not higher!) is required to build the site.See theUsing Docker for development section below.
When making changes, you can see a local version of the site byinstalling Hugo and runninghugo serve
in this directory. That willrun a web server on localhost, which you can navigate to and see a liveversion of the site.
You can use the hugo binary to create a new news item with appropriatefront matter (the stuff in the top that tells Hugo that this is a newsitem). First, decide which project the news item should belong to, thenissue a command like
hugo new -k news bloat/news/2016-06-12-my-news-heading.md
to create the new file (the-k news
tells Hugo to create a news item).
The new item will be marked as a draft and appear in thecontent/bloat/news
directory. You can then edit the file (don't forgetto the title and add your name as author). While you are editing, youcan runhugo -D serve
to see the changes in real-time (the-D
means'show drafts'). When you are done you can either manually change thedraft status at the top of the file, or you can use thehugo undraft
command to do it for you. Then add the file to git and submit a pullrequest to have your news item included on the site.
The Bufferbloat.net site relies on Hugo 0.16 capabilities.(Newer Hugo versions giveWARNING: blackfriday'ssourceRelativeLinksEval is deprecated ... error messagesfor the hundreds of internal links in the repo.)
Docker provides an easy way to run Hugo 0.16 reliably on any OS.Thecodycraven/docker-hugorepo has a container for creating and running a Hugo server in Docker.
The Docker instance operates on the current directory,so normal editing,git
commands, etc. work as desired.
This command runs the Hugo server, listening on port 8080.To use it,cd <directory-containing-your-Hugo-files>
then issue thedocker run...
command each time you edit the site.
cd <directory-containing-your-Hugo-files>docker run --rm -it \ -v /tmp:/tmp \ -v $(pwd):/site \ -w /site \ -p 8080:8080 \ codycraven/hugo:0.16 \ server \ --bind=0.0.0.0 \ --port=8080 \ -w
Follow the link to localhost:8080/projects,and you'll see the blog as it appears.As you edit the underlying pages, the web display will update live.