apostrophecms / a3-docs Goto Github PK
View Code? Open in Web Editor NEWApostrophe 3.x documentation.
License: MIT License
Apostrophe 3.x documentation.
License: MIT License
On page
https://v3.docs.apostrophecms.org/guide/hosting.html#best-practices
there is a link to this non-existant page:
https://v3.docs.apostrophecms.org/docs/cookbook/#hosting
Not sure why Cookbook isn't there on the website. It is here
https://github.com/apostrophecms/a3-docs/blob/main/docs/cookbook/README.md#hosting
https://github.com/apostrophecms/a3-docs/blob/main/docs/guide/hosting.md
Hello everybody, i'm a french junior dev on apostrophecms3.
Here is my problem :
I have a customer module with a favorites field :
favorites: {
label: 'apostrophe:favorites',
type: 'array',
titleField: 'favorite',
fields: {
add: {
type: {
type: 'string',
label: 'apostrophe:favoriteType',
},
id: {
type: 'string',
label: 'apostrophe:favoriteId',
},
}
}
},
I would like to add a new favorite for this customer by clicking a button on the article page.
But i can't find the way to do it in my index.js front file.
Here is a part of my code :
favorite.addEventListener('click', () => {
addFavorite(favorite.id) // favorite.id is defined
})
async function addFavorite(favoriteId) {
const customerId = sessionStorage.getItem('aposCustomerId')
try {
???? what's going on here ????
} catch (err) {
console.error(err)
} finally {
}
}
Thanks a lot for your help !
a3-docs/docs/guide/localization/README.md
Lines 38 to 58 in 2c7eba8
Gives me the error
Error: The locale "es" cannot be distinguished from earlier locales.
Make sure it is uniquely distinguished by its hostname option,
prefix option or a combination of the two.
One locale per site may be a default with neither hostname nor prefix,
and one locale per hostname may be a default for that hostname without a prefix.
I reset my local db, thinking it could have been previous config get tangled up but it also happens on a fresh db. Is this config wrong?
Documenting a discussion in Discord: I was not aware that the publishing workflow looked different for admins (draft --> published) and contributors (draft --> submitted for review). Providing a short demo, e.g. on the Users doc page, could highlight this, which may be an important feature for users (it was for me!).
On the Users doc page, provide the following demo (with screenshots as appropriate)
The demo isn't strictly necessary, e.g. this could just be described. Seeing how the UI changes might be valuable though.
N/A
how to boot up a project that is already initiated. not migration but setup to start up and populate the database from a fresh custom git pull that has the framework... ? I might be getting the wrong perspective i don't know help please ...
It's possible to add an example for pieces-widgets relationships?
Hello, i'm starting a project with the new version and i was looking to add the showFields to the choices array but can't find how to do it, it is enabled on this version?
https://v3.docs.apostrophecms.org/guide/setting-up.html#creating-a-project
Why in the hell did you choose port 3000 for the ApostropheCMS server ?
If you work with Node.js you will know that most web app back ends use port 3000 (http) and 3001 (https) for their user-event servers.
But you just went ahead and created a conflict between the app backend and the app's CMS servers over access to port 3000 . . .
Thanks, Ernie & Bert.
Syntax error in code, methods self should have a return statement.
methods (self) {
return {
async addNewDog(req, initialInfo) {
Also, it is unclear how to actually do this step: "For example, if we had a dog adoption website that used an external API, we may want to update dog pieces periodically with adoption status. This may be using a command line task that is run regularly by a cron job."
So, how would you do that kind of command-line task? How do you get access to the module and invoke addNewDog?
Best regards
Hello, i am actually trying to show the relationshipReverse on the editor from the other side so the editors can check which elements are related but the guide says that "There is no editing interface for this field type as the relationship is defined in the paired relationship field.", is there a way to enable it for the editors to see the relationshipReverse?.
I have tried by adding an array field that it's being updated when the relation changes but it's hard to make it work so the relations are actualized for both sides.
That's why i am trying to enable the editing interface but can't find how
Is your feature request related to a problem you are experiencing that is not a bug? Please describe.
A clear and concise description of what the problem is. Ex: "When I do [some task], I find it frustrating when [something happens]." If this is a bug report (things are actually breaking), open a bug report instead.
Currently, the a3 doc pages do not have a favicon set.
Describe the solution you'd like
A clear and concise description of what you want to happen.
An ApostropheCMS or other appropriate favicon should be added to the documentation pages. It is unclear if this should be the same as the main pages or not.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered. For example, should this be done on the project level instead?
Mention any other context or attach screenshots regarding the feature request.
Check the existing issue labels and add any you think are relevant, e.g.,
UI
,UX
,accessibility
,security
.
When I create new piece types, I get a link to manage that piece type in the admin bar.
I would like to be able to group these new pieces - and potentially existing default pieces - into dropdowns in the admin bar, for example:
Page Content
- Reviews
- Testimonials
- Offices
Imagery
- Images
- Image Tags
Etc...
Is this something that is already possible?
I have not found it covered in the docs.
Thanks
Sorry for troubling again, i was looking to make the editor interface more user friendly and i have managed to do it like that:
// modules/asset/ui/src/scss/_widgets.scss -> follows the structure from the A3-Boilerplate from the tutorial
/// more styles rules
.apos-area-widget-wrapper {
.apos-area-widget-inner {
.apos-area-widget-controls {
opacity: 0.3;
&.apos-is-visible {
opacity: 1;
}
}
}
}
.apos-button-group--vertical .apos-button-group__inner {
flex-direction: row !important;
}
/// more styles rules
But looking at the next info i'm not sure if i can do it in other way for also add new icons/buttons to the editor modal:
There is any info about things like those?:
I have taken a look to the source code from rich-text, image and others but i am not sure enough about where i can modify/add those kinds of things and when is recommended to work with vue.
Per the docs here for the date nunjucks filter provided by apostrophe:
https://v3.docs.apostrophecms.org/reference/field-types/dateAndTime.html#use-in-templates
To print them in the format of your choice pass a momentjs/datejs compliant format string to the date Nunjucks filter
The problem is that what's actually being used is dayjs
, per the following line:
https://github.com/apostrophecms/apostrophe/blob/4dbfe8e5fc2b470bcee08e8f7cca5f4d925e3a66/modules/%40apostrophecms/template/index.js#L493
This can cause confusion because, aside from the fact that datejs is not actually used anywhere, those libraries don't necessarily have cross-compatible format options. As an example, the docs link directly to the format options for momentjs in the line above, which has had the formatting option X
for Unix timestamp since moment v2.0. This is not available in dayjs, which is the actual library used.
I'd suggest removing any mentions of momentjs, since that's only used in the launder dependency now, fixing the incorrect datejs reference to dayjs, and linking to dayjs' formatting docs:
https://day.js.org/docs/en/display/format
Outdated link in https://v3.docs.apostrophecms.org/reference/module-api/module-options.html#icon in the list of globally available UI icons points to a 404.
Correct link should be -https://github.com/apostrophecms/apostrophe/blob/main/modules/@apostrophecms/asset/lib/globalIcons.js
On the paragraph "Install the CLI tool:" the command is:
npm install @apostrophecms/cli
# Or `yarn install`, if you prefer. We'll stick to npm commands.
But since the CLI is "global", maybe is better to do -g instead? Because when I try to use apos
it give me an error.
npm install -g @apostrophecms/cli
# Or `yarn install`, if you prefer. We'll stick to npm commands.
Is your feature request related to a problem you are experiencing that is not a bug? Please describe.
While working on a feature implementation for a project, my coworker and I were blocked by an issue and were referring to the conditional docs detailed here: https://v3.docs.apostrophecms.org/guide/conditional-fields/
This documentation takes care of these scenarios:
However, there is no mention of whether it is possible to create an if conditional in case of two conditional statements when they are from the same field in the schema instead of different fields.
Hence I want to create a pull request to solve this issue and introduce another case in the example to improve the clarity of the docs for future users. Hence, I am also creating this issue.
Describe the solution you'd like
Updating the code examples in the document to detail about the case my coworker and I were blocked by.
My coworker and I tried these methods before finding the solution:
This is a detail.
Consider replacing:
Before starting up you'll need to create an admin-level user so that you can log in. After running the following command, Apostrophe will ask you to enter a password for this user.
with
If you used 'apos create', you already set an "admin" user and password. Otherwise, before starting up you'll need to create an admin-level user so that you can log in. After running the following command, Apostrophe will ask you to enter a password for this user.
The custom URL field is incorrectly referenced in the views/layout.html example. For this to work:
{% elif item.type === 'custom' %}
{% set path = item.url %}
{% endif %}
Needs to be changed to:
{% elif item.type === 'custom' %}
{% set path = item.customUrl %}
{% endif %}
...might save someone scratching their heads ๐
Hi,
In the docs it states:
Developers can configure file type groups in addition to office and image using the fileGroups option of the @apostrophecms/attachment module. Those custom groups names can then be used for an attachment field's fileGroup setting.
Can you give me a bit more information about how I would do this please? I would like to add an mp4 option.
I guess that I could download the github @apostrophecms/attachment/index.js and create a local version in a new folder in
modules/@apostrophecms/attachment and then add another fileGroup something like the following:
self.fileGroups = self.options.fileGroups || [
...
{
name: 'localVideo',
label: 'apostrophe:localvideo',
extensions: [
'mp4'
]
},
But I'm wondering if there's a simpler method that doesn't involve duplicating the whole index.js file?
Thanks
Link broken on this page, this is the good one.
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.