Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './site'
path: "./site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:20-alpine3.17

RUN apk add zola
RUN npm install -g npm@10.1.0
RUN yarn add tailwindcss@latest @tailwindcss/typography
RUN yarn add tailwindcss@latest @tailwindcss/typography preline@latest

CMD ["zola"]
ENTRYPOINT [ "zola" ]
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ docker-publish: docker-build
### SITE ################################################################
#############################################################################

build: docker-build tailwind-build clean
zola-build: clean
@echo " >> Building site ..."
docker run \
-u "$(UID):$(GID)" -v $(PWD):$(MOUNT_DIR) --workdir $(MOUNT_DIR) $(DOCKER_FQN) \
build -o $(PUBLISH_DIR)

serve: docker-build
build: zola-build docker-build tailwind-build

serve: tailwind-build docker-build
@echo " >> Running site ..."
@docker run \
-p 8080:8080 -p 1024:1024 \
Expand Down Expand Up @@ -109,15 +111,14 @@ spell-suggest:
TAILWIND_BASE = styles
TAILWIND_INPUT = $(TAILWIND_BASE)/site.css
TAILWIND_OUTPUT = static/css/site.css
JS_OUTPUT = static/js/

tailwind-setup: tailwind.config.js $(TAILWIND_BASE)/components
tailwind-setup: tailwind.config.js $(JS_OUTPUT)/preline.js

$(TAILWIND_BASE)/components:
mkdir -p $(TAILWIND_BASE) && \
cd $(TAILWIND_BASE) && \
git clone git@github.com:merakiui/merakiui.git && \
mv merakiui/components merakiui/assets . && \
rm -rf merakiui
$(JS_OUTPUT)/preline.js:
ID=$$(docker create $(DOCKER_FQN)) && \
docker cp $$ID:/node_modules/preline/dist/preline.js $(TAILWIND_BASE)/ && \
docker rm -v $$ID

tailwind.config.js:
docker run -it \
Expand All @@ -131,4 +132,5 @@ tailwind-build:
-v $(PWD):$(MOUNT_DIR) --workdir $(MOUNT_DIR) \
--entrypoint npx \
$(DOCKER_FQN) \
tailwindcss -i $(TAILWIND_INPUT) -o $(TAILWIND_OUTPUT)
tailwindcss -i $(TAILWIND_INPUT) -o $(TAILWIND_OUTPUT) --minify
cp $(TAILWIND_BASE)/*.js $(JS_OUTPUT)
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ Visit <a href="http://lfe.io/">lfe.io</a>!

## Contributing

Feel free to <a href="https://github.com/lfe/lfe.github.io/issues/new">open a ticket</a>
or fork the site and submit a
<a href="https://github.com/lfe/lfe.github.io/pulls">pull request</a>.
Feel free to [open a ticket](https://github.com/lfe/lfe.github.io/issues/new) or fork the site and submit a [pull request](https://github.com/lfe/lfe.github.io/pulls).

Note that the entire site content is driven with Markdown files -- *including* the metadata sections of those files!

Expand Down Expand Up @@ -54,3 +52,23 @@ You may want to check the spelling first, though:
```shell
make spell-check
```

## Publishing to Staging

The staging site is hosted in [another LFE repo](), and thus requires a custom remote URL to be added to your local git clone:

```shell
git remote add staging git@github.com:lfe/site-staging.git
```

With that in place, you can push your branch to that repo with:

```shell
git push staging <your branch name>
```

If you are pushing to a branch that is not the current default in staging, you'll want to change the default to your branch here:
* <https://github.com/lfe/site-staging/settings>

The Github Actions for deploying the site is set to only trigger on the `main` branch, so you'll want to manually kick off a deploy, when you're ready (the "Run workflow" drop-down at the top):
* <https://github.com/lfe/site-staging/actions/workflows/deploy-site.yml>
7 changes: 7 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ internal_level = "warn"

[extra]
# Put all your custom config variables here

[extra.download]

repository = "https://github.com/lfe/lfe"
prior_release = "2.0.1"
current_release = "2.1.2"
pre_release = "refs/heads/develop"
Loading