Skip to content

Commit

Permalink
Merge pull request #244 from christianbraeunlich/update-docsy-hugo-mo…
Browse files Browse the repository at this point in the history
…dules

Technical update is required for other PR's to be merged and published
  • Loading branch information
TheDoubleH authored Sep 6, 2024
2 parents 75f3d28 + 8ba7e0d commit fede1fd
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 732 deletions.
19 changes: 4 additions & 15 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# Update the NODE_VERSION arg in docker-compose.yml to pick a Node version: 10, 12, 14
ARG NODE_VERSION=14
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${NODE_VERSION}
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04

# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
ARG VARIANT=hugo
ARG VARIANT=hugo_extended
# VERSION can be either 'latest' or a specific version number
ARG VERSION=latest

# Download Hugo
RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \
rm -rf /var/lib/apt/lists/* && \
case ${VERSION} in \
RUN case ${VERSION} in \
latest) \
export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\
esac && \
Expand All @@ -28,11 +25,3 @@ RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \

# Hugo dev server port
EXPOSE 1313

# [Optional] Uncomment this section to install additional OS packages you may want.
#
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install more global node packages
# RUN sudo -u node npm install -g <your-package-list-here>
50 changes: 22 additions & 28 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/hugo
{
"name": "Hugo (Community)",
"name": "Hugo",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update VARIANT to pick hugo variant.
// Example variants: hugo, hugo_extended
// Rebuild the container if it already exists to update.
"VARIANT": "hugo_extended",
// Update VERSION to pick a specific hugo version.
// Example versions: latest, 0.73.0, 0,71.1
// Rebuild the container if it already exists to update.
"VERSION": "latest",
// Update NODE_VERSION to pick the Node.js version: 12, 14
"NODE_VERSION": "14",
}
"dockerfile": "Dockerfile"
},
// Set *default* container specific settings.json values on container create.
"settings": {
"html.format.templating": true,
"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"html.format.templating": true
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"GitHub.vscode-pull-request-github"
]
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"GitHub.vscode-pull-request-github"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
1313
],
"remoteUser": "vscode",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "git submodule update --init --recursive --depth 1 && npm i",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
// "postCreateCommand": ""
"features": {
"git": "os-provided"
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/devcontainers/features/hugo:1": {},
"ghcr.io/devcontainers/features/node:1": {}
}
}
}
4 changes: 1 addition & 3 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.118.2
HUGO_VERSION: 0.133.1
steps:
- name: Install Hugo CLI
run: |
Expand All @@ -41,8 +41,6 @@ jobs:
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/regen-gh-pages.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ contact [[email protected]](mailto:[email protected]) with any additio

### Setup

1. Clone and setup
```sh
# Clone all submodules
git submodule update --init --recursive --depth 1
# Install NPM dependencies
npm install
```
2. Run Hugo server
**Run Hugo server**
```
$ hugo server
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/microsoft/alguidelines

go 1.23.0

require github.com/google/docsy v0.10.0 // indirect
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
11 changes: 6 additions & 5 deletions config.toml → hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ languageCode = 'en-us'
title = 'AL Guidelines'

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["docsy"]
theme = ["github.com/google/docsy"]

# Will give values to .Lastmod etc.
enableGitInfo = true
Expand Down Expand Up @@ -72,11 +72,12 @@ id = ""

[languages]
[languages.en]
description = "Guidelines for when Developing AL for Microsoft Dynamics 365 Business Central"
languageName = "English"
title = "alguidelines.dev - Business Central Design Patterns"
languageName = "English"
# Weight used for sorting.
weight = 1
[languages.en.params]
description = "Guidelines for when Developing AL for Microsoft Dynamics 365 Business Central"

# Everything below this are Site Params

Expand Down Expand Up @@ -149,8 +150,8 @@ url = '/blog/serverless-next.js-example-blog-with-fission/'
[params.ui]
# Set to true to disable breadcrumb navigation.
breadcrumb_disable = false
# Set to true to disable the About link in the site footer
footer_about_disable = false
# Set to true to show an About link in the site footer
footer_about_enable = true
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar
navbar_logo = true
# Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage.
Expand Down
Loading

0 comments on commit fede1fd

Please sign in to comment.