rija / ghost-ssg Goto Github PK
View Code? Open in Web Editor NEWA Docker-based pipeline to publish the content of a local Ghost 4 server as static pages.
License: MIT License
A Docker-based pipeline to publish the content of a local Ghost 4 server as static pages.
License: MIT License
tests/integration
directory and move existing tests to a new `tests/units directorytest-server
)To reduce our exposure to some types of supply-chain attack on NPM, we won't to freeze the versions of gssg and its dependencies used in our docker compose's gssg container service.
We don't want the Docker image for gssg built from Dockefile
to build from whatever is latest verions in NPM.
Similarly, we want to make sure wget is not potentially updated everytime this project is cloned or re-installed.
Therefore, we need to build the Docker image once and push it to Docker hub using a time-based tag.
Then, we use the Docker hub image name and tag in the docker-compose file.
Tasks:
Dockerfile in root of project repository is a convention for dockerised single command/service and a hint to Github build toolset.
Since we are integration project, and the Dockerfile is just for the dependencies, it's preferable to have it inside a directory.
This is to avoid new line inconsistencies between contributor on Windows and on Mac/Linux
locally tests can be run with:
$ bats tests
We need that to run on CI
Create a ./setup
bash script to:
site
stage
directories if they do not exist,Scenarios for creating the git repo that host pages:
Use Gitter on Matrix
Describe the bug
When navigating to localhost:9999
after running preview, the link to the thomepage on top of each post is incorrect
To Reproduce
Steps to reproduce the behavior:
./preview
command to generate static web pages for local previewlocalhost:9999
Expected behavior
The browser takes you to the home page at localhost:9999
Actual behavior
The click reload the current page, and the url associated with the logo is the post's URL
Screenshots
If applicable, add screenshots to help explain your problem.
Your environment (please complete the following information):
- macOS Ventura 13.2
- Docker version 20.10.14, build a224086
- GNU bash, version 3.2.57(1)-release (arm64-apple-darwin22)
Output of diagnostics scripts
./whatsup
./versions
>./whatsup 0.649s (main) 15:52
Name Command State Ports
-------------------------------------------------------------------------------------
ghost-ssg_editor_1 docker-entrypoint.sh node ... Up 0.0.0.0:2368->2368/tcp
ghost-ssg_preview_1 /docker-entrypoint.sh ngin ... Up 0.0.0.0:9999->80/tcp
~/c/ghost-ssg>./versions 0.579s (main) 15:53
Creating ghost-ssg_version_run ... done
gssg:
1.1.4
wget:
GNU Wget 1.21.3 built on linux-musl.
Node:
v19.4.0
NPM:
9.2.0
Container Repository Tag Image Id Size
--------------------------------------------------------------------------
ghost-ssg_editor_1 ghost 4.48.8-alpine 3a38d695a154 481.5 MB
ghost-ssg_preview_1 nginx 1.23.3-alpine 0a36350238fb 40.28 MB
Additional context
Add any other context about the problem here.
Make sure that any changes comes with a test scenario
(also delete unused pulll request templates)
Since this is an integration project, there are a few dependency that's appropriate to reference in a citation file.
To do this, see: https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md#referencing-other-work
./publish
: export static pages for publishing purpose and git push to the configured forge (GitLab)
Now that the backup/restore is operational, we can tag a new release: v1.0.0
:
./up
: start the two servers (editor and preview)./down
: stop the two serverstest-server
container service in docker-compose.yml
, identical to editor
but without volume mountbug-19-homepage-link-empty.bats
to switch from editor
to test-server
before and after the test./backup
: backup content and configuration for Ghost into a tarball with a date and time based naming./restore
: stop the server, restore content and confiration for Ghost from a tarball, start the serverReuse this project:
./preview
: export static pages for preview purpose and open default web browser at the preview URL
./test
shell script to run the test suitebats
In SECURITY.md
, we should add a note to encourage contributors to verify their changes against OWASP top ten:
https://owasp.org/www-project-top-ten/
Add a SECURITY.md
document to inform security researchers what to do with issues they find
<type>[optional scope]: <description> (What?, must start with present tense verb)
[begin optional body]
Why?
How?
Dependencies?
(If this commit is part of a bigger change that required multiple commits, specify the commit hash of the previous commit for that change)
[end optional body]
[optional footer(s)]
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
[{**.*sh,setup,preview,publish,up,down,versions,log,test,whatsup,**.bats}]
indent_size = tab
indent_style = tab
trim_trailing_whitespace = true
[**.bats]
indent_size = tab
indent_style = tab
trim_trailing_whitespace = true
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.