Skip to content

Commit

Permalink
feat(export): supprime la référence au submodule git des templates d'…
Browse files Browse the repository at this point in the history
…export
  • Loading branch information
thom4parisot committed Oct 28, 2024
1 parent cee3d7d commit 542e981
Show file tree
Hide file tree
Showing 12 changed files with 2,234 additions and 34 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ (inputs.release-version && format('v{0}', inputs.release-version)) || github.ref }}
submodules: true
- uses: docker/setup-buildx-action@v3
- run: cp stylo-example.env .env

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: |
node -e "const pkg = require('./package.json'); pkg.version = '$RELEASE_VERSION'; require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, ' '), 'utf8')"
node -e "const pkg = require('./front/package.json'); pkg.version = '$RELEASE_VERSION'; require('fs').writeFileSync('./front/package.json', JSON.stringify(pkg, null, ' '), 'utf8')"
node -e "const pkg = require('./graphql/package.json'); pkg.version = '$RELEASE_VERSION'; require('fs').writeFileSync('./graphql/package.json', JSON.stringify(pkg, null, ' '), 'utf8')"
npm i --package-lock-only
npm i --prefix=graphql --package-lock-only
npm i --prefix=front --package-lock-only
RELEASE_GIT_NAME=$(curl -s https://api.github.com/users/$GITHUB_ACTOR | jq -r .name)
[email protected]
git config --local user.name "$RELEASE_GIT_NAME"
git config --local user.email "$RELEASE_GIT_EMAIL"
git commit -a -m "Release $RELEASE_VERSION"
git tag "v$RELEASE_VERSION"
git push origin master
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

8 changes: 0 additions & 8 deletions HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ First step is to clone the project, you can use either the HTTPS or SSH version
$ git clone [email protected]:EcrituresNumeriques/stylo.git


Stylo uses submodules to pull templates (and those templates are hosted on framagit).
If you have an account with ssh enabled on framagit, you can pull all submodules using the following commands:


$ git submodule init
$ git submodule update


## Run with Docker

Useful to run a fully fledged Stylo in no time.
Expand Down
8 changes: 0 additions & 8 deletions SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ cd ~
git clone https://github.com/EcrituresNumeriques/stylo.git
```

Update the submodule:

```bash
cd stylo
git submodule init
git submodule update
```

Copy the `stylo-example.env` file and edit the variables:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/src/en/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It is possible to choose from several bibliographic styles: some embed the refer

The export module takes care of formatting references, adding or removing spaces, inserting "Ibids." according to the style, etc.

Exports are produced using the conversion tool [Pandoc](https://pandoc.org/) based on the templates available [here](https://framagit.org/stylo-editor/templates-stylo).
Exports are produced using the conversion tool [Pandoc](https://pandoc.org/) based on the templates available [here](./export/templates).

The export also allows you to download the source files of Stylo (.md,.bib,.yaml) and the media inserted in the article if there are any.

Expand Down
12 changes: 6 additions & 6 deletions export/src/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ function generatePandocCommand (
bibliographyFilePath,
metadataFilePath
) {
const templatesDirPath = path.join(__dirname, 'templates-stylo')
const templatesDirPath = path.join(__dirname, 'templates')
let templateArg = `--template=${path.join(
templatesDirPath,
'templateHtml5.html5'
'publish.html'
)}`
if (preview) {
templateArg = `--template=${path.join(
templatesDirPath,
'templateHtml5-preview.html5'
)} -H ${path.join(templatesDirPath, 'preview.html')}`
'preview.html'
)} --include-in-header=${path.join(templatesDirPath, 'preview-styles.html')}`
}
const cslFilePath = path.join(templatesDirPath, 'chicagomodified.csl')
// https://github.com/jgm/pandoc/blob/main/MANUAL.txt
Expand All @@ -55,8 +55,8 @@ ${templateArg} \
--toc \
--csl=${cslFilePath} \
--citeproc \
-f markdown \
-t html5 \
--from=markdown \
-to=html5 \
${markdownFilePath}`
}

Expand Down
1 change: 0 additions & 1 deletion export/src/templates-stylo
Submodule templates-stylo deleted from e5fb28
Loading

0 comments on commit 542e981

Please sign in to comment.