{"id":17101492,"url":"https://github.com/valderman/ccwf","last_synced_at":"2025-04-06T01:25:31.748Z","repository":{"id":66264387,"uuid":"62254747","full_name":"valderman/ccwf","owner":"valderman","description":"Chalmers Course Website Framework","archived":false,"fork":false,"pushed_at":"2017-03-17T15:59:23.000Z","size":9310,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T07:31:01.882Z","etag":null,"topics":["chalmers","education","haskell","web"],"latest_commit_sha":null,"homepage":"http://ekblad.cc/ccwf/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valderman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-29T20:11:47.000Z","updated_at":"2020-01-20T01:56:08.000Z","dependencies_parsed_at":"2023-04-25T14:12:21.632Z","dependency_job_id":null,"html_url":"https://github.com/valderman/ccwf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fccwf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fccwf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fccwf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valderman%2Fccwf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valderman","download_url":"https://codeload.github.com/valderman/ccwf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247422341,"owners_count":20936456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chalmers","education","haskell","web"],"created_at":"2024-10-14T15:25:29.708Z","updated_at":"2025-04-06T01:25:31.723Z","avatar_url":"https://github.com/valderman.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Chalmers Course Website Framework\n=================================\n\nA configurable and (hopefully) easy-to-use framework for creating and managing\ncourse websites.\nTo see CCFW in action, visit the [example website](http://ekblad.cc/ccwf).\n\n\nQuickstart\n----------\n\nTo quickly get started with CCWF:\n\n1. Clone this repository: `git clone https://github.com/valderman/ccwf.git`\n2. Add your course information to the `website.hs` build script.\n3. Modify the example website by adding, removing and modifying markdown files\n   in the `pages` subdirectory.\n4. Build your new course website: `runghc website.hs rebuild`\n5. Commit your changes.\n6. Whenever you need an official CCFW update, rebase your changes onto the\n   latest changes: `git fetch \u0026\u0026 git rebase`\n\n\nOverview\n--------\n\nThe homepage is largely configurable from the build script, `website.hs`, which\nis divided into two sections.\n\nThe first section contains information which is likely to change as the course\nprogresses: news items, lectures and files to be published on the course homepage.\nThe second section contains information which is likely to change from year to\nyear, such as information about the course responsible and assistants, various\nURLs, etc.\n\nThe settings in these two sections are made available to the markdown-based\npages of the course homepage through *template variables*. Please see the\nHaddock for each setting for more information on how to use them.\n\nThe third section contains the build script itself, which is unlikely to change\nvery much at all. This part is largely considered implementation details.\n\nPage content lives in the `pages` directory as markdown files; one file per\npage on the course homepage. Larger edits -- modifications to the project\ndescription, updates from course evaluation meetings, etc. -- are made to the\nrelevant markdown file. Please remember to *avoid* including information such\nas the name of the examiner, URL of the Google group, etc. verbatim in these\npages. Instead, use the template variables `$teacher$`, `$group$`, etc.,\nto ensure that this information is kept consistent across all pages and is\neasy to update if the course changes hands.\n\nFiles -- lecture notes, the test suite, etc. -- live in the `files` directory.\nAny files you want to distribute should be put in this directory and linked\nfrom the appropriate news item or markdown page.\n\nAll links should be relative to the course website root. That is, they should\nstart with `/`. Each page put into the `pages` subdirectory can be accessed\nusing its base name (i.e. file name without extension), prepended with a slash.\nA link to the course \"about\" page would thus look like this:\n\n```\n[The \"about\" page](/about)\n```\n\nThe look of the course homepage mainly lives in the `css` and `templates`\ndirectories. Please exercise caution when updating the CSS and HTML in these\ndirectories, as you might inadvertently break the site for mobile devices.\nMake sure to test any changes both in your normal browsing environment and with\nyour browser window shrunk to less than 800 pixels wide.\n\n\nDay to day tasks\n----------------\n\n### Rebuilding the site\n\nTo rebuild the site, simply run `runghc website.hs build`. If the build has\nsomehow become messed up, use `runghc website.hs rebuild` to rebuild it from\nscratch.\n\n\n### Deploying the updated site\n\nAfter rebuilding the site, deploy it by copying the contents of the `_site`\ndirectory to the appropriate directory on the Chalmers server. You should\nuse `rsync` for this, to avoid updating any files that were not changed. An\nexample of a deployment command line would be\n`rsync -r _site/* /path/to/homepage/root`.\n\n\n### Updating news\n\nTo add a news item, simply add a line to the `newsItems` list and rebuild the\nsite. Make sure that the prefixes of the lines are consistent, i.e. give the\ndate that the news item was added. News items may contain markdown, so you can\nadd emphasis, links and other styling.\n\n\n### Lectures\n\nTo update a lecture, simply add/remove/modify the relevant entry in the\n`lectures` list and rebuild the site. Each lecture has three fields:\n\n* the date of the lecture;\n* the title of the lecture; and\n* a list of (title, file name) pairs, containing files (usually slides) tied\n    to the lecture.\n\nDon't forget to put any files you added/changed into the `files` directory.\nIf you removed a file from the list, you should also remove it from the `files`\ndirectory.\n\n\nBuilding your course website\n----------------------------\n\n\u003ca name=\"create_page\"\u003e\u003c/a\u003e\n\n### Creating a page\n\nTo create a new page, simply create a new markdown (`.md`) file in the `pages`\nsubdirectory. In addition to the standard Markdown formatting, pages can have\nmetadata, specified as `key: value` pairs at the top of the file.\nSee `pages/about.md` for an example \"about\" page.\n\nPages can have the following metadata items:\n\n* `title`. This is the title of the page, which will be used for the page's\n  entry in the main menu. It will also be displayed as the page title in the\n  user's web browser (i.e. window/tab decoration) as well as in Google search\n  results. If no title is given the page does not appear in the main menu.\n* `submenu`. Pages may have submenus, linking to anchors within the page.\n  A submenu is specified as a space-separated list of anchor names.\n  An anchor by the name `anchor_name` can be declared by inserting the HTML\n  code `\u003ca name=\"anchor_name\"\u003e\u003c/a\u003e` somewhere on the page, and will appear\n  in the submenu as \"Anchor name\", if it is also added to the `submenu` field.\n* `menuorder`. A positive integer giving the page's place in the main menu.\n  The main menu is sorted in ascending order, so that the page with the lowest\n  menuorder appears at the top. If no menu order is given for a page, the page\n  will be sorted *after* all other pages.\n  If two pages share the same menu order, the ordering between them is\n  arbitrary (but consistent; i.e. will always be the same).\n  If `menuorder` is either `none` or a negative number, the page will not\n  appear in the main menu at all (but can, of course, still be linked manually).\n* `template`. The name of the template to use for this page.\n  Templates live in the `templates` subdirectory, so if a page wants to use\n  `mytemplate` as its template, the file `templates/mytemplate.html` will be\n  loaded.\n\n\n### Creating a page with a submenu\n\nSee the section [creating a page](#create_page); more specifically, the\ndiscussion of the `submenu` metadata item.\n\n\u003ca name=\"custom_template\"\u003e\u003c/a\u003e\n\n### Creating a page with a custom template\n\nSee the section [creating a page](#create_page); more specifically, the\ndiscussion of the `template` metadata item.\nIn short:\n\n1. Create a new template (or copy from `default.html` and modify) in the\n   `templates` directory.\n2. Set the `template` metadata variable to the name of your template, on all\n   pages that should use the custom template.\n\n\n### Creating a page with very wide content\n\nCreate a page as usual, but set the `template` metadata item for the page\nto `wide`. This will apply the `widecontent` CSS class to\nthe contents of your page.\n\n\n### Creating a page with a quickref bar\n\nIn addition to the left sidebar containing the website's main menu, pages on\ncourse websites may have a right hand sidebar, called the \"quickref bar\".\nThis sidebar is intended for pages that contain a *lot* of text, such as\nlanguage definitions or descriptions of major course projects.\n\nTo create such a sidebar, insert a `div` HTML element with the `quickref`\nCSS class anywhere on the page.\n(We really suggest you put it at the top though, so it's easy to find when\nyou need to change it.)\nIn this element you can then put any markdown or HTML that you wish.\nIn our recommended use case, this would be a heading and a bulleted list of\nlinks to anchors inserted somewhere on the page.\nAnchors are inserted just like how they are inserted for use with a submenu.\n\nThe file `pages/quickref.md` contains an example usage of the quickref bar.\n\n\n### Including code listings in pages\n\nCCWF lets you include code listings with optional syntax highlighting on any\npage. To include a one-line code snippet into running text, simply enclose it\nin backticks: `` `print \"hello\"` ``.\nThese short snippets do not have syntax highlighting.\n\nTo include longer code listings, you can enclose a block of code in triple\nbackticks, where each set of backticks reside on a new line:\n\n````\n```\nBeautiful listings\nThis one has no highlighting\nIt is a haiku\n```\n````\n\nTo add syntax highlighting to a code block, include the name of the language\nthe code is written in right next to the opening triple backticks:\n\n````\n```haskell\nfib :: Integer -\u003e Integer\nfib 1 = 1\nfib 2 = 1\nfib n = fib (n-1) + fib (n-2)\n```\n````\n\nIf adding syntax highlighting to your code block doesn't change its appearance,\nor has some other funny effect on the look of the page or the code block, your\nlanguage is most likely not supported.\nIn which case, simply leaving the language out will at least give you a\nfixed-width font and a uniform look across code listings.\n\n\n### Changing the look and feel of the entire website\n\nTo change the global look of your site, you should preferably make changes to\nthe CSS files in the `css` subdirectory.\nThe file `css/style.css` governs most of the site's look, such as the fonts,\ncolors, text decorations, etc.\n\nFor more drastic changes, such as completely changing the page structure or\nadding some content to every single page, you will want to modify the default\ntemplate `templates/default.html`.\nTo only change the structure of *some* pages, you are better off creating a\nnew template, for use only on those pages. See the section\n[creating a page with a custom template](#custom_template) for information\non how to do this.\n\nWhen modifying either templates or CSS styling, it is **very important** to\ntest your changes both using a normal-sized browser window, and with your\nbrowser window shrunk to \u003c800 pixels wide (or, even better, on an actual\nmobile device).\nOtherwise, you risk breaking your website for either mobile or non-mobile\ndevices.\n\n\nTroubleshooting\n---------------\n\n* Note that if you want to use a `$` -- that is, a literal dollar sign -- you\n  should use the `S` environment variable, since actual dollar signs get eaten\n  by the template compiler.\n* Also note that in templates, newlines may sometimes also get eaten by the\n  template compiler.\n  Inserting a backslash (`\\`) character at the end of a line affected\n  by this problem will usually fix it.\n* If a `$variable$` doesn't get properly interpolated, try escaping the dollar\n  signs in its name: `\\$variable\\$`.\n* When building tables or bullet points from lists (such as the `$assistant$`\n  list, it is strongly recommended to use explicit HTML in your markdown pages,\n  since the template compiler and the markdown compiler sometimes disagree on\n  what some particular space or newline means.\n  See the list of assistants on `pages/about.md`.\n* If your code listings look weird, try not specifying a language.\n  You won't get syntax highlighting, but you'll at least get a fixed-width font\n  and a uniform look without messing up your page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalderman%2Fccwf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalderman%2Fccwf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalderman%2Fccwf/lists"}