Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/altinn/altinn-infoportal-hugo

A new PoC implementation of altinn infoportal using Hugo + markdown.
https://github.com/altinn/altinn-infoportal-hugo

altinn hugo markdown

Last synced: about 1 month ago
JSON representation

A new PoC implementation of altinn infoportal using Hugo + markdown.

Awesome Lists containing this project

README

        

# Infoportal

This repo is a PoC for [portfolio #7](https://github.com/Altinn/dig-portfolio/issues/7).

[infoportal.no](https://infoportal.no)
![Infoportal frontpage](https://user-images.githubusercontent.com/6088624/150494503-4df3e725-432c-4204-ad9d-6b23f8df5319.png "Infoportal frontpage")

## Running altinn-infoportal locally

1. Clone the repo (assumes you've installed [Git](https://git-scm.com/downloads)):
```shell
cd C:/repos
git clone https://github.com/Altinn/altinn-infoportal-hugo
```
2. [Download Hugo](https://github.com/gohugoio/hugo/releases) (v0.80.0 or newer), and copy the executable for your OS into the new `altinn-infoportal-hugo` folder.
3. Navigate to folder and run Hugo
```shell
cd altinn-infoportal-hugo
./hugo serve --navigateToChanged
```

Which will result in output similar to:
```cmd
Start building sites …

| NB | EN | NN
-------------------+-----+-----+------
Pages | 27 | 19 | 19
Paginator pages | 0 | 0 | 0
Non-page files | 4 | 4 | 4
Static files | 503 | 503 | 503
Processed images | 0 | 0 | 0
Aliases | 12 | 10 | 10
Sitemaps | 2 | 1 | 1
Cleaned | 0 | 0 | 0

Built in 10707 ms
Watching for changes in C:\repos\altinn-infoportal\{content,i18n,layouts,static,themes}
Watching for config changes in C:\repos\altinn-infoportal\config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
```

The solution is now running locally at http://localhost:1313

## Content management (Netlify CMS)
*Work in progress, currently only a limited content types is available*

Altinn-infoportal use Netlify CMS to manage the site content.
The interface is available at http://localhost:1313/admin and requires an Github account with `write` permission to the repository.

Netlify CMS is configured to be multilanguage supported.

### Workflow
The CMS is configured with `editorial_workflow` which requires the content to be approved before published.

Workflow steps:
1. Create content
2. Save Draft
3. Review pull request in repository
4. Merge changes
5. Published

### Development
The configuration for Netlify CMS has enabled `local_backend` which enables the CMS to read/store from local repository.
This is good if you want to test or make changes in the CMS, but not commit pull requests to master.

To make this work, run `npx netlify-cms-proxy-server` in a terminal window while running `hugo serve` in another.