Welcome to the source repository of Uç! Uç! website.
# Clone the repo
git clone [email protected]:uc-uc/uc-uc.github.io.git
# Navigate to project directory
cd uc-uc.github.io
# Install project dependencies
npm install npm startThen open http://localhost:3000 in your browser.
Preview will automatically update itself as you make changes.
Everything content-related resides inside content folder.
Writ-CMS works in a simple way:
- Text files inside
contentbecome posts, - Text files inside
content/pagesbecome subpages, - A text file named
indexorhomepageinsidecontentbecomes the homepage, - Folders inside
contentbecome categories, - In
contentor in a category, a folder containing a post.md becomes a foldered post. - In
pages, a folder containing a page.md becomes a foldered subpage. - Posts inside categories become categorized posts.
- Any other files are registered as local assets to their closest parent entry (e.g. a post)
Sub-categories are currently not supported.
Text files can be written in HTML, markdown or plain text. You can use handlebars expressions.
Accepted file extensions: .md, .markdown, .txt, .html, .hbs, .handlebars
Regardless of the format, text files may contain a front-matter section in the beginning like this:
---
tags: web, hello world
---
Content comes here
More details can be found here: https://github.com/scriptype/writ-cms?tab=readme-ov-file#manual
Everything theme-related resides inside theme folder.
You can quickly make changes to the theme using script.js, style.css and theme-settings.css.
scripts.js and style.css recognize theme/assets/custom as the current directory.
Let's say you want to have a colors.css and import it into style.css:
- Put
colors.cssintotheme/assets/custom - Import it in
style.csswith:@import url('./colors.css');
You can change how everything looks and behaves by making changes in theme/templates folder.
All templates are rendered using Handlebars.
templates/basehandles the lower-level html organizationtemplates/componentsandtemplates/layoutscontain some reusable templatestemplates/featuresis automatically generated based on your settings, but your edits are preserved.templates/pagescontains the templates for each page type.templates/helpers.jscontains Handlebars helpers.
After making changes to the Handlebars helpers, you need to restart the watcher. By default, all posts will have 'text' type.
templates/pages/post has a few subfolders, corresponding to different post types.
By adding another, you simply introduce a new post type.
You can set a post's type by adding type: nameOfTheType in its front-matter.
Writ-CMS is configured in the settings.json and extended programmatically inside _scripts.
_scripts folder is used by npm scripts. Here _scripts/writ.js extends the
writ-cms by using a hook for customizing the content model.